| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
// $Id$ |
// $Id: session_expire.module,v 1.1 2007/11/05 14:17:49 kbahey Exp $ |
| 4 |
|
|
| 5 |
// Copyright 2007 Khalid Baheyeldin http://2bits.com |
// Copyright 2007 Khalid Baheyeldin http://2bits.com |
| 6 |
|
|
| 31 |
'#value' => t('This module requires cron to be correctly configured and running for Drupal.'), |
'#value' => t('This module requires cron to be correctly configured and running for Drupal.'), |
| 32 |
); |
); |
| 33 |
|
|
| 34 |
$interval = drupal_map_assoc(array(10800, 21600, 43200, 86400, 172800, 259200, 604800), 'format_interval'); |
$interval = drupal_map_assoc(array(0, 7200, 10800, 21600, 43200, 86400, 172800, 259200, 604800), 'format_interval'); |
| 35 |
|
$interval['0'] = t('Everytime'); |
| 36 |
$form[SESSION_EXPIRE_INTERVAL] = array( |
$form[SESSION_EXPIRE_INTERVAL] = array( |
| 37 |
'#type' => 'select', |
'#type' => 'select', |
| 38 |
'#title' => t('Interval'), |
'#title' => t('Interval'), |
| 41 |
'#description' => t('Run the cleanup at the specified interval. This tells Drupal how often to run the cleanup. On a busy site, you want that to be more frequent (e.g. every day at a minimum). You don\'t want it to be too frequent though (e.g. every hour), as it can tie up the sessions table for a long time. Cron must be configured to run more frequently than the value you chose here.') |
'#description' => t('Run the cleanup at the specified interval. This tells Drupal how often to run the cleanup. On a busy site, you want that to be more frequent (e.g. every day at a minimum). You don\'t want it to be too frequent though (e.g. every hour), as it can tie up the sessions table for a long time. Cron must be configured to run more frequently than the value you chose here.') |
| 42 |
); |
); |
| 43 |
|
|
| 44 |
$period = drupal_map_assoc(array(43200, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval'); |
$period = drupal_map_assoc(array(1800, 3600, 7200, 10800, 21600, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval'); |
| 45 |
$period['1000000000'] = t('Never'); |
$period['1000000000'] = t('Never'); |
| 46 |
|
|
| 47 |
$form[SESSION_EXPIRE_AGE] = array( |
$form[SESSION_EXPIRE_AGE] = array( |