Index: comment_closer.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/commentcloser/comment_closer.module,v retrieving revision 1.10.2.2.2.9 diff -u -r1.10.2.2.2.9 comment_closer.module --- comment_closer.module 7 Mar 2009 02:52:23 -0000 1.10.2.2.2.9 +++ comment_closer.module 18 Oct 2010 16:16:17 -0000 @@ -49,6 +49,7 @@ $cc_form = array(); $cycle_length_list = array( + 'never' => t('never'), 'yearly' => t('yearly'), 'monthly' => t('monthly'), 'quarterly' => t('quarterly'), @@ -63,6 +64,7 @@ '#default_value' => variable_get('comment_closer_types', array()), '#options' => _comment_closer_nodeoptions(), ); + $cc_form['comment_closer_age'] = array( '#type' => 'textfield', '#title' => t('Older than'), @@ -71,12 +73,15 @@ '#size' => 10, '#required' => TRUE, ); + $cc_form['comment_closer_cycle_period'] = array( - '#type' => 'select', + '#type' => 'radios', '#title' => t('Execute'), - '#default_value' => variable_get('comment_closer_cycle_period', array('daily')), + '#default_value' => variable_get('comment_closer_cycle_period', 'never'), '#options' => $cycle_length_list, + '#attributes' => array('class' => 'container-inline'), ); + return system_settings_form($cc_form); } @@ -88,6 +93,10 @@ } function comment_closer_cron() { + $cycle = variable_get('comment_closer_cycle_period', 'weekly'); + if ($cycle == 'never') { + return; + } $now = time(); $current_date = getdate($now);