diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/aggregator/aggregator.admin.inc ./modules/aggregator/aggregator.admin.inc
--- ../drupal-6.x-dev/modules/aggregator/aggregator.admin.inc	2007-12-04 17:34:27.000000000 +0100
+++ ./modules/aggregator/aggregator.admin.inc	2007-12-12 23:25:59.000000000 +0100
@@ -13,6 +13,12 @@ function aggregator_admin_overview() {
   return aggregator_view();
 }
 
+/**
+ * Displays the aggregator administration page.
+ *
+ * @return
+ *   The page HTML.
+ */
 function aggregator_view() {
   $result = db_query('SELECT f.*, COUNT(i.iid) AS items FROM {aggregator_feed} f LEFT JOIN {aggregator_item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.etag, f.modified, f.image, f.block ORDER BY f.title');
 
@@ -100,7 +106,6 @@ function aggregator_form_feed(&$form_sta
   return $form;
 }
 
-
 /**
  * Validate aggregator_form_feed form submissions.
  */
@@ -130,6 +135,7 @@ function aggregator_form_feed_validate($
 
 /**
  * Process aggregator_form_feed form submissions.
+ *
  * @todo Add delete confirmation dialog.
  */
 function aggregator_form_feed_submit($form, &$form_state) {
@@ -172,6 +178,9 @@ function aggregator_form_feed_submit($fo
 
 /**
  * Menu callback; removes all items from a feed, then redirects to the overview page.
+ *
+ * @param $feed
+ *   An associative array describing the feed to be cleared.
  */
 function aggregator_admin_remove_feed($feed) {
   aggregator_remove($feed);
@@ -180,6 +189,9 @@ function aggregator_admin_remove_feed($f
 
 /**
  * Menu callback; refreshes a feed, then redirects to the overview page.
+ *
+ * @param $feed
+ *   An associative array describing the feed to be refreshed.
  */
 function aggregator_admin_refresh_feed($feed) {
   aggregator_refresh($feed);
@@ -271,6 +283,7 @@ function aggregator_form_category_valida
 
 /**
  * Process aggregator_form_category form submissions.
+ *
  * @todo Add delete confirmation dialog.
  */
 function aggregator_form_category_submit($form, &$form_state) {
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/aggregator/aggregator.module ./modules/aggregator/aggregator.module
--- ../drupal-6.x-dev/modules/aggregator/aggregator.module	2007-12-08 15:06:20.000000000 +0100
+++ ./modules/aggregator/aggregator.module	2007-12-12 23:25:59.000000000 +0100
@@ -246,20 +246,33 @@ function aggregator_menu() {
   return $items;
 }
 
+/**
+ * Menu callback.
+ *
+ * @return
+ *   An aggregator category title.
+ */
 function _aggregator_category_title($category) {
   return $category['title'];
 }
 
+/**
+ * Implementation of hook_init().
+ */
 function aggregator_init() {
   drupal_add_css(drupal_get_path('module', 'aggregator') .'/aggregator.css');
 }
 
+/**
+ * Find out whether there are any aggregator categories.
+ *
+ * @return
+ *   TRUE if there is at least one category and the user has access to them, FALSE otherwise.
+ */
 function _aggregator_has_categories() {
   return user_access('access news feeds') && db_result(db_query('SELECT COUNT(*) FROM {aggregator_category}'));
 }
 
-
-
 /**
  * Implementation of hook_perm().
  */
@@ -353,6 +366,9 @@ function aggregator_block($op = 'list', 
 
 /**
  * Add/edit/delete aggregator categories.
+ *
+ * @param $edit
+ *   An associative array describing the category to be added/edited/deleted.
  */
 function aggregator_save_category($edit) {
   $link_path = 'aggregator/categories/';
@@ -381,6 +397,9 @@ function aggregator_save_category($edit)
 
 /**
  * Add/edit/delete an aggregator feed.
+ *
+ * @param $edit
+ *   An associative array describing the feed to be added/edited/deleted.
  */
 function aggregator_save_feed($edit) {
   if (!empty($edit['fid'])) {
@@ -419,6 +438,12 @@ function aggregator_save_feed($edit) {
   }
 }
 
+/**
+ * Removes all items from a feed.
+ *
+ * @param $feed
+ *   An associative array describing the feed to be cleared.
+ */
 function aggregator_remove($feed) {
   $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = %d', $feed['fid']);
   while ($item = db_fetch_object($result)) {
@@ -547,6 +572,9 @@ function aggregator_element_data($parser
 
 /**
  * Checks a news feed for new items.
+ *
+ * @param $feed
+ *   An associative array describing the feed to be refreshed.
  */
 function aggregator_refresh($feed) {
   global $channel, $image;
@@ -634,8 +662,10 @@ function aggregator_refresh($feed) {
  * See http://www.w3.org/TR/NOTE-datetime for more information.
  * Originally from MagpieRSS (http://magpierss.sourceforge.net/).
  *
- * @param $date_str A string with a potentially W3C DTF date.
- * @return A timestamp if parsed successfully or -1 if not.
+ * @param $date_str
+ *   A string with a potentially W3C DTF date.
+ * @return
+ *   A timestamp if parsed successfully or FALSE if not.
  */
 function aggregator_parse_w3cdtf($date_str) {
   if (preg_match('/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/', $date_str, $match)) {
@@ -665,6 +695,16 @@ function aggregator_parse_w3cdtf($date_s
   }
 }
 
+/**
+ * Parse a feed and store its items.
+ *
+ * @param $data
+ *   The feed data.
+ * @param $feed
+ *   An associative array describing the feed to be parsed.
+ * @return
+ *   0 on error, 1 otherwise.
+ */
 function aggregator_parse_feed(&$data, $feed) {
   global $items, $image, $channel;
 
@@ -806,6 +846,12 @@ function aggregator_parse_feed(&$data, $
   return 1;
 }
 
+/**
+ * Add/edit/delete an aggregator item.
+ *
+ * @param $edit
+ *   An associative array describing the item to be added/edited/deleted.
+ */
 function aggregator_save_item($edit) {
   if ($edit['iid'] && $edit['title']) {
     db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['guid'], $edit['timestamp'], $edit['iid']);
@@ -825,6 +871,14 @@ function aggregator_save_item($edit) {
   }
 }
 
+/**
+ * Load an aggregator feed.
+ *
+ * @param $fid
+ *   The feed id.
+ * @return
+ *   An associative array describing the feed.
+ */
 function aggregator_feed_load($fid) {
   static $feeds;
   if (!isset($feeds[$fid])) {
@@ -833,6 +887,14 @@ function aggregator_feed_load($fid) {
   return $feeds[$fid];
 }
 
+/**
+ * Load an aggregator category.
+ *
+ * @param $cid
+ *   The category id.
+ * @return
+ *   An associative array describing the category.
+ */
 function aggregator_category_load($cid) {
   static $categories;
   if (!isset($categories[$cid])) {
@@ -844,6 +906,12 @@ function aggregator_category_load($cid) 
 /**
  * Format an individual feed item for display in the block.
  *
+ * @param $item
+ *   The item to be displayed.
+ * @param $feed
+ *   Not used.
+ * @return
+ *   The item HTML.
  * @ingroup themeable
  */
 function theme_aggregator_block_item($item, $feed = 0) {
@@ -864,6 +932,11 @@ function theme_aggregator_block_item($it
 
 /**
  * Safely render HTML content, as allowed.
+ *
+ * @param $value
+ *   The content to be filtered.
+ * @return
+ *   The filtered content.
  */
 function aggregator_filter_xss($value) {
   return filter_xss($value, preg_split('/\s+|<|>/', variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'), -1, PREG_SPLIT_NO_EMPTY));
@@ -871,6 +944,11 @@ function aggregator_filter_xss($value) {
 
 /**
  * Helper function for drupal_map_assoc.
+ *
+ * @param $count
+ *   Items count.
+ * @return
+ *   Plural-formatted "@count items"
  */
 function _aggregator_items($count) {
   return format_plural($count, '1 item', '@count items');
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/aggregator/aggregator.pages.inc ./modules/aggregator/aggregator.pages.inc
--- ../drupal-6.x-dev/modules/aggregator/aggregator.pages.inc	2007-10-16 15:48:11.000000000 +0200
+++ ./modules/aggregator/aggregator.pages.inc	2007-12-12 23:25:59.000000000 +0100
@@ -8,6 +8,9 @@
 
 /**
  * Menu callback; displays the most recent items gathered from any feed.
+ *
+ * @return
+ *   The items HTML.
  */
 function aggregator_page_last() {
   drupal_add_feed(url('aggregator/rss'), variable_get('site_name', 'Drupal') .' '. t('aggregator'));
@@ -19,6 +22,15 @@ function aggregator_page_last() {
 
 /**
  * Menu callback; displays all the items captured from a particular feed.
+ *
+ * If there are two arguments then this function is the categorize form.
+ *
+ * @param $arg1
+ *   If there are two arguments then $arg1 is $form_state. Otherwise, $arg1 is $feed.
+ * @param $arg2
+ *   If there are two arguments then $arg2 is feed.
+ * @return
+ *   The items HTML.
  */
 function aggregator_page_source($arg1, $arg2 = NULL) {
   // If there are two arguments then this function is the categorize form, and
@@ -37,6 +49,15 @@ function aggregator_page_source($arg1, $
 
 /**
  * Menu callback; displays all the items aggregated in a particular category.
+ *
+ * If there are two arguments then this function is called as a form.
+ *
+ * @param $arg1
+ *   If there are two arguments then $arg1 is $form_state. Otherwise, $arg1 is $category.
+ * @param $arg2
+ *   If there are two arguments then $arg2 is $category.
+ * @return
+ *   The items HTML.
  */
 function aggregator_page_category($arg1, $arg2 = NULL) {
   drupal_set_breadcrumb(array_merge(drupal_get_breadcrumb(), array(l(t('Categories'), 'aggregator/categories'))));
@@ -54,7 +75,12 @@ function aggregator_page_category($arg1,
 }
 
 /**
- * Load feed items by passing a sql query.
+ * Load feed items by passing a SQL query.
+ *
+ * @param $sql
+ *   The query to be executed.
+ * @return
+ *   An array of the feed items.
  */
 function aggregator_feed_items_load($sql) {
   $items = array();
@@ -73,8 +99,18 @@ function aggregator_feed_items_load($sql
 }
 
 /**
- * Prints an aggregator page listing a number of feed items. Various
- * menu callbacks use this function to print their feeds.
+ * Prints an aggregator page listing a number of feed items.
+ *
+ * Various menu callbacks use this function to print their feeds.
+ *
+ * @param $items
+ *   The items to be listed.
+ * @param $op
+ *   Which form should be added to the items. Only 'categorize' is now recognized.
+ * @param $feed_source
+ *   The feed source URL.
+ * @return
+ *   The items HTML.
  */
 function _aggregator_page_list($items, $op, $feed_source = '') {
   if (user_access('administer news feeds') && ($op == 'categorize')) {
@@ -95,6 +131,12 @@ function _aggregator_page_list($items, $
 /**
  * Form builder; build the page list form.
  *
+ * @param $items
+ *   An array of the feed items.
+ * @param $feed_source
+ *   The feed source URL.
+ * @return
+ *   The form structure.
  * @ingroup forms
  * @see aggregator_categorize_items_validate().
  * @see aggregator_categorize_items_submit().
@@ -135,12 +177,18 @@ function aggregator_categorize_items($it
   return $form;
 }
 
+/**
+ * Validate aggregator_categorize_items form submissions.
+ */
 function aggregator_categorize_items_validate($form_id, &$form) {
   if (!user_access('administer news feeds')) {
     form_error($form, t('You are not allowed to categorize this feed item.'));
   }
 }
 
+/**
+ * Process aggregator_categorize_items form submissions.
+ */
 function aggregator_categorize_items_submit($form, &$form_state) {
   foreach ($form_state['values']['categories'] as $iid => $selection) {
     db_query('DELETE FROM {aggregator_category_item} WHERE iid = %d', $iid);
@@ -156,6 +204,10 @@ function aggregator_categorize_items_sub
 /**
  * Theme the page list form for assigning categories.
  *
+ * @param $form
+ *   An associative array containing the structure of the form.
+ * @return
+ *   The output HTML.
  * @ingroup themeable
  */
 function theme_aggregator_categorize_items($form) {
@@ -180,9 +232,6 @@ function theme_aggregator_categorize_ite
 /**
  * Process variables for aggregator-wrapper.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $content
- *
  * @see aggregator-wrapper.tpl.php
  */
 function template_preprocess_aggregator_wrapper(&$variables) {
@@ -192,9 +241,6 @@ function template_preprocess_aggregator_
 /**
  * Process variables for aggregator-item.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $item
- *
  * @see aggregator-item.tpl.php
  */
 function template_preprocess_aggregator_item(&$variables) {
@@ -294,8 +340,12 @@ function aggregator_page_rss() {
 }
 
 /**
- * Theme the rss output.
+ * Theme the RSS output.
  *
+ * @param $feeds
+ *   An array of the feeds to theme.
+ * @param $category
+ *   A common category, if any, for all the feeds.
  * @ingroup themeable
  */
 function theme_aggregator_page_rss($feeds, $category = NULL) {
@@ -340,6 +390,11 @@ function theme_aggregator_page_rss($feed
 
 /**
  * Menu callback; generates an OPML representation of all feeds.
+ *
+ * @param $cid
+ *   If set, feeds are exported only from a category with this ID. Otherwise, all feeds are exported.
+ * @return
+ *   The output XML.
  */
 function aggregator_page_opml($cid = NULL) {
   if ($cid) {
@@ -357,8 +412,10 @@ function aggregator_page_opml($cid = NUL
 }
 
 /**
- * Theme the opml feed output.
+ * Theme the OPML feed output.
  *
+ * @param $feeds
+ *   An array of the feeds to theme.
  * @ingroup themeable
  */
 function theme_aggregator_page_opml($feeds) {
@@ -385,10 +442,6 @@ function theme_aggregator_page_opml($fee
 /**
  * Process variables for aggregator-summary-items.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $summary_items
- * - $source
- *
  * @see aggregator-summary-item.tpl.php
  */
 function template_preprocess_aggregator_summary_items(&$variables) {
@@ -400,9 +453,6 @@ function template_preprocess_aggregator_
 /**
  * Process variables for aggregator-summary-item.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $item
- *
  * @see aggregator-summary-item.tpl.php
  */
 function template_preprocess_aggregator_summary_item(&$variables) {
@@ -423,9 +473,6 @@ function template_preprocess_aggregator_
 /**
  * Process variables for aggregator-feed-source.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $feed
- *
  * @see aggregator-feed-source.tpl.php
  */
 function template_preprocess_aggregator_feed_source(&$variables) {
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/comment/comment.admin.inc ./modules/comment/comment.admin.inc
--- ../drupal-6.x-dev/modules/comment/comment.admin.inc	2007-10-31 18:50:47.000000000 +0100
+++ ./modules/comment/comment.admin.inc	2007-12-12 23:25:59.000000000 +0100
@@ -23,6 +23,12 @@ function comment_admin($type = 'new') {
 /**
  * Form builder; Builds the comment overview form for the admin.
  *
+ * @param $type
+ *   Not used.
+ * @param $arg
+ *   Current path's fourth component deciding the form type (Published comments/Approval queue)
+ * @return
+ *   The form structure.
  * @ingroup forms
  * @see comment_admin_overview_validate().
  * @see comment_admin_overview_submit().
@@ -70,6 +76,8 @@ function comment_admin_overview($type = 
 }
 
 /**
+ * Validate comment_admin_overview form submissions.
+ *
  * We can't execute any 'Update options' if no comments were selected.
  */
 function comment_admin_overview_validate($form, &$form_state) {
@@ -81,6 +89,8 @@ function comment_admin_overview_validate
 }
 
 /**
+ * Process comment_admin_overview form submissions.
+ *
  * Execute the chosen 'Update option' on the selected comments, such as
  * publishing, unpublishing or deleting.
  */
@@ -110,6 +120,8 @@ function comment_admin_overview_submit($
 /**
  * Theme the comment admin form.
  *
+ * @param $form
+ *   An associative array containing the structure of the form.
  * @ingroup themeable
  */
 function theme_comment_admin_overview($form) {
@@ -144,6 +156,10 @@ function theme_comment_admin_overview($f
  * List the selected comments and verify that the admin really wants to delete
  * them.
  *
+ * @param $form_state
+ *   An associative array containing the current state of the form.
+ * @return
+ *   TRUE if the comments should be deleted, FALSE otherwise.
  * @ingroup forms
  * @see comment_multiple_delete_confirm_submit().
  */
@@ -176,6 +192,8 @@ function comment_multiple_delete_confirm
 }
 
 /**
+ * Process comment_multiple_delete_confirm form submissions.
+ *
  * Perform the actual comment deletion.
  */
 function comment_multiple_delete_confirm_submit($form, &$form_state) {
@@ -193,6 +211,9 @@ function comment_multiple_delete_confirm
 
 /**
  * Menu callback; delete a comment.
+ *
+ * @param $cid
+ *   The comment do be deleted.
  */
 function comment_delete($cid = NULL) {
   $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
@@ -229,6 +250,9 @@ function comment_confirm_delete(&$form_s
     'comment_confirm_delete');
 }
 
+/**
+ * Process comment_confirm_delete form submissions.
+ */
 function comment_confirm_delete_submit($form, &$form_state) {
   drupal_set_message(t('The comment and all its replies have been deleted.'));
 
@@ -246,6 +270,12 @@ function comment_confirm_delete_submit($
   return;
 }
 
+/**
+ * Perform the actual deletion of a comment and all its replies.
+ *
+ * @param $comment
+ *   An associative array describing the comment to be deleted.
+ */
 function _comment_delete_thread($comment) {
   if (!is_object($comment) || !is_numeric($comment->cid)) {
     watchdog('content', 'Cannot delete non-existent comment.', WATCHDOG_WARNING);
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/comment/comment.install ./modules/comment/comment.install
--- ../drupal-6.x-dev/modules/comment/comment.install	2007-12-08 15:06:21.000000000 +0100
+++ ./modules/comment/comment.install	2007-12-12 23:25:59.000000000 +0100
@@ -10,8 +10,7 @@ function comment_enable() {
 }
 
 /**
- * Changed node_comment_statistics to use node->changed to avoid future
- * timestamps.
+ * Changed node_comment_statistics to use node->changed to avoid future timestamps.
  */
 function comment_update_1() {
   // Change any future last comment timestamps to now.
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/comment/comment.module ./modules/comment/comment.module
--- ../drupal-6.x-dev/modules/comment/comment.module	2007-12-08 15:06:21.000000000 +0100
+++ ./modules/comment/comment.module	2007-12-12 23:29:23.000000000 +0100
@@ -138,7 +138,7 @@ function comment_help($path, $arg) {
 }
 
 /**
- * Implementation of hook_theme()
+ * Implementation of hook_theme().
  */
 function comment_theme() {
   return array(
@@ -245,7 +245,6 @@ function comment_menu() {
 
 /**
  * Implementation of hook_node_type().
- *
  */
 function comment_node_type($op, $info) {
   $settings = array(
@@ -300,8 +299,11 @@ function comment_block($op = 'list', $de
  *   2. Loading the information from the comments table based on the nids found
  *      in step 1.
  *
- * @param $number (optional) The maximum number of comments to find.
- * @return $comments An array of comment objects each containing a nid,
+ * @param $number
+ *   (optional) The maximum number of comments to find.
+ * @return
+ *   $comments
+ *   An array of comment objects each containing a nid,
  *   subject, cid, and timestamp, or an empty array if there are no recent
  *   comments visible to the current user.
  */
@@ -331,6 +333,15 @@ function comment_get_recent($number = 10
 
 /**
  * Calculate page number for first new comment.
+ *
+ * @param $num_comments
+ *   Number of comments.
+ * @param $new_replies
+ *   Number of new replies.
+ * @param $node
+ *   The first new comment node.
+ * @return
+ *   "page=X" if the page number is greater than zero; empty string otherwise.
  */
 function comment_new_page_count($num_comments, $new_replies, $node) {
   $comments_per_page = _comment_get_display_setting('comments_per_page', $node);
@@ -373,9 +384,10 @@ function comment_new_page_count($num_com
 }
 
 /**
- * Returns a formatted list of recent comments to be displayed in the comment
- * block.
+ * Returns a formatted list of recent comments to be displayed in the comment block.
  *
+ * @return
+ *   The comment list HTML.
  * @ingroup themeable
  */
 function theme_comment_block() {
@@ -471,6 +483,9 @@ function comment_link($type, $node = NUL
   return $links;
 }
 
+/**
+ * Implementation of hook_form_alter().
+ */
 function comment_form_alter(&$form, $form_state, $form_id) {
   if ($form_id == 'node_type_form' && isset($form['identity']['type'])) {
     $form['comment'] = array(
@@ -575,7 +590,6 @@ function comment_form_alter(&$form, $for
 
 /**
  * Implementation of hook_nodeapi().
- *
  */
 function comment_nodeapi(&$node, $op, $arg = 0) {
   switch ($op) {
@@ -637,6 +651,13 @@ function comment_user($type, $edit, &$us
  * Authenticated users can edit their comments as long they have not been
  * replied to. This prevents people from changing or revising their
  * statements based on the replies to their posts.
+ *
+ * @param $op
+ *   The operation that is to be performed on the comment. Only 'edit' is recognized now.
+ * @param $comment
+ *   The comment object.
+ * @return
+ *   TRUE if the current user has acces to the comment, FALSE otherwise.
  */
 function comment_access($op, $comment) {
   global $user;
@@ -646,6 +667,12 @@ function comment_access($op, $comment) {
   }
 }
 
+/**
+ * A simple helper function.
+ *
+ * @return
+ *   The 0th and the 1st path components joined by a slash.
+ */
 function comment_node_url() {
   return arg(0) .'/'. arg(1);
 }
@@ -767,6 +794,16 @@ function comment_save($edit) {
   }
 }
 
+/**
+ * Build command links for a comment (e.g.\ edit, reply, delete) with respect to the current user's access permissions.
+ *
+ * @param $comment
+ *   The comment to which the links will be related.
+ * @param $return
+ *   Not used.
+ * @return
+ *   An associative array containing the links.
+ */
 function comment_links($comment, $return = 1) {
   global $user;
 
@@ -821,8 +858,10 @@ function comment_links($comment, $return
  * Renders comment(s).
  *
  * @param $node
+ *
  *   The node which comment(s) needs rendering.
  * @param $cid
+ *
  *   Optional, if given, only one comment is rendered.
  *
  * To display threaded comments in the correct order we keep a 'thread' field
@@ -1025,6 +1064,11 @@ function comment_render($node, $cid = 0)
 /**
  * Comment operations. We offer different update operations depending on
  * which comment administration page we're on.
+ *
+ * @param $action
+ *   The comment administration page.
+ * @return
+ *   An associative array containing the offered operations.
  */
 function comment_operations($action = NULL) {
   if ($action == 'publish') {
@@ -1055,11 +1099,24 @@ function comment_operations($action = NU
 
 /**
  * Load the entire comment by cid.
+ *
+ * @param $cid
+ *   The identifying comment id.
+ * @return
+ *   The comment object.
  */
 function _comment_load($cid) {
   return db_fetch_object(db_query('SELECT * FROM {comments} WHERE cid = %d', $cid));
 }
 
+/**
+ * Get comment count for a node.
+ *
+ * @param $nid
+ *   The node id.
+ * @return
+ *   The comment count.
+ */
 function comment_num_all($nid) {
   static $cache;
 
@@ -1069,6 +1126,14 @@ function comment_num_all($nid) {
   return $cache[$nid];
 }
 
+/**
+ * Get replies count for a comment.
+ *
+ * @param $pid
+ *   The comment id.
+ * @return
+ *   The replies count.
+ */
 function comment_num_replies($pid) {
   static $cache;
 
@@ -1080,10 +1145,12 @@ function comment_num_replies($pid) {
 }
 
 /**
- * get number of new comments for current user and specified node
+ * Get number of new comments for current user and specified node.
  *
- * @param $nid node-id to count comments for
- * @param $timestamp time to count from (defaults to time of last user access
+ * @param $nid
+ *   node-id to count comments for
+ * @param $timestamp
+ *   time to count from (defaults to time of last user access
  *   to node)
  */
 function comment_num_new($nid, $timestamp = 0) {
@@ -1108,6 +1175,14 @@ function comment_num_new($nid, $timestam
 
 }
 
+/**
+ * Validate comment data.
+ *
+ * @param $edit
+ *   An associative array containig the comment data.
+ * @return
+ *   The original $edit.
+ */
 function comment_validate($edit) {
   global $user;
 
@@ -1163,10 +1238,11 @@ function comment_validate($edit) {
 /**
  * Generate the basic commenting form, for appending to a node or display on a separate page.
  *
+ * @param $title
+ *   Not used.
  * @ingroup forms
  * @see comment_form_validate().
  * @see comment_form_submit().
- *
  */
 function comment_form(&$form_state, $edit, $title = NULL) {
   global $user;
@@ -1333,10 +1409,23 @@ function comment_form(&$form_state, $edi
   return $form;
 }
 
+/**
+ * Theme the comment form box.
+ *
+ * @param $edit
+ *   The form structure.
+ * @param $title
+ *   The form title.
+ */
 function comment_form_box($edit, $title = NULL) {
   return theme('box', $title, drupal_get_form('comment_form', $edit, $title));
 }
 
+/**
+ * Form builder; Generate and validate a comment preview form.
+ *
+ * @ingroup forms
+ */
 function comment_form_add_preview($form, &$form_state) {
   global $user;
   $edit = $form_state['values'];
@@ -1397,6 +1486,9 @@ function comment_form_add_preview($form,
   return $form;
 }
 
+/**
+ * Validate comment form submissions.
+ */
 function comment_form_validate($form, &$form_state) {
   global $user;
   if ($user->uid === 0) {
@@ -1410,6 +1502,12 @@ function comment_form_validate($form, &$
   comment_validate($form_state['values']);
 }
 
+/**
+ * Prepare a comment for submission.
+ *
+ * @param $comment_values
+ *   An associative array containing the comment data.
+ */
 function _comment_form_submit(&$comment_values) {
   $comment_values += array('subject' => '');
   if (!isset($comment_values['date'])) {
@@ -1438,6 +1536,9 @@ function _comment_form_submit(&$comment_
   }
 }
 
+/**
+ * Process comment form submissions; prepare the comment, store it, and set a redirection target.
+ */
 function comment_form_submit($form, &$form_state) {
   _comment_form_submit($form_state['values']);
   if ($cid = comment_save($form_state['values'])) {
@@ -1449,11 +1550,19 @@ function comment_form_submit($form, &$fo
 }
 
 /**
- * Return a themed comment.
+ * Theme a single comment block.
  *
+ * @param $comment
+ *   The comment object.
+ * @param $node
+ *   The comment node.
+ * @param $links
+ *   An associative array containing control links.
+ * @param $visible
+ *   Switches between folded/unfolded view.
  * @ingroup themeable
  */
-function theme_comment_view($comment, $node, $links = array(), $visible = 1) {
+function theme_comment_view($comment, $node, $links = array(), $visible = TRUE) {
   static $first_new = TRUE;
 
   $output = '';
@@ -1483,6 +1592,18 @@ function theme_comment_view($comment, $n
   return $output;
 }
 
+
+/**
+ * Build a comment control form.
+ *
+ * @param $mode
+ *   Comment display mode.
+ * @param $order
+ *   Comment order mode.
+ * @param $comments_per_page
+ *   Comments per page.
+ * @ingroup forms
+ */
 function comment_controls($mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMMENT_ORDER_NEWEST_FIRST, $comments_per_page = 50) {
   $form['mode'] = array('#type' => 'select',
     '#default_value' => $mode,
@@ -1511,10 +1632,13 @@ function comment_controls($mode = COMMEN
 
   return $form;
 }
+
 /**
- * Theme comment controls box where the user can change the default display mode and display order of comments.
+ * Theme the comment controls form.
  *
- * @ingroup themeable
+ * @param $form
+ *   The form structure.
+ * @themeable
  */
 function theme_comment_controls($form) {
   $output = '<div class="container-inline">';
@@ -1524,6 +1648,9 @@ function theme_comment_controls($form) {
   return theme('box', t('Comment viewing options'), $output);
 }
 
+/**
+ * Process comment_controls form submissions.
+ */
 function comment_controls_submit($form, &$form_state) {
   global $user;
 
@@ -1544,11 +1671,6 @@ function comment_controls_submit($form, 
 /**
  * Process variables for comment.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $comment
- * - $node
- * - $links
- *
  * @see comment.tpl.php
  * @see theme_comment()
  */
@@ -1570,9 +1692,6 @@ function template_preprocess_comment(&$v
 /**
  * Process variables for comment-folded.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $comment
- *
  * @see comment-folded.tpl.php
  * @see theme_comment_folded()
  */
@@ -1585,8 +1704,12 @@ function template_preprocess_comment_fol
 }
 
 /**
- * Theme collapsed flat type comment.
+ * Theme comment flat collapsed view.
  *
+ * @param $comment
+ *   The comment to be themed.
+ * @param $node
+ *   The comment node.
  * @ingroup themeable
  */
 function theme_comment_flat_collapsed($comment, $node) {
@@ -1594,8 +1717,12 @@ function theme_comment_flat_collapsed($c
 }
 
 /**
- * Theme expanded flat type comment.
+ * Theme comment flat expanded view.
  *
+ * @param $comment
+ *   The comment to be themed.
+ * @param $node
+ *   The comment node.
  * @ingroup themeable
  */
 function theme_comment_flat_expanded($comment, $node) {
@@ -1603,8 +1730,12 @@ function theme_comment_flat_expanded($co
 }
 
 /**
- * Theme collapsed thread type comment.
+ * Theme comment thread collapsed view.
  *
+ * @param $comment
+ *   The comment to be themed.
+ * @param $node
+ *   The comment node.
  * @ingroup themeable
  */
 function theme_comment_thread_collapsed($comment, $node) {
@@ -1612,8 +1743,12 @@ function theme_comment_thread_collapsed(
 }
 
 /**
- * Theme expanded thread type comment.
+ * Theme comment thread expanded view.
  *
+ * @param $comment
+ *   The comment to be themed.
+ * @param $node
+ *   The comment node.
  * @ingroup themeable
  */
 function theme_comment_thread_expanded($comment, $node) {
@@ -1621,8 +1756,10 @@ function theme_comment_thread_expanded($
 }
 
 /**
- * Theme the "comment posting is forbidden" message.
+ * Theme a "you can't post comments" notice.
  *
+ * @param $node
+ *   The comment node.
  * @ingroup themeable
  */
 function theme_comment_post_forbidden($node) {
@@ -1651,10 +1788,6 @@ function theme_comment_post_forbidden($n
 /**
  * Process variables for comment-wrapper.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $content
- * - $node
- *
  * @see comment-wrapper.tpl.php
  * @see theme_comment_wrapper()
  */
@@ -1667,8 +1800,10 @@ function template_preprocess_comment_wra
 }
 
 /**
- * Make the submitted variable themable
+ * Theme a "Submitted by ..." notice.
  *
+ * @param $comment
+ *   The comment.
  * @ingroup themeable
  */
 function theme_comment_submitted($comment) {
@@ -1718,7 +1853,10 @@ function _comment_per_page() {
 /**
  * Return a current comment display setting
  *
- * $setting can be one of these: 'mode', 'sort', 'comments_per_page'
+ * @param $setting
+ *   can be one of these: 'mode', 'sort', 'comments_per_page'
+ * @param $node
+ *   The comment node in question.
  */
 function _comment_get_display_setting($setting, $node) {
   global $user;
@@ -1809,7 +1947,6 @@ function comment_invoke_comment(&$commen
   return $return;
 }
 
-
 /**
  * Generate vancode.
  *
@@ -1905,6 +2042,11 @@ function comment_unpublish_action($comme
   watchdog('action', 'Unpublished comment %subject.', array('%subject' => $subject));
 }
 
+/**
+ * Form builder; Prepare a form for blacklisted keywords.
+ *
+ * @ingroup forms
+ */
 function comment_unpublish_by_keyword_action_form($context) {
   $form['keywords'] = array(
     '#title' => t('Keywords'),
@@ -1915,6 +2057,9 @@ function comment_unpublish_by_keyword_ac
   return $form;
 }
 
+/**
+ * Process comment_unpublish_by_keyword_action_form form submissions.
+ */
 function comment_unpublish_by_keyword_action_submit($form, $form_state) {
   return array('keywords' => drupal_explode_tags($form_state['values']['keywords']));
 }
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/comment/comment.pages.inc ./modules/comment/comment.pages.inc
--- ../drupal-6.x-dev/modules/comment/comment.pages.inc	2007-10-31 18:50:47.000000000 +0100
+++ ./modules/comment/comment.pages.inc	2007-12-12 23:25:59.000000000 +0100
@@ -6,6 +6,13 @@
  * User page callbacks for the comment module.
  */
 
+/**
+ * Form builder; generate a comment editing form.
+ *
+ * @param $cid
+ *   ID of the comment to be edited.
+ * @ingroup forms
+ */
 function comment_edit($cid) {
   global $user;
 
@@ -33,11 +40,12 @@ function comment_edit($cid) {
  *
  * @param $node
  *   Every comment belongs to a node. This is that node.
+ *
  * @param $pid
  *   Some comments are replies to other comments. In those cases, $pid is the parent
  *   comment's cid.
  *
- * @return $output
+ * @return
  *   The rendered parent node or comment plus the new comment form.
  */
 function comment_reply($node, $pid = NULL) {
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/system/box.tpl.php ./modules/system/box.tpl.php
--- ../drupal-6.x-dev/modules/system/box.tpl.php	2007-08-07 10:39:36.000000000 +0200
+++ ./modules/system/box.tpl.php	2007-12-12 23:25:59.000000000 +0100
@@ -1,5 +1,17 @@
 <?php
 // $Id: box.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
+
+/**
+ * @file box.tpl.php
+ *
+ * Theme implementation to display a box.
+ *
+ * Available variables:
+ * - $title: Box title.
+ * - $content: Box content.
+ *
+ * @see template_preprocess()
+ */
 ?>
 <div class="box">
 
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/system/system.admin.inc ./modules/system/system.admin.inc
--- ../drupal-6.x-dev/modules/system/system.admin.inc	2007-12-08 15:06:22.000000000 +0100
+++ ./modules/system/system.admin.inc	2007-12-12 23:25:59.000000000 +0100
@@ -66,6 +66,9 @@ function system_main_admin_page($arg = N
  * For example, 'admin/content/types' needs to have a destination to be valid
  * in the Drupal menu system, but too much information there might be
  * hidden, so we supply the contents of the block.
+ *
+ * @return
+ *   The output HTML.
  */
 function system_admin_menu_block_page() {
   $item = menu_get_item();
@@ -77,6 +80,9 @@ function system_admin_menu_block_page() 
 
 /**
  * Menu callback; Sets whether the admin menu is in compact mode or not.
+ *
+ * @param $mode
+ *   Valid values are 'on' and 'off'.
  */
 function system_admin_compact_page($mode = 'off') {
   global $user;
@@ -241,6 +247,9 @@ function system_themes_form() {
   return $form;
 }
 
+/**
+ * Process system_themes_form form submissions.
+ */
 function system_themes_form_submit($form, &$form_state) {
 
   // Store list of previously enabled themes and disable all themes
@@ -296,6 +305,10 @@ function system_themes_form_submit($form
 /**
  * Form builder; display theme configuration for entire site and individual themes.
  *
+ * @param $key
+ *   A theme name.
+ * @return
+ *   The form structure.
  * @ingroup forms
  * @see system_theme_settings_submit().
  */
@@ -512,6 +525,9 @@ function system_theme_settings(&$form_st
   return $form;
 }
 
+/**
+ * Process system_theme_settings form submissions.
+ */
 function system_theme_settings_submit($form, &$form_state) {
   $op = isset($_POST['op']) ? $_POST['op'] : '';
   $key = $form_state['values']['var'];
@@ -532,7 +548,16 @@ function system_theme_settings_submit($f
 }
 
 /**
- * Recursively check compatability
+ * Recursively check compatibility.
+ *
+ * @param $incompatible
+ *   An associative array which at the end of the check contains all incompatible files as the keys, their values being TRUE.
+ * @param $files
+ *   The set of files that will be tested.
+ * @param $file
+ *   The file at which the check starts.
+ * @return
+ *   Returns TRUE if an incompatible file is found, NULL (no return value) otherwise.
  */
 function _system_is_incompatible(&$incompatible, $files, $file) {
   if (isset($incompatible[$file->name])) {
@@ -559,6 +584,8 @@ function _system_is_incompatible(&$incom
  * disabled dependencies and also to ensure that the module cannot be disabled if the module has
  * enabled dependents.
  *
+ * @param $form_state
+ *   An associative array containing the current state of the form.
  * @ingroup forms
  * @see theme_system_modules().
  * @see system_modules_submit().
@@ -720,12 +747,23 @@ function system_modules($form_state = ar
   return $form;
 }
 
+/**
+ * Array sorting callback; sorts modules by their name.
+ */
 function system_sort_modules_by_info_name($a, $b) {
   return strcasecmp($a->info['name'], $b->info['name']);
 }
 
 /**
  * Form process callback function to disable check boxes.
+ *
+ * @param $form
+ *   The form structure.
+ * @param $edit
+ *   Not used.
+ * @ingroup forms
+ * @return
+ *   The form structure.
  */
 function system_modules_disable($form, $edit) {
   foreach ($form['#disabled_modules'] as $key) {
@@ -744,7 +782,6 @@ function system_modules_disable($form, $
  *   elements: the list of dependencies and the list of status
  *   form field values from the previous screen.
  * @ingroup forms
- * @see
  */
 function system_modules_confirm_form($modules, $storage) {
   $form = array();
@@ -887,6 +924,17 @@ function system_modules_submit($form, &$
   return;
 }
 
+
+/**
+ * Generate a list of dependencies for modules that are going to be switched on.
+ *
+ * @param $modules
+ *   The list of modules to check.
+ * @param $form_values
+ *   Submitted form values used to determine what modules have been enabled.
+ * @return
+ *   An array of dependencies.
+ */
 function system_module_build_dependencies($modules, $form_values) {
   static $dependencies;
 
@@ -919,8 +967,8 @@ function system_module_build_dependencie
  * @ingroup forms
  * @see system_modules_uninstall_validate().
  * @see system_modules_uninstall_submit().
- * @param
- *   $form_state['values'] Submitted form values.
+ * @param $form_state['values']
+ *   Submitted form values.
  * @return
  *   A form array representing the currently disabled modules.
  */
@@ -975,8 +1023,8 @@ function system_modules_uninstall($form_
  * Confirm uninstall of selected modules.
  *
  * @ingroup forms
- * @param
- *   $form_state['values'] Submitted form values.
+ * @param $storage
+ *   An associative array of modules selected to be uninstalled.
  * @return
  *   A form array representing modules to confirm.
  */
@@ -1013,11 +1061,6 @@ function system_modules_uninstall_confir
 
 /**
  * Validates the submitted uninstall form.
- *
- * @param
- *   $form_id The form ID.
- * @param
- *   $form_state['values'] Submitted form values.
  */
 function system_modules_uninstall_validate($form, &$form_state) {
   // Form submitted, but no modules selected.
@@ -1029,11 +1072,6 @@ function system_modules_uninstall_valida
 
 /**
  * Processes the submitted uninstall form.
- *
- * @param
- *   $form_id The form ID.
- * @param
- *   $form_state['values'] Submitted form values.
  */
 function system_modules_uninstall_submit($form, &$form_state) {
   // Make sure the install API is available.
@@ -1268,7 +1306,9 @@ function system_performance_settings() {
 }
 
 /**
- * Clear system caches.
+ * Submit callback; clear system caches.
+ *
+ * @ingroup forms
  */
 function system_clear_cache_submit(&$form_state, $form) {
   drupal_flush_all_caches();
@@ -1368,7 +1408,7 @@ function system_rss_feeds_settings() {
  *
  * @ingroup forms
  * @see system_settings_form().
- * @see system_date_time_settings().
+ * @see system_date_time_settings_submit().
  */
 function system_date_time_settings() {
   drupal_add_js(drupal_get_path('module', 'system') .'/system.js', 'module');
@@ -1511,6 +1551,9 @@ function system_date_time_settings() {
   return $form;
 }
 
+/**
+ * Process system_date_time_settings form submissions.
+ */
 function system_date_time_settings_submit($form, &$form_state) {
   if ($form_state['values']['date_format_short'] == 'custom') {
     $form_state['values']['date_format_short'] = $form_state['values']['date_format_short_custom'];
@@ -1596,6 +1639,7 @@ function system_clean_url_settings() {
  * Menu callback: displays the site status report. Can also be used as a pure check.
  *
  * @param $check
+ *
  *   If true, only returns a boolean whether there are system status errors.
  */
 function system_status($check = FALSE) {
@@ -1637,6 +1681,16 @@ function system_php() {
   exit();
 }
 
+/**
+ * Theme a SQL result table.
+ *
+ * @param $data
+ *   The actual table data.
+ * @param $keys
+ *   Data keys and descriptions.
+ * @return
+ *   The output HTML.
+ */
 function _system_sql($data, $keys) {
   $rows = array();
   foreach ($keys as $key => $explanation) {
@@ -1711,7 +1765,6 @@ function system_batch_page() {
  * @param $block
  *   An array containing information about the block. It should
  *   include a 'title', a 'description' and a formatted 'content'.
- *
  * @ingroup themeable
  */
 function theme_admin_block($block) {
@@ -1742,7 +1795,6 @@ EOT;
  * @param $block
  *   An array containing information about the block. It should
  *   include a 'title', a 'description' and a formatted 'content'.
- *
  * @ingroup themeable
  */
 function theme_admin_block_content($content) {
@@ -1780,7 +1832,6 @@ function theme_admin_block_content($cont
  *   'title', a 'description', a formatted 'content' and a
  *   'position' which will control which container it will be
  *   in. This is usually 'left' or 'right'.
- *
  * @ingroup themeable
  */
 function theme_admin_page($blocks) {
@@ -1822,6 +1873,8 @@ function theme_admin_page($blocks) {
 /**
  * Theme output of the dashboard page.
  *
+ * @param $menu_items
+ *   An array of modules to be displayed.
  * @ingroup themeable
  */
 function theme_system_admin_by_module($menu_items) {
@@ -1865,8 +1918,10 @@ function theme_system_admin_by_module($m
 }
 
 /**
- * Theme status report
+ * Theme requirements status report.
  *
+ * @param $requirements
+ *   An array of requirements.
  * @ingroup themeable
  */
 function theme_status_report(&$requirements) {
@@ -1900,8 +1955,10 @@ function theme_status_report(&$requireme
 }
 
 /**
- * Theme call back for the modules form.
+ * Theme callback for the modules form.
  *
+ * @param $form
+ *   An associative array containing the structure of the form.
  * @ingroup themeable
  */
 function theme_system_modules($form) {
@@ -1987,8 +2044,8 @@ function theme_system_modules($form) {
  * Themes a table of currently disabled modules.
  *
  * @ingroup themeable
- * @param
- *   $form The form array representing the currently disabled modules.
+ * @param $form
+ *   The form array representing the currently disabled modules.
  * @return
  *   An HTML string representing the table.
  */
@@ -2027,7 +2084,8 @@ function theme_system_modules_uninstall(
 
 /**
  * Theme the theme select form.
- *
+ * @param $form
+ *   An associative array containing the structure of the form.
  * @ingroup themeable
  */
 function theme_system_theme_select_form($form) {
@@ -2049,6 +2107,8 @@ function theme_system_theme_select_form(
 /**
  * Theme function for the system themes form.
  *
+ * @param $form
+ *   An associative array containing the structure of the form.
  * @ingroup themeable
  */
 function theme_system_themes_form($form) {
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/system/system.install ./modules/system/system.install
--- ../drupal-6.x-dev/modules/system/system.install	2007-12-11 11:52:01.000000000 +0100
+++ ./modules/system/system.install	2007-12-12 23:25:59.000000000 +0100
@@ -3,6 +3,11 @@
 
 /**
  * Test and report Drupal installation requirements.
+ *
+ * @param $phase
+ *   The current system installation phase.
+ * @return
+ *   An array of system requirements.
  */
 function system_requirements($phase) {
   $requirements = array();
@@ -243,7 +248,6 @@ function system_requirements($phase) {
   return $requirements;
 }
 
-
 /**
  * Implementation of hook_install().
  */
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/system/system.module ./modules/system/system.module
--- ../drupal-6.x-dev/modules/system/system.module	2007-12-08 15:06:22.000000000 +0100
+++ ./modules/system/system.module	2007-12-12 23:33:13.000000000 +0100
@@ -6,15 +6,39 @@
  * Configuration system that lets administrators modify the workings of the site.
  */
 
+/**
+ * The current system version.
+ */
 define('VERSION', '6.0-dev');
+
+/**
+ * Core API compatibility.
+ */
 define('DRUPAL_CORE_COMPATIBILITY', '6.x');
 
+/**
+ * Minimum supported version of PHP.
+ */
 define('DRUPAL_MINIMUM_PHP',    '4.3.3');
-define('DRUPAL_MINIMUM_MYSQL',  '4.1.0'); // If using MySQL
-define('DRUPAL_MINIMUM_PGSQL',  '7.4');   // If using PostgreSQL
-define('DRUPAL_MINIMUM_APACHE', '1.3');   // If using Apache
 
-// Maximum age of temporary files in seconds.
+/**
+ * Minimum supported version of MySQL, if it is used.
+ */
+define('DRUPAL_MINIMUM_MYSQL',  '4.1.0');
+
+/**
+ * Minimum supported version of PostgreSQL, if it is used.
+ */
+define('DRUPAL_MINIMUM_PGSQL',  '7.4');
+
+/**
+ * Minimum supported version of Apache, if it is used.
+ */
+define('DRUPAL_MINIMUM_APACHE', '1.3');
+
+/**
+ * Maximum age of temporary files in seconds.
+ */
 define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 1440);
 
 /**
@@ -76,6 +100,9 @@ function system_help($path, $arg) {
   }
 }
 
+/**
+ * Implementation of hook_theme().
+ */
 function system_theme() {
   return array_merge(drupal_common_theme(), array(
     'system_theme_select_form' => array(
@@ -119,6 +146,7 @@ function system_theme() {
     ),
   ));
 }
+
 /**
  * Implementation of hook_perm().
  */
@@ -459,6 +487,9 @@ function system_menu() {
   return $items;
 }
 
+/**
+ * Implementation of hook_init().
+ */
 function system_init() {
   // Use the administrative theme if the user is looking at a page in the admin/* path.
   if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
@@ -504,6 +535,8 @@ function system_user($type, $edit, &$use
 }
 
 /**
+ * Implementation of hook_block().
+ *
  * Generate a block with a promotional link to Drupal.org.
  */
 function system_block($op = 'list', $delta = 0, $edit = NULL) {
@@ -543,6 +576,9 @@ function system_block($op = 'list', $del
 
 /**
  * Provide a single block on the administration overview page.
+ *
+ * @param $item
+ *   The menu item to be displayed.
  */
 function system_admin_menu_block($item) {
   $content = array();
@@ -572,7 +608,9 @@ function system_admin_menu_block($item) 
   return $content;
 }
 
-
+/**
+ * Process admin theme form submissions.
+ */
 function system_admin_theme_submit($form, &$form_state) {
   // If we're changing themes, make sure the theme has its blocks initialized.
   if ($form_state['values']['admin_theme'] && $form_state['values']['admin_theme'] != variable_get('admin_theme', '0')) {
@@ -662,6 +700,11 @@ function system_check_directory($form_el
 
 /**
  * Retrieves the current status of an array of files in the system table.
+ *
+ * @param $files
+ *   An array of files to check.
+ * @param $type
+ *   The type of the files.
  */
 function system_get_files_database(&$files, $type) {
   // Extract current files from database.
@@ -678,8 +721,13 @@ function system_get_files_database(&$fil
   }
 }
 
+/**
+ * Prepare defaults for themes.
+ *
+ * @return
+ *   An array of default themes settings.
+ */
 function system_theme_default() {
-  // Prepare defaults for themes.
   return array(
     'regions' => array(
       'left' => 'Left sidebar',
@@ -738,6 +786,9 @@ function system_theme_data() {
 
 /**
  * Helper function to scan and collect theme .info data and their engines.
+ *
+ * @return
+ *   An associative array of themes information.
  */
 function _system_theme_data() {
   static $themes_info = array();
@@ -828,9 +879,16 @@ function _system_theme_data() {
 
 /**
  * Recursive function to find the top level base theme. Themes can inherit
- * templates and function implementations from earlier themes; this function
- * finds the top level parent that has no ancestor, or returns NULL if there
- * isn't a valid parent.
+ * templates and function implementations from earlier themes.
+ *
+ * @param $themes
+ *   An array of available themes.
+ * @param $key
+ *   The name of the theme whose base we are looking for.
+ * @param $used_keys
+ *   A recursion parameter preventing endless loops.
+ * @return
+ *   Returns the top level parent that has no ancestor or returns NULL if there isn't a valid parent.
  */
 function system_find_base_theme($themes, $key, $used_keys = array()) {
   $base_key = $themes[$key]->info['base theme'];
@@ -913,7 +971,14 @@ function system_initialize_theme_blocks(
 }
 
 /**
- * Add default buttons to a form and set its prefix
+ * Add default buttons to a form and set its prefix.
+ *
+ * @ingroup forms
+ * @see system_settings_form_submit
+ * @param $form
+ *   An associative array containing the structure of the form.
+ * @return
+ *   The form structure.
  */
 function system_settings_form($form) {
   $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );
@@ -928,14 +993,11 @@ function system_settings_form($form) {
   return $form;
 }
 
-
-
 /**
  * Execute the system_settings_form.
  *
  * If you want node type configure style handling of your checkboxes,
  * add an array_filter value to your form.
- *
  */
 function system_settings_form_submit($form, &$form_state) {
   $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
@@ -1008,6 +1070,7 @@ function system_node_type($op, $info) {
  * is usually 'confirm') to check if the confirmation was successful or
  * use the regular submit model.
  *
+ * @ingroup forms
  * @param $form
  *   Additional elements to inject into the form, for example hidden elements.
  * @param $question
@@ -1064,6 +1127,14 @@ function system_admin_compact_mode() {
   return (isset($user->admin_compact_mode)) ? $user->admin_compact_mode : variable_get('admin_compact_mode', FALSE);
 }
 
+/**
+ * Generate a list of tasks offered by a specified module.
+ *
+ * @param $module
+ *   Module name.
+ * @return
+ *   An array of task links.
+ */
 function system_get_module_admin_tasks($module) {
   static $items;
 
@@ -1239,6 +1310,10 @@ function system_actions_manage() {
 /**
  * Define the form for the actions overview page.
  *
+ * @see system_actions_manage_form_submit
+ * @ingroup forms
+ * @param $form_state
+ *   An associative array containing the current state of the form; not used.
  * @param $options
  *   An array of configurable actions.
  * @return
@@ -1264,6 +1339,9 @@ function system_actions_manage_form($for
   return $form;
 }
 
+/**
+ * Process system_actions_manage form submissions.
+ */
 function system_actions_manage_form_submit($form, &$form_state) {
   if ($form_state['values']['action']) {
     $form_state['redirect'] = 'admin/settings/actions/configure/'. $form_state['values']['action'];
@@ -1278,6 +1356,8 @@ function system_actions_manage_form_subm
  * Because we are combining unknown form elements with the action
  * configuration form, we use actions_ prefix on our elements.
  *
+ * @see system_actions_configure_validate()
+ * @see system_actions_configure_submit()
  * @param $action
  *   md5 hash of action ID or an integer. If it's an md5 hash, we
  *   are creating a new instance. If it's an integer, we're editing
@@ -1354,6 +1434,9 @@ function system_actions_configure($form_
   return $form;
 }
 
+/**
+ * Validate system_actions_configure form submissions.
+ */
 function system_actions_configure_validate($form, $form_state) {
   $function = actions_function_lookup($form_state['values']['actions_action']) .'_validate';
   // Hand off validation to the action.
@@ -1362,6 +1445,9 @@ function system_actions_configure_valida
   }
 }
 
+/**
+ * Process system_actions_configure form submissions.
+ */
 function system_actions_configure_submit($form, &$form_state) {
   $function = actions_function_lookup($form_state['values']['actions_action']);
   $submit_function = $function .'_submit';
@@ -1379,8 +1465,8 @@ function system_actions_configure_submit
 /**
  * Create the form for confirmation of deleting an action.
  *
- * @param $aid
- *   The action ID.
+ * @ingroup forms
+ * @see system_actions_delete_form_submit
  */
 function system_actions_delete_form($form_state, $action) {
 
@@ -1397,6 +1483,8 @@ function system_actions_delete_form($for
 }
 
 /**
+ * Process system_actions_delete form submissions.
+ *
  * Post-deletion operations for action deletion.
  */
 function system_actions_delete_form_submit($form, &$form_state) {
@@ -1408,8 +1496,12 @@ function system_actions_delete_form_subm
   drupal_set_message(t('Action %action was deleted', array('%action' => $description)));
   $form_state['redirect'] = 'admin/settings/actions/manage';
 }
+
 /**
  * Post-deletion operations for deleting action orphans.
+ *
+ * @param $orphaned
+ *   An array of orphaned actions.
  */
 function system_action_delete_orphans_post($orphaned) {
   foreach ($orphaned as $callback) {
@@ -1419,7 +1511,6 @@ function system_action_delete_orphans_po
 
 /**
  * Remove actions that are in the database but not supported by any enabled module.
- *
  */
 function system_actions_remove_orphans() {
   actions_synchronize(actions_list(), TRUE);
@@ -1429,6 +1520,8 @@ function system_actions_remove_orphans()
 /**
  * Return a form definition so the Send email action can be configured.
  *
+ * @see system_send_email_action_validate()
+ * @see system_send_email_action_submit()
  * @param $context
  *   Default values (if we are editing an existing action instance).
  * @return
@@ -1471,6 +1564,9 @@ function system_send_email_action_form($
   return $form;
 }
 
+/**
+ * Validate system_send_email_action form submissions.
+ */
 function system_send_email_action_validate($form, $form_state) {
   $form_values = $form_state['values'];
   // Validate the configuration form.
@@ -1480,6 +1576,9 @@ function system_send_email_action_valida
   }
 }
 
+/**
+ * Process system_send_email_action form submissions.
+ */
 function system_send_email_action_submit($form, $form_state) {
   $form_values = $form_state['values'];
   // Process the HTML form to store configuration. The keyed array that
@@ -1695,6 +1794,9 @@ function system_goto_action($object, $co
   drupal_goto($context['url']);
 }
 
+/**
+ * Generate an array of time zones and their local time&date.
+ */
 function _system_zonelist() {
   $timestamp = time();
   $zonelist = array(-11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 5, 5.5, 5.75, 6, 6.5, 7, 8, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
