Index: auto_expire.module
===================================================================
--- auto_expire.module	(revision 33619)
+++ auto_expire.module	(working copy)
@@ -3,7 +3,8 @@
 
 /**
  * @file
- * Auto Expire automatically expires nodes after a node has been published for a certain time.
+ * Auto Expire automatically expires nodes after a node has been published for a 
+ * certain time.
  * The module can also send out warnings before expiry and purge expired nodes afterwards.
  */
 
@@ -57,10 +58,28 @@
   return $items;
 }
 
+/**
+ * Gets expiry setting for the specified node's content type
+ *
+ * @param $node object
+ *   a node object
+ *
+ * @returns
+ *   expiry time, or 0 if it doesn't expire
+ */
 function _auto_expire_is_expiring_node($node) {
   return variable_get(AUTO_EXPIRE_NODE_TYPE . $node->type .'_e', 0);
 }
 
+/**
+ * Determines if a user can extend the specified nide
+ *
+ * @param $nid int
+ *   a node ID
+ *
+ * @returns boolean
+ *   true if the node can be extended by this user, else false
+ */
 function _auto_expire_can_user_extend($nid) {
   global $user;
   
@@ -76,6 +95,17 @@
   }
 }
 
+/**
+ * defines the form for extending expiry
+ *
+ * @param $form_state
+ *   current form state
+ * @param $nid int
+ *   node ID
+ *
+ * @return array
+ *   Form API array
+ */
 function _auto_expire_expiry(&$form_state, $nid) {
   $node = node_load($nid);
   
@@ -144,6 +174,9 @@
   return $form;
 }
 
+/**
+ * Submit handler for expiry extend
+ */
 function _auto_expire_expiry_submit($form, &$form_state) {
   $node = node_load($form_state['values']['nid']);
   $expire = $form_state['values']['expire'];
@@ -159,6 +192,9 @@
   $form_state['redirect'] = "node/$node->nid/expiry";
 }
 
+/**
+ * Admin settings form
+ */
 function _auto_expire_admin_settings() {
   $form = array();
   
@@ -428,6 +464,22 @@
   }
 }
 
+/**
+ * Emails a warning that a node will soon expire
+ *
+ * @param $nid int
+ *   node ID
+ * @param $title string
+ *   node title
+ * @param $type string
+ *   node type
+ * @param $days int
+ *   number of days 
+ * @param $subject string
+ *   email subject line
+ * @param $body string
+ *   email body
+ */
 function _auto_expire_notify_warning($nid, $title, $type, $days, $subject, $body) {
   $args = array(
     '!type' => $type,
@@ -443,6 +495,22 @@
   _auto_expire_notify($nid, 'auto_expire_warning', $subject, $body, $args);
 }
 
+/**
+ * Emails a notification that a node has expired
+ *
+ * @param $nid int
+ *   node ID
+ * @param $title string
+ *   node title
+ * @param $type string
+ *   node type
+ * @param $days int
+ *   number of days 
+ * @param $subject string
+ *   email subject line
+ * @param $body string
+ *   email body
+ */
 function _auto_expire_notify_expired($nid, $title, $type, $days, $subject, $body) {
   $args = array(
     '!type' => $type,
@@ -457,6 +525,20 @@
   _auto_expire_notify($nid, 'auto_expire_expired', $subject, $body, $args);
 }
 
+/**
+ * Send email to node author
+ *
+ * @param $nid int
+ *   node ID
+ * @param $mailkey string
+ *   key for hook_mail to switch on
+ * @param $subject string
+ *   email subject line
+ * @param $body string
+ *   email body
+ * @param $args array
+ *   arguments to be parsed into the subject and body
+ */
 function _auto_expire_notify($nid, $mailkey, $subject, $body, $args) {
   if (!empty($subject)) {
     $result = db_query('SELECT u.mail FROM {users} u, {node} n WHERE n.nid = %d AND n.uid = u.uid AND u.status=1 AND u.uid>0', $nid);
@@ -505,6 +587,12 @@
   }
 }
 
+/**
+ * Gets expiry for given node
+ *
+ * @param $nid int
+ *   node ID
+ */
 function _auto_expire_get_expire($nid) {
   return db_result(db_query('SELECT expire FROM {auto_expire} WHERE nid = %d', $nid));
 }
Index: auto_expire.inc
===================================================================
--- auto_expire.inc	(revision 33619)
+++ auto_expire.inc	(working copy)
@@ -6,15 +6,42 @@
  * Define constants for the Auto Expire module
  */
 
- // Content types that auto expire
+/**
+ * variable prefix for expiring node types
+ */
 define('AUTO_EXPIRE_NODE_TYPE', 'auto_expire_');
+
+/**
+ * variable prefix for mail settings
+ */
 define('AUTO_EXPIRE_EMAIL', 'auto_expire_email_');
 
-// Permissions
+/**
+ * Administration permission
+ */
 define('ADMINISTER_AUTO_EXPIRE', 'administer auto expire');
+
+/**
+ * Extend own content permission
+ */
 define('EXTEND_AUTO_EXPIRE_OWN', 'extend expiring own content');
+
+/**
+ * Extend all content permission
+ */
 define('EXTEND_AUTO_EXPIRE_ALL', 'extend expiring all content');
 
+/**
+ * Default expiry period
+ */
 define('AUTO_EXPIRE_DAYS', 30);
+
+/**
+ * Default warning period
+ */
 define('AUTO_EXPIRE_WARN', 5);
+
+/**
+ * Default purge period
+ */
 define('AUTO_EXPIRE_PURGE', 60);
