Index: autologout.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autologout/autologout.module,v
retrieving revision 1.5.2.15
diff -u -r1.5.2.15 autologout.module
--- autologout.module	9 Jul 2008 03:49:30 -0000	1.5.2.15
+++ autologout.module	3 Oct 2008 15:52:49 -0000
@@ -4,7 +4,7 @@
 /**
  * @file
  * Used to automagically log out a user after a preset time, AjK May 2006
- * 
+ *
  * Converted to use Javascript Countdown timer as a helper module, jrglasgow Feb 2008
  */
 
@@ -97,7 +97,7 @@
       if (module_exists("countdowntimer")) {
         if (variable_get('countdowntimer_js_load_option', 0) != 1 ) {
           //
-          // Display the error on the block configure page and log the 
+          // Display the error on the block configure page and log the
           // other times the block is called without the settings enabled
           //
           drupal_set_message(l(t('Countdown Timer admin settings'),'admin/settings/countdowntimer').t('  for Javascript load options should be set to EVERY PAGE or this block will not display properly.'), 'error');
@@ -115,9 +115,9 @@
       }
       if (module_exists("countdowntimer")) {
         if (variable_get('countdowntimer_js_load_option', 0) != 1 ) {
-          //countdowntimer is not configured for every page, the block 
+          //countdowntimer is not configured for every page, the block
           //won't countdown on all pages otherwise.
-          //Log the error 
+          //Log the error
           $error_message = t('autologout block called and Countdown Timer admin settings is not set for EVERY PAGE');
           watchdog('configuration', $error_message);
           if (variable_get('error_level', 1) == 1 || strstr($_SERVER['SCRIPT_NAME'], 'update.php')) {
@@ -135,7 +135,7 @@
       $block['subject'] = _autologout_local_settings('block_title');
       $block['content'] = '
       <span class="countdowntimer">'. t('You will be automatically logged out at %this_date if this page is not refreshed before then.', array('%this_date' => date('r', $logout_time))). '
-        <span style="display:none" name="datetime">'. date('Y-m-d\TH:i:s', $logout_time) . '</span> 
+        <span style="display:none" name="datetime">'. date('Y-m-d\TH:i:s', $logout_time) . '</span>
         <span style="display:none" name="dir">down</span>
         <span style="display:none" name="format_txt">%hours%:%mins%:%secs%</span>
         <span style="display:none" name="threshold">5</span>
@@ -182,7 +182,7 @@
     if (!isset($_SESSION['lastaccess']) || ((int)$_SESSION['lastaccess'] + $timeout) > time()) {
       $_SESSION['lastaccess'] = time();
       if ($refresh = (int)_autologout_local_settings('refresh_delta')) {
-        $force_refresh = $timeout + $refresh;  
+        $force_refresh = $timeout + $refresh;
         drupal_set_html_head("\n  <meta http-equiv=\"refresh\" content=\"$force_refresh\" />");
         return;
       }
@@ -209,7 +209,7 @@
 
   _autologout_debug("autologout_user($op)");
 
-  if ($account->uid < 2) { 
+  if ($account->uid < 2) {
     return; // UID 0 or UID 1 not appliciable
   }
 
@@ -238,7 +238,7 @@
           '#type' => 'checkbox',
           '#title' => t('Disable inactivity Automated Logout'),
           '#default_value' => $account->autologout,
-          '#weight' => 10 
+          '#weight' => 10
         );
         return $form;
       }
@@ -247,7 +247,7 @@
       if(_autologout_user_in_by_user_role($account)) {
         if(isset($edit['autologout'])) {
           db_query("DELETE FROM {autologout} WHERE uid = %d", $account->uid);
-          db_query("INSERT INTO {autologout} SET uid = %d, setting = %d", 
+          db_query("INSERT INTO {autologout} SET uid = %d, setting = %d",
             $account->uid, $edit['autologout']);
           unset($edit['autologout']);
         }
@@ -271,7 +271,7 @@
   _autologout_debug("autologout_nodeapi($op)");
 
   // if a user is entering data then don't log them out or
-  // they will loose their work. There's nothing more 
+  // they will loose their work. There's nothing more
   // frustrating than entering alot of info only for a
   // website to throw it away!
 
@@ -296,7 +296,7 @@
  */
 function autologout_menu($may_cache) {
   if($may_cache) {
-    $items[] = array( 
+    $items[] = array(
       'path' => 'admin/settings/autologout',
       'title' => t('Automated Logout'),
       'description' => t('manage the Automated Logout features'),
@@ -361,8 +361,8 @@
    '#type' => 'checkbox',
    '#title' => t('Enable watchdog Automated Logout logging'),
    '#default_value' => _autologout_local_settings('use_watchdog'),
-   '#description' => t('Enable logging of ally logged out users')
-  ); 
+   '#description' => t('Enable logging of all logged out users')
+  );
   $form['autologout']['block_title']  = array(
     '#type' => 'textfield',
     '#title' => t('Block title'),
@@ -370,7 +370,7 @@
     '#size' => 40,
     '#description' => t('The title of the block')
   );
-  
+
   $form['autologout']['markup2'] = array(
     '#type' => 'markup',
     '#value' => theme('autologout_generic', 0),
@@ -381,17 +381,17 @@
       '#type' => 'select',
       '#title' => $role,
       '#options' => array('0' => t('Enforce'), '1' => t('Exclude'), '2' => t('By user')),
-      '#default_value' => _autologout_local_settings($role) 
+      '#default_value' => _autologout_local_settings($role)
     );
   }
- 
+
   $markup3_items = array(
     t('Enforce : all users in this role will be auto-logged out'),
-    t('Exculde : all users in this role are excluded from Automated Logout functionality'),
+    t('Exclude : all users in this role are excluded from Automated Logout functionality'),
     t('By user : all users in this role can select to switch off this functionality')
   );
-  $markup3 = theme('item_list', $markup3_items, t('Policy description')) . 
-             t('Please note, if a user is found to be in a role that allows disabling this feature, this overrides any enforcement'); 
+  $markup3 = theme('item_list', $markup3_items, t('Policy description')) .
+             t('Please note, if a user is found to be in a role that allows disabling this feature, this overrides any enforcement');
 
   $form['autologout']['markup3'] = array(
    '#type' => 'markup',
@@ -435,7 +435,7 @@
   foreach (user_roles(TRUE) as $role) {
     switch (_autologout_local_settings($role)) {
       case 0: // Enforce for all in this role
-        break; 
+        break;
       case 1: // Exclude all users in this role
         if (in_array($role, $local_user->roles)) {
           return TRUE;
@@ -445,7 +445,7 @@
         if (in_array($role, $local_user->roles)) {
           if (isset($local_user->autologout) && $local_user->autologout != 0) {
             return TRUE;
-          } 
+          }
         }
         break;
     }
@@ -463,8 +463,8 @@
     $local_user = user_load(array('uid' => $user->uid));
   }
   else {
-    $local_user = $passed_user;                                  
-  }  
+    $local_user = $passed_user;
+  }
 
   foreach (user_roles(TRUE) as $role) {
     if (_autologout_local_settings($role) == 2 && in_array($role, $local_user->roles)) {
