| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: admin.inc,v 1.1 2009/03/17 23:16:13 dww Exp $ 3 4 /** 5 * @file 6 * Code necessary for the project_usage administrative UI. 7 */ 8 9 /** 10 * Form builder for the module settings page. 11 */ 12 function project_usage_settings_form(&$form_state) { 13 $times = array( 14 3 * PROJECT_USAGE_YEAR, 15 2 * PROJECT_USAGE_YEAR, 16 1 * PROJECT_USAGE_YEAR, 17 26 * PROJECT_USAGE_WEEK, 18 12 * PROJECT_USAGE_WEEK, 19 8 * PROJECT_USAGE_WEEK, 20 4 * PROJECT_USAGE_WEEK, 21 ); 22 $age_options = drupal_map_assoc($times, 'format_interval'); 23 $form['project_usage_life_daily'] = array( 24 '#type' => 'select', 25 '#title' => t('Daily usage data lifespan'), 26 '#default_value' => variable_get('project_usage_life_daily', 4 * PROJECT_USAGE_WEEK), 27 '#options' => $age_options, 28 '#description' => t('Discard the daily usage data after this amount of time has passed.'), 29 ); 30 $form['project_usage_life_weekly_project'] = array( 31 '#type' => 'select', 32 '#title' => t('Weekly project data lifespan'), 33 '#default_value' => variable_get('project_usage_life_weekly_project', PROJECT_USAGE_YEAR), 34 '#options' => $age_options, 35 '#description' => t('Discard the weekly usage for project nodes after this amount of time has passed.'), 36 ); 37 $form['project_usage_life_weekly_release'] = array( 38 '#type' => 'select', 39 '#title' => t('Weekly release data lifespan'), 40 '#default_value' => variable_get('project_usage_life_weekly_release', 26 * PROJECT_USAGE_WEEK), 41 '#options' => $age_options, 42 '#description' => t('Discard the weekly usage for project nodes after this amount of time has passed.'), 43 ); 44 return system_settings_form($form); 45 } 46
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |