From e549e9d5f24f6b473a3a8b710989b27c9f28e7bd Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Tue, 29 Mar 2011 21:22:40 +0000 Subject: [PATCH] Remove dependencies (Hasse's patch) --- mkdru.install | 5 +++-- mkdru.module | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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'); -- 1.7.10.4