Index: session_expire.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/session_expire/session_expire.module,v
retrieving revision 1.2
diff -u -r1.2 session_expire.module
--- session_expire.module	27 Nov 2008 16:46:00 -0000	1.2
+++ session_expire.module	3 Dec 2008 15:38:51 -0000
@@ -1,24 +1,32 @@
-<?php 
+<?php
+// $Id$
 
-// $Id: session_expire.module,v 1.2 2008/11/27 16:46:00 kbahey Exp $
-
-// Copyright 2007 Khalid Baheyeldin http://2bits.com
+/**
+ * @file
+ * Expires rows from the session table older than a certain time.
+ *
+ * @copyright Copyright 2007 Khalid Baheyeldin http://2bits.com
+ */
 
 define('SESSION_EXPIRE_INTERVAL', 'session_expire_interval');
 define('SESSION_EXPIRE_AGE',      'session_expire_age');
 define('SESSION_EXPIRE_MODE',     'session_expire_mode');
 define('SESSION_EXPIRE_LAST',     'session_expire_last');
 
+/**
+ * Implementation of hook_menu().
+ *
+ * @return array
+ */
 function session_expire_menu() {
-  $items = array();
-	$items['admin/settings/session_expire'] = array(
-		'type'               => MENU_NORMAL_ITEM,
-		'title'              => t('Session expire'),
-		'description'        => t('Settings for session expiry'),
-		'page callback'      => 'drupal_get_form',
-		'page arguments'     => array('session_expire_settings'),
-		'access arguments'   => array('administer site configuration'),
-	);
+  $items['admin/settings/session_expire'] = array(
+    'type'               => MENU_NORMAL_ITEM,
+    'title'              => 'Session expire',
+    'description'        => 'Settings for session expiry',
+    'page callback'      => 'drupal_get_form',
+    'page arguments'     => array('session_expire_settings'),
+    'access arguments'   => array('administer site configuration'),
+  );
   return $items;
 }
 
@@ -62,6 +70,9 @@
   return system_settings_form($form);
 }
 
+/**
+ * Implementation of hook_cron().
+ */
 function session_expire_cron() {
   // Check if it is the first time this hook fires
   $last_run_time = variable_get(SESSION_EXPIRE_LAST, 0);
@@ -75,6 +86,7 @@
     $timestamp = time() - variable_get(SESSION_EXPIRE_AGE, 604800);
 
     // Check if we should delete anonymous only or both anonymous and authenticated users
+    $extra_cond = '';
     $mode = variable_get(SESSION_EXPIRE_MODE, 0);
     if (!$mode) {
       $extra_cond = 'AND uid = 0';
