From 03986dbc175152dd60bd39420971a7bc0d4842bf Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Mon, 4 Apr 2011 02:21:09 +0000 Subject: [PATCH] Checkbox to set multiLimit option for facets. --- mkdru.install | 4 ++-- mkdru.module | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mkdru.install b/mkdru.install index 1792f22..3f7d0a7 100644 --- a/mkdru.install +++ b/mkdru.install @@ -61,13 +61,13 @@ function mkdru_install() { $settings['facets']['subject']['displayName'] = "Subject"; $settings['facets']['subject']['pz2Name'] = "subject"; $settings['facets']['subject']['limiter'] = "su"; - $settings['facets']['subject']['multiLimit'] = TRUE; + $settings['facets']['subject']['multiLimit'] = 1; $settings['facets']['subject']['max'] = 10; $settings['facets']['subject']['orderWeight'] = 2; $settings['facets']['author']['displayName'] = "Author"; $settings['facets']['author']['pz2Name'] = "author"; $settings['facets']['author']['limiter'] = "au"; - $settings['facets']['author']['multiLimit'] = FALSE; + $settings['facets']['author']['multiLimit'] = 0; $settings['facets']['author']['max'] = 10; $settings['facets']['author']['orderWeight'] = 3; variable_set('mkdru_defaults', $settings); diff --git a/mkdru.module b/mkdru.module index 2ee892c..e8631b8 100644 --- a/mkdru.module +++ b/mkdru.module @@ -221,6 +221,11 @@ function mkdru_settings_form(&$form_state) { '#default_value' => $settings['facets'][$facet]['limiter'], '#size' => 5, ); + $form['settings']['facets'][$facet]['multiLimit'] = array( + '#type' => 'checkbox', + '#title' => t('Allow multiple limits?'), + '#default_value' => $settings['facets'][$facet]['multiLimit'], + ); $form['settings']['facets'][$facet]['max'] = array( '#type' => 'textfield', '#title' => t('Number of terms to display'), -- 1.7.10.4