From: Jason Skomorowski Date: Tue, 29 Mar 2011 21:22:40 +0000 (+0000) Subject: Remove dependencies (Hasse's patch) X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=e549e9d5f24f6b473a3a8b710989b27c9f28e7bd;p=mkdru-moved-to-drupal.org.git Remove dependencies (Hasse's patch) --- diff --git a/mkdru.install b/mkdru.install index 785443b..fa08343 100644 --- a/mkdru.install +++ b/mkdru.install @@ -44,7 +44,8 @@ function mkdru_schema() { */ function mkdru_install() { // Disable comments by default - variable_set('comment_mkdru', COMMENT_NODE_HIDDEN); + variable_set('comment_mkdru', defined(COMMENT_NODE_HIDDEN) ? COMMENT_NODE_HIDDEN : NULL); + // Default settings $settings['title'] = ""; @@ -82,4 +83,4 @@ function mkdru_uninstall() { variable_del('mkdru_defaults'); // Clear block visibility db_delete('block_node_type')->condition('module', 'mkdru')->execute(); -} \ No newline at end of file +} diff --git a/mkdru.module b/mkdru.module index 636eb92..72edab9 100644 --- a/mkdru.module +++ b/mkdru.module @@ -462,7 +462,8 @@ function mkdru_view($node, $view_mode) { */ function mkdru_block_info() { // facet blocks - $facets = variable_get('mkdru_facets'); + $blocks = array(); + $facets = variable_get('mkdru_facets', array()); foreach ($facets as $facet) { // NB: block caching is redundant for static content $blocks['mkdru_facet_' . $facet]['info'] = "mkdru - $facet " . t('facet');