Index: cron.php
===================================================================
RCS file: /cvs/drupal/drupal/cron.php,v
retrieving revision 1.36
diff -u -p -r1.36 cron.php
--- cron.php	9 Aug 2006 07:42:55 -0000	1.36
+++ cron.php	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: cron.php,v 1.36 2006/08/09 07:42:55 dries Exp $
 
+
 /**
  * @file
  * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
@@ -9,3 +10,4 @@
 include_once './includes/bootstrap.inc';
 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 drupal_cron_run();
+
Index: index.php
===================================================================
RCS file: /cvs/drupal/drupal/index.php,v
retrieving revision 1.94
diff -u -p -r1.94 index.php
--- index.php	26 Dec 2007 08:46:48 -0000	1.94
+++ index.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $
 
+
 /**
  * @file
  * The PHP page that serves all page requests on a Drupal installation.
@@ -23,9 +24,11 @@ if (is_int($return)) {
     case MENU_NOT_FOUND:
       drupal_not_found();
       break;
+
     case MENU_ACCESS_DENIED:
       drupal_access_denied();
       break;
+
     case MENU_SITE_OFFLINE:
       drupal_site_offline();
       break;
@@ -37,3 +40,4 @@ elseif (isset($return)) {
 }
 
 drupal_page_footer();
+
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.112
diff -u -p -r1.112 install.php
--- install.php	7 Jan 2008 19:43:28 -0000	1.112
+++ install.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: install.php,v 1.112 2008/01/07 19:43:28 goba Exp $
 
+
 require_once './includes/install.inc';
 
 define('MAINTENANCE_MODE', 'install');
@@ -153,12 +154,12 @@ function install_verify_settings() {
     // We need this because we want to run form_get_errors.
     include_once './includes/form.inc';
 
-    $url = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
-    $db_user = urldecode($url['user']);
-    $db_pass = isset($url['pass']) ? urldecode($url['pass']) : NULL;
-    $db_host = urldecode($url['host']);
-    $db_port = isset($url['port']) ? urldecode($url['port']) : '';
-    $db_path = ltrim(urldecode($url['path']), '/');
+    $url           = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
+    $db_user       = urldecode($url['user']);
+    $db_pass       = isset($url['pass']) ? urldecode($url['pass']) : NULL;
+    $db_host       = urldecode($url['host']);
+    $db_port       = isset($url['port']) ? urldecode($url['port']) : '';
+    $db_path       = ltrim(urldecode($url['path']), '/');
     $settings_file = './'. conf_path() .'/settings.php';
 
     $form_state = array();
@@ -176,13 +177,13 @@ function install_verify_settings() {
 function install_change_settings($profile = 'default', $install_locale = '') {
   global $db_url, $db_type, $db_prefix;
 
-  $url = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
-  $db_user = isset($url['user']) ? urldecode($url['user']) : '';
-  $db_pass = isset($url['pass']) ? urldecode($url['pass']) : '';
-  $db_host = isset($url['host']) ? urldecode($url['host']) : '';
-  $db_port = isset($url['port']) ? urldecode($url['port']) : '';
-  $db_path = ltrim(urldecode($url['path']), '/');
-  $conf_path = './'. conf_path();
+  $url           = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
+  $db_user       = isset($url['user']) ? urldecode($url['user']) : '';
+  $db_pass       = isset($url['pass']) ? urldecode($url['pass']) : '';
+  $db_host       = isset($url['host']) ? urldecode($url['host']) : '';
+  $db_port       = isset($url['port']) ? urldecode($url['port']) : '';
+  $db_path       = ltrim(urldecode($url['path']), '/');
+  $conf_path     = './'. conf_path();
   $settings_file = $conf_path .'/settings.php';
 
   // We always need this because we want to run form_get_errors.
@@ -203,7 +204,6 @@ function install_change_settings($profil
   exit;
 }
 
-
 /**
  * Form API array definition for install_settings.
  */
@@ -260,7 +260,7 @@ function install_settings_form(&$form_st
       '#size' => 45,
       '#maxlength' => 45,
       '#required' => TRUE,
-      '#description' => $db_path_description
+      '#description' => $db_path_description,
     );
 
     // Database username
@@ -287,7 +287,7 @@ function install_settings_form(&$form_st
       '#title' => st('Advanced options'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
-      '#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider.")
+      '#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."),
     );
 
     // Database host
@@ -396,11 +396,11 @@ function install_settings_form_submit($f
 
   // Update global settings array and save
   $settings['db_url'] = array(
-    'value'    => $form_state['values']['_db_url'],
+    'value' => $form_state['values']['_db_url'],
     'required' => TRUE,
   );
   $settings['db_prefix'] = array(
-    'value'    => $form_state['values']['db_prefix'],
+    'value' => $form_state['values']['db_prefix'],
     'required' => TRUE,
   );
   drupal_rewrite_settings($settings);
@@ -452,7 +452,7 @@ function install_select_profile() {
  */
 function install_select_profile_form(&$form_state, $profiles) {
   foreach ($profiles as $profile) {
-    include_once($profile->filename);
+    include_once ($profile->filename);
     // Load profile details.
     $function = $profile->name .'_profile_details';
     if (function_exists($function)) {
@@ -469,7 +469,7 @@ function install_select_profile_form(&$f
       '#parents' => array('profile'),
     );
   }
-  $form['submit'] =  array(
+  $form['submit'] = array(
     '#type' => 'submit',
     '#value' => st('Save and continue'),
   );
@@ -481,7 +481,7 @@ function install_select_profile_form(&$f
  */
 function install_find_locales($profilename) {
   $locales = file_scan_directory('./profiles/'. $profilename .'/translations', '\.po$', array('.', '..', 'CVS'), 0, FALSE);
-  array_unshift($locales, (object) array('name' => 'en'));
+  array_unshift($locales, (object)array('name' => 'en'));
   return $locales;
 }
 
@@ -570,10 +570,10 @@ function install_select_locale_form(&$fo
       '#return_value' => $locale->name,
       '#default_value' => ($locale->name == 'en' ? TRUE : FALSE),
       '#title' => $name . ($locale->name == 'en' ? ' '. st('(built-in)') : ''),
-      '#parents' => array('locale')
+      '#parents' => array('locale'),
     );
   }
-  $form['submit'] =  array(
+  $form['submit'] = array(
     '#type' => 'submit',
     '#value' => st('Select language'),
   );
@@ -590,7 +590,6 @@ function install_no_profile_error() {
   exit;
 }
 
-
 /**
  * Show an error page when Drupal has already been installed.
  */
@@ -699,7 +698,7 @@ function install_tasks($profile, $task) 
       // Warn about settings.php permissions risk
       $settings_dir = './'. conf_path();
       $settings_file = $settings_dir .'/settings.php';
-      if (!drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE) || !drupal_verify_install_file($settings_dir, FILE_NOT_WRITABLE, 'dir')) {
+      if (!drupal_verify_install_file($settings_file, FILE_EXIST | FILE_READABLE | FILE_NOT_WRITABLE) || !drupal_verify_install_file($settings_dir, FILE_NOT_WRITABLE, 'dir')) {
         drupal_set_message(st('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the <a href="@handbook_url">on-line handbook</a>.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/getting-started')), 'error');
       }
       else {
@@ -723,7 +722,6 @@ if (Drupal.jsEnabled) {
       // Build menu to allow clean URL check.
       menu_rebuild();
     }
-
     else {
       $task = 'profile';
     }
@@ -865,21 +863,21 @@ function install_check_requirements($pro
 
   // If Drupal is not set up already, we need to create a settings file.
   if (!$verify) {
-    $writable = FALSE;
-    $conf_path = './'. conf_path();
+    $writable      = FALSE;
+    $conf_path     = './'. conf_path();
     $settings_file = $conf_path .'/settings.php';
-    $file = $conf_path;
+    $file          = $conf_path;
     // Verify that the directory exists.
     if (drupal_verify_install_file($conf_path, FILE_EXIST, 'dir')) {
       // Check to see if a settings.php already exists.
       if (drupal_verify_install_file($settings_file, FILE_EXIST)) {
         // If it does, make sure it is writable.
-        $writable = drupal_verify_install_file($settings_file, FILE_READABLE|FILE_WRITABLE);
+        $writable = drupal_verify_install_file($settings_file, FILE_READABLE | FILE_WRITABLE);
         $file = $settings_file;
       }
       else {
         // If not, make sure the directory is.
-        $writable = drupal_verify_install_file($conf_path, FILE_READABLE|FILE_WRITABLE, 'dir');
+        $writable = drupal_verify_install_file($conf_path, FILE_READABLE | FILE_WRITABLE, 'dir');
       }
     }
 
@@ -916,7 +914,7 @@ function install_check_requirements($pro
         drupal_set_message($message, 'warning');
       }
     }
-  } 
+  }
 }
 
 /**
@@ -925,18 +923,18 @@ function install_check_requirements($pro
 function install_task_list($active = NULL) {
   // Default list of tasks.
   $tasks = array(
-    'profile-select'        => st('Choose profile'),
-    'locale-select'         => st('Choose language'),
-    'requirements'          => st('Verify requirements'),
-    'database'              => st('Set up database'),
+    'profile-select' => st('Choose profile'),
+    'locale-select' => st('Choose language'),
+    'requirements' => st('Verify requirements'),
+    'database' => st('Set up database'),
     'profile-install-batch' => st('Install profile'),
-    'locale-initial-batch'  => st('Set up translations'),
-    'configure'             => st('Configure site'),
+    'locale-initial-batch' => st('Set up translations'),
+    'configure' => st('Configure site'),
   );
 
   $profiles = install_find_profiles();
-  $profile = isset($_GET['profile']) && isset($profiles[$_GET['profile']]) ? $_GET['profile'] : '.';
-  $locales = install_find_locales($profile);
+  $profile  = isset($_GET['profile']) && isset($profiles[$_GET['profile']]) ? $_GET['profile'] : '.';
+  $locales  = install_find_locales($profile);
 
   // If we have only one profile, remove 'Choose profile'
   // and rename 'Install profile'.
@@ -967,7 +965,7 @@ function install_task_list($active = NUL
 
   // Add finished step as the last task.
   $tasks += array(
-    'finished'     => st('Finished')
+    'finished' => st('Finished'),
   );
 
   // Let the theming function know that 'finished' and 'done'
@@ -1150,3 +1148,4 @@ function install_configure_form_submit($
 
 // Start the installer.
 install_main();
+
Index: includes/actions.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/actions.inc,v
retrieving revision 1.8
diff -u -p -r1.8 actions.inc
--- includes/actions.inc	31 Dec 2007 14:51:04 -0000	1.8
+++ includes/actions.inc	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: actions.inc,v 1.8 2007/12/31 14:51:04 goba Exp $
 
+
 /**
  * @file
  * This is the actions engine for executing stored actions.
@@ -46,9 +47,9 @@ function actions_do($action_ids, &$objec
     watchdog('actions', 'Stack overflow: too many calls to actions_do(). Aborting to prevent infinite recursion.', WATCHDOG_ERROR);
     return;
   }
-  $actions = array();
+  $actions           = array();
   $available_actions = actions_list();
-  $result = array();
+  $result            = array();
   if (is_array($action_ids)) {
     $where = array();
     $where_values = array();
@@ -78,9 +79,10 @@ function actions_do($action_ids, &$objec
 
     // Fire actions, in no particular order.
     foreach ($actions as $action_id => $params) {
-      if (is_numeric($action_id)) { // Configurable actions need parameters.
-        $function = $params['callback'];
-        $context = array_merge($context, $params);
+      // Configurable actions need parameters.
+      if (is_numeric($action_id)) {
+        $function           = $params['callback'];
+        $context            = array_merge($context, $params);
         $result[$action_id] = $function($object, $context, $a1, $a2);
       }
       // Singleton action; $action_id is the function name.
@@ -93,9 +95,9 @@ function actions_do($action_ids, &$objec
   else {
     // If it's a configurable action, retrieve stored parameters.
     if (is_numeric($action_ids)) {
-      $action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = %d", $action_ids));
-      $function = $action->callback;
-      $context = array_merge($context, unserialize($action->parameters));
+      $action              = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = %d", $action_ids));
+      $function            = $action->callback;
+      $context             = array_merge($context, unserialize($action->parameters));
       $result[$action_ids] = $function($object, $context, $a1, $a2);
     }
     // Singleton action; $action_ids is the function name.
@@ -106,7 +108,6 @@ function actions_do($action_ids, &$objec
   return $result;
 }
 
-
 /**
  * Discover all action functions by invoking hook_action_info().
  *
@@ -210,9 +211,9 @@ function actions_actions_map($actions) {
   $actions_map = array();
   foreach ($actions as $callback => $array) {
     $key = md5($callback);
-    $actions_map[$key]['callback']     = isset($array['callback']) ? $array['callback'] : $callback;
-    $actions_map[$key]['description']  = $array['description'];
-    $actions_map[$key]['type']         = $array['type'];
+    $actions_map[$key]['callback'] = isset($array['callback']) ? $array['callback'] : $callback;
+    $actions_map[$key]['description'] = $array['description'];
+    $actions_map[$key]['type'] = $array['type'];
     $actions_map[$key]['configurable'] = $array['configurable'];
   }
   return $actions_map;
@@ -363,3 +364,4 @@ function actions_delete($aid) {
   db_query("DELETE FROM {actions} WHERE aid = %d", $aid);
   module_invoke_all('actions_delete', $aid);
 }
+
Index: includes/batch.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/batch.inc,v
retrieving revision 1.14
diff -u -p -r1.14 batch.inc
--- includes/batch.inc	20 Dec 2007 11:57:20 -0000	1.14
+++ includes/batch.inc	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: batch.inc,v 1.14 2007/12/20 11:57:20 goba Exp $
 
+
 /**
  * @file Batch processing API for processes to run in multiple HTTP requests.
  */
@@ -9,7 +10,7 @@
  * State-based dispatcher for the batch processing page.
  */
 function _batch_page() {
-  $batch =& batch_get();
+  $batch = &batch_get();
 
   // Retrieve the current state of batch from db.
   if (isset($_REQUEST['id']) && $data = db_result(db_query("SELECT batch FROM {batch} WHERE bid = %d AND token = '%s'", $_REQUEST['id'], drupal_get_token($_REQUEST['id'])))) {
@@ -112,7 +113,7 @@ function _batch_do() {
  * Batch processing page without JavaScript support.
  */
 function _batch_progress_page_nojs() {
-  $batch =& batch_get();
+  $batch = &batch_get();
   $current_set = _batch_current_set();
 
   drupal_set_title($current_set['title']);
@@ -121,8 +122,8 @@ function _batch_progress_page_nojs() {
 
   if (!isset($batch['running'])) {
     // This is the first page so we return some output immediately.
-    $percentage = 0;
-    $message = $current_set['init_message'];
+    $percentage       = 0;
+    $message          = $current_set['init_message'];
     $batch['running'] = TRUE;
   }
   else {
@@ -163,8 +164,8 @@ function _batch_progress_page_nojs() {
  * was not set for progressive execution - e.g forms submitted by drupal_execute).
  */
 function _batch_process() {
-  $batch =& batch_get();
-  $current_set =& _batch_current_set();
+  $batch       = &batch_get();
+  $current_set = &_batch_current_set();
   $set_changed = TRUE;
 
   if ($batch['progressive']) {
@@ -176,7 +177,7 @@ function _batch_process() {
     // request, we check if it requires an additional file for functions
     // definitions.
     if ($set_changed && isset($current_set['file']) && is_file($current_set['file'])) {
-      include_once($current_set['file']);
+      include_once ($current_set['file']);
     }
 
     $finished = 1;
@@ -184,7 +185,7 @@ function _batch_process() {
     if ((list($function, $args) = reset($current_set['operations'])) && function_exists($function)) {
       // Build the 'context' array, execute the function call,
       // and retrieve the user message.
-      $batch_context = array('sandbox' => &$current_set['sandbox'], 'results' => &$current_set['results'], 'finished' => &$finished, 'message' => &$task_message);
+      $batch_context = array('sandbox' => & $current_set['sandbox'], 'results' => & $current_set['results'], 'finished' => & $finished, 'message' => & $task_message);
       // Process the current operation.
       call_user_func_array($function, array_merge($args, array(&$batch_context)));
     }
@@ -204,7 +205,7 @@ function _batch_process() {
     $set_changed = FALSE;
     $old_set = $current_set;
     while (empty($current_set['operations']) && ($current_set['success'] = TRUE) && _batch_next_set()) {
-      $current_set =& _batch_current_set();
+      $current_set = &_batch_current_set();
       $set_changed = TRUE;
     }
     // At this point, either $current_set is a 'real' batch set (has operations),
@@ -224,25 +225,25 @@ function _batch_process() {
     // we have to use the info from the new (unprocessed) one.
     if ($set_changed && isset($current_set['operations'])) {
       // Processing will continue with a fresh batch set.
-      $remaining = count($current_set['operations']);
-      $total = $current_set['total'];
+      $remaining        = count($current_set['operations']);
+      $total            = $current_set['total'];
       $progress_message = $current_set['init_message'];
-      $task_message = '';
+      $task_message     = '';
     }
     else {
-      $remaining = count($old_set['operations']);
-      $total = $old_set['total'];
+      $remaining        = count($old_set['operations']);
+      $total            = $old_set['total'];
       $progress_message = $old_set['progress_message'];
     }
 
     $current    = $total - $remaining + $finished;
     $percentage = $total ? floor($current / $total * 100) : 100;
-    $values = array(
-      '@remaining'  => $remaining,
-      '@total'      => $total,
-      '@current'    => floor($current),
+    $values     = array(
+      '@remaining' => $remaining,
+      '@total' => $total,
+      '@current' => floor($current),
       '@percentage' => $percentage,
-      );
+    );
     $message = strtr($progress_message, $values) .'<br/>';
     $message .= $task_message ? $task_message : '&nbsp';
 
@@ -252,14 +253,13 @@ function _batch_process() {
     // If we're not in progressive mode, the whole batch has been processed by now.
     return _batch_finished();
   }
-
 }
 
 /**
  * Retrieve the batch set being currently processed.
  */
 function &_batch_current_set() {
-  $batch =& batch_get();
+  $batch = &batch_get();
   return $batch['sets'][$batch['current_set']];
 }
 
@@ -269,10 +269,10 @@ function &_batch_current_set() {
  * additional batch sets).
  */
 function _batch_next_set() {
-  $batch =& batch_get();
+  $batch = &batch_get();
   if (isset($batch['sets'][$batch['current_set'] + 1])) {
     $batch['current_set']++;
-    $current_set =& _batch_current_set();
+    $current_set = &_batch_current_set();
     if (isset($current_set['form_submit']) && ($function = $current_set['form_submit']) && function_exists($function)) {
       // We use our stored copies of $form and $form_state, to account for
       // possible alteration by the submit handlers.
@@ -288,14 +288,14 @@ function _batch_next_set() {
  * and resolve page redirection.
  */
 function _batch_finished() {
-  $batch =& batch_get();
+  $batch = &batch_get();
 
   // Execute the 'finished' callbacks for each batch set.
   foreach ($batch['sets'] as $key => $batch_set) {
     if (isset($batch_set['finished'])) {
       // Check if the set requires an additional file for functions definitions.
       if (isset($batch_set['file']) && is_file($batch_set['file'])) {
-        include_once($batch_set['file']);
+        include_once ($batch_set['file']);
       }
       if (function_exists($batch_set['finished'])) {
         $batch_set['finished']($batch_set['success'], $batch_set['results'], $batch_set['operations']);
@@ -352,3 +352,4 @@ function _batch_shutdown() {
     db_query("UPDATE {batch} SET batch = '%s' WHERE bid = %d", serialize($batch), $batch['id']);
   }
 }
+
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.206
diff -u -p -r1.206 bootstrap.inc
--- includes/bootstrap.inc	10 Jan 2008 22:47:17 -0000	1.206
+++ includes/bootstrap.inc	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: bootstrap.inc,v 1.206 2008/01/10 22:47:17 goba Exp $
 
+
 /**
  * @file
  * Functions that need to be loaded on every Drupal request.
@@ -40,14 +41,22 @@ define('CACHE_AGGRESSIVE', 2);
  * @see watchdog()
  * @see watchdog_severity_levels()
  */
-define('WATCHDOG_EMERG',    0); // Emergency: system is unusable
-define('WATCHDOG_ALERT',    1); // Alert: action must be taken immediately
-define('WATCHDOG_CRITICAL', 2); // Critical: critical conditions
-define('WATCHDOG_ERROR',    3); // Error: error conditions
-define('WATCHDOG_WARNING',  4); // Warning: warning conditions
-define('WATCHDOG_NOTICE',   5); // Notice: normal but significant condition
-define('WATCHDOG_INFO',     6); // Informational: informational messages
-define('WATCHDOG_DEBUG',    7); // Debug: debug-level messages
+// Emergency: system is unusable
+define('WATCHDOG_EMERG', 0);
+// Alert: action must be taken immediately
+define('WATCHDOG_ALERT', 1);
+// Critical: critical conditions
+define('WATCHDOG_CRITICAL', 2);
+// Error: error conditions
+define('WATCHDOG_ERROR', 3);
+// Warning: warning conditions
+define('WATCHDOG_WARNING', 4);
+// Notice: normal but significant condition
+define('WATCHDOG_NOTICE', 5);
+// Informational: informational messages
+define('WATCHDOG_INFO', 6);
+// Debug: debug-level messages
+define('WATCHDOG_DEBUG', 7);
 
 /**
  * First bootstrap phase: initialize configuration.
@@ -152,6 +161,7 @@ function timer_start($name) {
  *
  * @param name
  *   The name of the timer.
+ *
  * @return
  *   The current timer value in ms.
  */
@@ -175,6 +185,7 @@ function timer_read($name) {
  *
  * @param name
  *   The name of the timer.
+ *
  * @return
  *   A timer array. The array contains the number of times the
  *   timer has been started and stopped (count) and the accumulated
@@ -226,6 +237,7 @@ function timer_stop($name) {
  * @param reset
  *   Force a full search for matching directories even if one had been
  *   found previously.
+ *
  * @return
  *   The path of the matching directory.
  */
@@ -237,8 +249,8 @@ function conf_path($require_settings = T
   }
 
   $confdir = 'sites';
-  $uri = explode('/', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
-  $server = explode('.', implode('.', array_reverse(explode(':', rtrim($_SERVER['HTTP_HOST'], '.')))));
+  $uri     = explode('/', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
+  $server  = explode('.', implode('.', array_reverse(explode(':', rtrim($_SERVER['HTTP_HOST'], '.')))));
   for ($i = count($uri) - 1; $i > 0; $i--) {
     for ($j = count($server); $j > 0; $j--) {
       $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
@@ -318,7 +330,7 @@ function conf_init() {
   else {
     // Otherwise use $base_url as session name, without the protocol
     // to use the same session identifiers across http and https.
-    list( , $session_name) = explode('://', $base_url, 2);
+    list(, $session_name) = explode('://', $base_url, 2);
     // We escape the hostname because it can be modified by a visitor.
     if (!empty($_SERVER['HTTP_HOST'])) {
       $cookie_domain = check_plain($_SERVER['HTTP_HOST']);
@@ -391,8 +403,8 @@ function drupal_get_filename($type, $nam
     // Fallback to searching the filesystem if the database connection is
     // not established or the requested file is not found.
     $config = conf_path();
-    $dir = (($type == 'theme_engine') ? 'themes/engines' : "${type}s");
-    $file = (($type == 'theme_engine') ? "$name.engine" : "$name.$type");
+    $dir    = (($type == 'theme_engine') ? 'themes/engines' : "${type}s");
+    $file   = (($type == 'theme_engine') ? "$name.engine" : "$name.$type");
 
     foreach (array("$config/$dir/$file", "$config/$dir/$name/$file", "$dir/$file", "$dir/$name/$file") as $file) {
       if (file_exists($file)) {
@@ -441,6 +453,7 @@ function variable_init($conf = array()) 
  *   The name of the variable to return.
  * @param $default
  *   The default value to use if this variable has never been set.
+ *
  * @return
  *   The value of the variable.
  */
@@ -488,7 +501,6 @@ function variable_del($name) {
   unset($conf[$name]);
 }
 
-
 /**
  * Retrieve the current page from the cache.
  *
@@ -590,8 +602,11 @@ function drupal_page_cache_header($cache
   $if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) : FALSE;
 
   if ($if_modified_since && $if_none_match
-      && $if_none_match == $etag // etag must match
-      && $if_modified_since == $last_modified) {  // if-modified-since must match
+    // etag must match
+    && $if_none_match == $etag
+    // if-modified-since must match
+    && $if_modified_since == $last_modified
+  ) {
     header('HTTP/1.1 304 Not Modified');
     // All 304 responses must send an etag if the 200 response for the same object contained an etag
     header("Etag: $etag");
@@ -699,6 +714,7 @@ function check_plain($text) {
  *
  * @param $text
  *   The text to check.
+ *
  * @return
  *   TRUE if the text is valid UTF-8, FALSE if not.
  */
@@ -758,17 +774,17 @@ function watchdog($type, $message, $vari
 
   // Prepare the fields to be logged
   $log_message = array(
-    'type'        => $type,
-    'message'     => $message,
-    'variables'   => $variables,
-    'severity'    => $severity,
-    'link'        => $link,
-    'user'        => $user,
+    'type' => $type,
+    'message' => $message,
+    'variables' => $variables,
+    'severity' => $severity,
+    'link' => $link,
+    'user' => $user,
     'request_uri' => $base_root . request_uri(),
-    'referer'     => referer_uri(),
-    'ip'          => ip_address(),
-    'timestamp'   => time(),
-    );
+    'referer' => referer_uri(),
+    'ip' => ip_address(),
+    'timestamp' => time(),
+  );
 
   // Call the logging hooks to log/process the message
   foreach (module_implements('watchdog', TRUE) as $module) {
@@ -820,6 +836,7 @@ function drupal_set_message($message = N
  *   (optional) Only return messages of this type.
  * @param $clear_queue
  *   (optional) Set to FALSE if you do not want to clear the messages queue
+ *
  * @return
  *   An associative array, the key is the message type, the value an array
  *   of messages. If the $type parameter is passed, you get only that type,
@@ -861,6 +878,7 @@ function drupal_get_messages($type = NUL
  * @param $mask string
  *   String or mask to test: '_' matches any character, '%' matches any
  *   number of characters.
+ *
  * @return bool
  *   TRUE if access is denied, FALSE if access is allowed.
  */
@@ -924,7 +942,6 @@ function _drupal_bootstrap($phase) {
   global $conf;
 
   switch ($phase) {
-
     case DRUPAL_BOOTSTRAP_CONFIGURATION:
       drupal_unset_globals();
       // Start a page timer:
@@ -1104,7 +1121,7 @@ function language_list($field = 'languag
  *   Optional property of the language object to return
  */
 function language_default($property = NULL) {
-  $language = variable_get('language_default', (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''));
+  $language = variable_get('language_default', (object)array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''));
   return $property ? $language->$property : $language;
 }
 
@@ -1135,3 +1152,4 @@ function ip_address() {
 
   return $ip_address;
 }
+
Index: includes/cache-install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/cache-install.inc,v
retrieving revision 1.2
diff -u -p -r1.2 cache-install.inc
--- includes/cache-install.inc	7 Aug 2007 08:39:35 -0000	1.2
+++ includes/cache-install.inc	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: cache-install.inc,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * A stub cache implementation to be used during the installation
  * process when database access is not yet available. Because Drupal's
@@ -10,7 +11,6 @@
  * implementation during normal operations would have a negative impact
  * on performance.
  */
-
 function cache_get($key, $table = 'cache') {
   return FALSE;
 }
@@ -22,3 +22,4 @@ function cache_set($cid, $data, $table =
 function cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) {
   return;
 }
+
Index: includes/cache.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/cache.inc,v
retrieving revision 1.16
diff -u -p -r1.16 cache.inc
--- includes/cache.inc	26 Nov 2007 16:19:37 -0000	1.16
+++ includes/cache.inc	21 Jan 2008 21:58:43 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: cache.inc,v 1.16 2007/11/26 16:19:37 dries Exp $
 
+
 /**
  * Return data from the persistent cache. Data may be stored as either plain text or as serialized data.
  * cache_get will automatically return unserialized objects and arrays.
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.752
diff -u -p -r1.752 common.inc
--- includes/common.inc	16 Jan 2008 10:37:30 -0000	1.752
+++ includes/common.inc	21 Jan 2008 21:58:44 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: common.inc,v 1.752 2008/01/16 10:37:30 goba Exp $
 
+
 /**
  * @file
  * Common functions that many Drupal modules will need to reference.
@@ -166,9 +167,10 @@ function drupal_add_feed($url = NULL, $t
     $stored_feed_links[$url] = theme('feed_icon', $url, $title);
 
     drupal_add_link(array('rel' => 'alternate',
-                          'type' => 'application/rss+xml',
-                          'title' => $title,
-                          'href' => $url));
+        'type' => 'application/rss+xml',
+        'title' => $title,
+        'href' => $url,
+      ));
   }
   return $stored_feed_links;
 }
@@ -200,6 +202,7 @@ function drupal_get_feeds($delimiter = "
  *   nested items.
  * @param $parent
  *   Should not be passed, only used in recursive calls.
+ *
  * @return
  *   An urlencoded string which can be appended to/as the URL query string.
  */
@@ -332,7 +335,8 @@ function drupal_site_offline() {
   drupal_set_header('HTTP/1.1 503 Service unavailable');
   drupal_set_title(t('Site off-line'));
   print theme('maintenance_page', filter_xss_admin(variable_get('site_offline_message',
-    t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))))));
+        t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))
+      )));
 }
 
 /**
@@ -409,6 +413,7 @@ function drupal_access_denied() {
  * @param $retry
  *   An integer representing how many times to retry the request in case of a
  *   redirect.
+ *
  * @return
  *   An object containing the HTTP request headers, response code, headers,
  *   data and redirect status.
@@ -422,7 +427,7 @@ function drupal_http_request($url, $head
   // some parsing has failed.
   if (!$self_test && variable_get('drupal_http_request_fails', FALSE)) {
     $self_test = TRUE;
-    $works = module_invoke('system', 'check_http_request');
+    $works     = module_invoke('system', 'check_http_request');
     $self_test = FALSE;
     if (!$works) {
       // Do not bother with further operations if we already know that we
@@ -439,14 +444,16 @@ function drupal_http_request($url, $head
     case 'http':
       $port = isset($uri['port']) ? $uri['port'] : 80;
       $host = $uri['host'] . ($port != 80 ? ':'. $port : '');
-      $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
+      $fp   = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
       break;
+
     case 'https':
       // Note: Only works for PHP 4.3 compiled with OpenSSL.
       $port = isset($uri['port']) ? $uri['port'] : 443;
       $host = $uri['host'] . ($port != 443 ? ':'. $port : '');
-      $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20);
+      $fp   = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20);
       break;
+
     default:
       $result->error = 'invalid schema '. $uri['scheme'];
       return $result;
@@ -474,7 +481,7 @@ function drupal_http_request($url, $head
     // host that do not take into account the port number.
     'Host' => "Host: $host",
     'User-Agent' => 'User-Agent: Drupal (+http://drupal.org/)',
-    'Content-Length' => 'Content-Length: '. strlen($data)
+    'Content-Length' => 'Content-Length: '. strlen($data),
   );
 
   // If the server url has a user then attempt to use basic authentication
@@ -528,7 +535,7 @@ function drupal_http_request($url, $head
     200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',
     300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect',
     400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed',
-    500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported'
+    500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported',
   );
   // RFC 2616 states that all unknown HTTP codes must be treated the same as the
   // base code in their class.
@@ -537,12 +544,18 @@ function drupal_http_request($url, $head
   }
 
   switch ($code) {
-    case 200: // OK
-    case 304: // Not modified
+    case 200:
+      // OK
+    case 304:
+      // Not modified
       break;
-    case 301: // Moved permanently
-    case 302: // Moved temporarily
-    case 307: // Moved temporarily
+
+    case 301:
+      // Moved permanently
+    case 302:
+      // Moved temporarily
+    case 307:
+      // Moved temporarily
       $location = $result->headers['Location'];
 
       if ($retry) {
@@ -550,8 +563,8 @@ function drupal_http_request($url, $head
         $result->redirect_code = $result->code;
       }
       $result->redirect_url = $location;
-
       break;
+
     default:
       $result->error = $text;
   }
@@ -559,6 +572,7 @@ function drupal_http_request($url, $head
   $result->code = $code;
   return $result;
 }
+
 /**
  * @} End of "HTTP handling".
  */
@@ -747,6 +761,7 @@ function fix_gpc_magic() {
  * @param $langcode
  *   Optional language code to translate to a language other than what is used
  *   to display the page.
+ *
  * @return
  *   The translated string.
  */
@@ -810,14 +825,15 @@ function t($string, $args = array(), $la
  *
  * @param $mail
  *   A string containing an e-mail address.
+ *
  * @return
  *   TRUE if the address is in a valid format.
  */
 function valid_email_address($mail) {
-  $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
+  $user   = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
   $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
-  $ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
-  $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
+  $ipv4   = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
+  $ipv6   = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
 
   return preg_match("/^$user@($domain|(\[($ipv4|$ipv6)\]))$/", $mail);
 }
@@ -832,6 +848,7 @@ function valid_email_address($mail) {
  *   The URL to verify.
  * @param $absolute
  *   Whether the URL is absolute (beginning with a scheme such as "http:").
+ *
  * @return
  *   TRUE if the URL is in a valid format.
  */
@@ -865,6 +882,7 @@ function flood_register_event($name) {
  *   The name of the event.
  * @param $number
  *   The maximum number of the specified event per hour (per visitor).
+ *
  * @return
  *   True if the user did not exceed the hourly threshold. False otherwise.
  */
@@ -1013,6 +1031,7 @@ function format_xml_elements($array) {
  * @param $langcode
  *   Optional language code to translate to a language other than
  *   what is used to display the page.
+ *
  * @return
  *   A translated string.
  */
@@ -1032,8 +1051,10 @@ function format_plural($count, $singular
     switch ($index) {
       case "0":
         return t($singular, $args, $langcode);
+
       case "1":
         return t($plural, $args, $langcode);
+
       default:
         unset($args['@count']);
         $args['@count['. $index .']'] = $count;
@@ -1048,6 +1069,7 @@ function format_plural($count, $singular
  * @param $size
  *   A size expressed as a number of bytes with optional SI size and unit
  *   suffix (e.g. 2, 3K, 5MB, 10G).
+ *
  * @return
  *   An integer representation of the size.
  */
@@ -1055,8 +1077,10 @@ function parse_size($size) {
   $suffixes = array(
     '' => 1,
     'k' => 1024,
-    'm' => 1048576, // 1024 * 1024
-    'g' => 1073741824, // 1024 * 1024 * 1024
+    // 1024 * 1024
+    'm' => 1048576,
+    // 1024 * 1024 * 1024
+    'g' => 1073741824,
   );
   if (preg_match('/([0-9]+)\s*(k|m|g)?(b?(ytes?)?)/i', $size, $match)) {
     return $match[1] * $suffixes[drupal_strtolower($match[2])];
@@ -1071,6 +1095,7 @@ function parse_size($size) {
  * @param $langcode
  *   Optional language code to translate to a language other than what is used
  *   to display the page.
+ *
  * @return
  *   A translated string representation of the size.
  */
@@ -1099,6 +1124,7 @@ function format_size($size, $langcode = 
  * @param $langcode
  *   Optional language code to translate to a language other than
  *   what is used to display the page.
+ *
  * @return
  *   A translated string representation of the interval.
  */
@@ -1141,6 +1167,7 @@ function format_interval($timestamp, $gr
  * @param $langcode
  *   Optional language code to translate to a language other than what is used
  *   to display the page.
+ *
  * @return
  *   A translated date string in the requested format.
  */
@@ -1161,12 +1188,15 @@ function format_date($timestamp, $type =
     case 'small':
       $format = variable_get('date_format_short', 'm/d/Y - H:i');
       break;
+
     case 'large':
       $format = variable_get('date_format_long', 'l, F j, Y - H:i');
       break;
+
     case 'custom':
       // No change to format.
       break;
+
     case 'medium':
     default:
       $format = variable_get('date_format_medium', 'D, m/d/Y - H:i');
@@ -1244,6 +1274,7 @@ function format_date($timestamp, $type =
  *     'prefix'
  *       Only used internally, to modify the path when a language dependent URL
  *       requires so.
+ *
  * @return
  *   A string containing a URL to the given path.
  *
@@ -1257,7 +1288,7 @@ function url($path = NULL, $options = ar
     'query' => '',
     'absolute' => FALSE,
     'alias' => FALSE,
-    'prefix' => ''
+    'prefix' => '',
   );
   if (!isset($options['external'])) {
     // Return an external link if $path contains an allowed absolute URL.
@@ -1367,6 +1398,7 @@ function url($path = NULL, $options = ar
  *
  * @param $attributes
  *   An associative array of HTML attributes.
+ *
  * @return
  *   An HTML string ready for insertion in a tag.
  */
@@ -1374,7 +1406,7 @@ function drupal_attributes($attributes =
   if (is_array($attributes)) {
     $t = '';
     foreach ($attributes as $key => $value) {
-      $t .= " $key=".'"'. check_plain($value) .'"';
+      $t .= " $key=" . '"'. check_plain($value) .'"';
     }
     return $t;
   }
@@ -1420,15 +1452,16 @@ function drupal_attributes($attributes =
  *       escaped HTML.
  *     'alias' (default FALSE)
  *       Whether the given path is an alias already.
+ *
  * @return
  *   an HTML string containing a link to the given path.
  */
 function l($text, $path, $options = array()) {
   // Merge in defaults.
   $options += array(
-      'attributes' => array(),
-      'html' => FALSE,
-    );
+    'attributes' => array(),
+    'html' => FALSE,
+  );
 
   // Append active class.
   if ($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) {
@@ -1509,6 +1542,7 @@ function drupal_map_assoc($array, $funct
  *
  * @param $code
  *   The code to evaluate.
+ *
  * @return
  *   A string containing the printed output of the code, followed by the returned
  *   output of the code.
@@ -1633,6 +1667,7 @@ function drupal_add_link($attributes) {
  *
  *   Typical candidates for caching are for example styles for nodes across
  *   the site, or used in the theme.
+ *
  * @return
  *   An array of CSS files.
  */
@@ -1695,6 +1730,7 @@ function drupal_add_css($path = NULL, $t
  * @param $css
  *   (optional) An array of CSS files. If no array is provided, the default
  *   stylesheets array is used instead.
+ *
  * @return
  *   A string of XHTML CSS tags.
  */
@@ -1707,8 +1743,8 @@ function drupal_get_css($css = NULL) {
   $no_theme_preprocess = '';
 
   $preprocess_css = (variable_get('preprocess_css', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update'));
-  $directory = file_directory_path();
-  $is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
+  $directory      = file_directory_path();
+  $is_writable    = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
 
   // A dummy query-string is added to filenames, to gain control over
   // browser-caching. The string changes on every update or full cache
@@ -1725,15 +1761,15 @@ function drupal_get_css($css = NULL) {
           // If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*,
           // regardless of whether preprocessing is on or off.
           if (!$preprocess && $type == 'module') {
-            $no_module_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />'."\n";
+            $no_module_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />' . "\n";
           }
           // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
           // regardless of whether preprocessing is on or off.
           else if (!$preprocess && $type == 'theme') {
-            $no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />'."\n";
+            $no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />' . "\n";
           }
           else {
-            $output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />'."\n";
+            $output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />' . "\n";
           }
         }
       }
@@ -1742,7 +1778,7 @@ function drupal_get_css($css = NULL) {
     if ($is_writable && $preprocess_css) {
       $filename = md5(serialize($types) . $query_string) .'.css';
       $preprocess_file = drupal_build_css_cache($types, $filename);
-      $output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $preprocess_file .'" />'."\n";
+      $output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $preprocess_file .'" />' . "\n";
     }
   }
 
@@ -1757,6 +1793,7 @@ function drupal_get_css($css = NULL) {
  *   compress into one file.
  * @param $filename
  *   The name of the aggregate CSS file.
+ *
  * @return
  *   The name of the CSS file.
  */
@@ -1832,6 +1869,7 @@ function _drupal_build_css_path($matches
  *   Name of the stylesheet to be processed.
  * @param $optimize
  *   Defines if CSS contents should be compressed or not.
+ *
  * @return
  *   Contents of the stylesheet including the imported stylesheets.
  */
@@ -1945,6 +1983,7 @@ function drupal_clear_css_cache() {
  * @param $preprocess
  *   (optional) Should this JS file be aggregated if this
  *   feature has been turned on under the performance section?
+ *
  * @return
  *   If the first parameter is NULL, the JavaScript array that has been built so
  *   far for $scope is returned. If the first three parameters are NULL,
@@ -1984,9 +2023,11 @@ function drupal_add_js($data = NULL, $ty
       case 'setting':
         $javascript[$scope][$type][] = $data;
         break;
+
       case 'inline':
         $javascript[$scope][$type][] = array('code' => $data, 'defer' => $defer);
         break;
+
       default:
         // If cache is FALSE, don't preprocess the JS file.
         $javascript[$scope][$type][$data] = array('cache' => $cache, 'defer' => $defer, 'preprocess' => (!$cache ? FALSE : $preprocess));
@@ -2021,6 +2062,7 @@ function drupal_add_js($data = NULL, $ty
  * @parameter $javascript
  *   (optional) An array with all JavaScript code. Defaults to the default
  *   JavaScript array for the given scope.
+ *
  * @return
  *   All JavaScript code segments and includes for the scope as HTML tags.
  */
@@ -2037,13 +2079,13 @@ function drupal_get_js($scope = 'header'
     return '';
   }
 
-  $output = '';
-  $preprocessed = '';
+  $output        = '';
+  $preprocessed  = '';
   $no_preprocess = array('core' => '', 'module' => '', 'theme' => '');
-  $files = array();
+  $files         = array();
   $preprocess_js = (variable_get('preprocess_js', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update'));
-  $directory = file_directory_path();
-  $is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
+  $directory     = file_directory_path();
+  $is_writable   = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
 
   // A dummy query-string is added to filenames, to gain control over
   // browser-caching. The string changes on every update or full cache
@@ -2061,11 +2103,13 @@ function drupal_get_js($scope = 'header'
       case 'setting':
         $output .= '<script type="text/javascript">jQuery.extend(Drupal.settings, '. drupal_to_js(call_user_func_array('array_merge_recursive', $data)) .");</script>\n";
         break;
+
       case 'inline':
         foreach ($data as $info) {
           $output .= '<script type="text/javascript"'. ($info['defer'] ? ' defer="defer"' : '') .'>'. $info['code'] ."</script>\n";
         }
         break;
+
       default:
         // If JS preprocessing is off, we still need to output the scripts.
         // Additionally, go through any remaining scripts if JS preprocessing is on and output the non-cached ones.
@@ -2084,7 +2128,7 @@ function drupal_get_js($scope = 'header'
   if ($is_writable && $preprocess_js && count($files) > 0) {
     $filename = md5(serialize($files) . $query_string) .'.js';
     $preprocess_file = drupal_build_js_cache($files, $filename);
-    $preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>'."\n";
+    $preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>' . "\n";
   }
 
   // Keep the order of JS files consistent as some are preprocessed and others are not.
@@ -2229,6 +2273,7 @@ function drupal_add_tabledrag($table_id,
  *   An array of JS files to aggregate and compress into one file.
  * @param $filename
  *   The name of the aggregate JS file.
+ *
  * @return
  *   The name of the JS file.
  */
@@ -2271,20 +2316,25 @@ function drupal_clear_js_cache() {
 function drupal_to_js($var) {
   switch (gettype($var)) {
     case 'boolean':
-      return $var ? 'true' : 'false'; // Lowercase necessary!
+      // Lowercase necessary!
+      return $var ? 'true' : 'false';
+
     case 'integer':
     case 'double':
       return $var;
+
     case 'resource':
     case 'string':
       return '"'. str_replace(array("\r", "\n", "<", ">", "&"),
-                              array('\r', '\n', '\x3c', '\x3e', '\x26'),
-                              addslashes($var)) .'"';
+        array('\r', '\n', '\x3c', '\x3e', '\x26'),
+        addslashes($var)
+      ) .'"';
+
     case 'array':
       // Arrays in JSON can't be associative. If the array is empty or if it
       // has sequential whole number keys starting with 0, it's not associative
       // so we can go ahead and convert it as an array.
-      if (empty ($var) || array_keys($var) === range(0, sizeof($var) - 1)) {
+      if (empty($var) || array_keys($var) === range(0, sizeof($var) - 1)) {
         $output = array();
         foreach ($var as $v) {
           $output[] = drupal_to_js($v);
@@ -2298,6 +2348,7 @@ function drupal_to_js($var) {
         $output[] = drupal_to_js(strval($k)) .': '. drupal_to_js($v);
       }
       return '{ '. implode(', ', $output) .' }';
+
     default:
       return 'null';
   }
@@ -2343,8 +2394,9 @@ function drupal_json($var = NULL) {
 function drupal_urlencode($text) {
   if (variable_get('clean_url', '0')) {
     return str_replace(array('%2F', '%26', '%23', '//'),
-                       array('/', '%2526', '%2523', '/%252F'),
-                       rawurlencode($text));
+      array('/', '%2526', '%2523', '/%252F'),
+      rawurlencode($text)
+    );
   }
   else {
     return str_replace('%2F', '/', rawurlencode($text));
@@ -2385,6 +2437,7 @@ function drupal_get_token($value = '') {
  *   An additional value to base the token on.
  * @param $skip_anonymous
  *   Set to true to skip token validation for anonymous users.
+ *
  * @return
  *   True for a valid token, false for an invalid token. When $skip_anonymous
  *   is true, the return value will always be true for anonymous users.
@@ -2407,6 +2460,7 @@ function drupal_valid_token($token, $val
  *   For multiple requests (system.multicall):
  *     An array of call arrays. Each call array follows the pattern of the single
  *     request: method name followed by the arguments to the method.
+ *
  * @return
  *   For one request:
  *     Either the return value of the method on success, or FALSE.
@@ -2498,6 +2552,7 @@ function page_set_cache() {
 
 /**
  * Executes a cron run when called
+ *
  * @return
  * Returns TRUE if ran successfully
  */
@@ -2624,7 +2679,6 @@ function drupal_system_listing($mask, $d
   return $files;
 }
 
-
 /**
  * This dispatch function hands off structured Drupal arrays to type-specific
  * *_alter implementations. It ensures a consistent interface for all altering
@@ -2673,7 +2727,6 @@ function drupal_alter($type, &$data) {
   }
 }
 
-
 /**
  * Renders HTML given a structured array tree.
  *
@@ -2683,6 +2736,7 @@ function drupal_alter($type, &$data) {
  *
  * @param $elements
  *   The structured array describing the data to be rendered.
+ *
  * @return
  *   The rendered HTML.
  */
@@ -2720,6 +2774,7 @@ function drupal_render(&$elements) {
   if (!isset($elements['#children'])) {
     $children = element_children($elements);
     /* Render all the children that use a theme function */
+
     if (isset($elements['#theme']) && empty($elements['#theme_used'])) {
       $elements['#theme_used'] = TRUE;
 
@@ -2744,6 +2799,7 @@ function drupal_render(&$elements) {
       }
     }
     /* render each of the children using drupal_render and concatenate them */
+
     if (!isset($content) || $content === '') {
       foreach ($children as $key) {
         $content .= drupal_render($elements[$key]);
@@ -2824,7 +2880,7 @@ function drupal_common_theme() {
   return array(
     // theme.inc
     'placeholder' => array(
-      'arguments' => array('text' => NULL)
+      'arguments' => array('text' => NULL),
     ),
     'page' => array(
       'arguments' => array('content' => NULL, 'show_blocks' => TRUE, 'show_messages' => TRUE),
@@ -2894,7 +2950,7 @@ function drupal_common_theme() {
       'arguments' => array('url' => NULL, 'title' => NULL),
     ),
     'more_link' => array(
-      'arguments' => array('url' => NULL, 'title' => NULL)
+      'arguments' => array('url' => NULL, 'title' => NULL),
     ),
     'closure' => array(
       'arguments' => array('main' => 0),
@@ -3079,6 +3135,7 @@ function drupal_get_schema($table = NULL
  *
  * @param $module
  *   The module for which the tables will be created.
+ *
  * @return
  *   An array of arrays with the following key/value pairs:
  *      success: a boolean indicating whether the query succeeded
@@ -3104,6 +3161,7 @@ function drupal_install_schema($module) 
  *
  * @param $module
  *   The module for which the tables will be removed.
+ *
  * @return
  *   An array of arrays with the following key/value pairs:
  *      success: a boolean indicating whether the query succeeded
@@ -3219,6 +3277,7 @@ function drupal_schema_fields_sql($table
  *   If this is an update, specify the primary keys' field names. It is the
  *   caller's responsibility to know if a record for this object already
  *   exists in the database. If there is only 1 key, you may pass a simple string.
+ *
  * @return
  *   Failure to write a record will return FALSE. Otherwise SAVED_NEW or
  *   SAVED_UPDATED is returned depending on the operation performed. The
@@ -3297,7 +3356,7 @@ function drupal_write_record($table, &$o
       $query .= $field .' = '. $placeholders[$id];
     }
 
-    foreach ($update as $key){
+    foreach ($update as $key) {
       $conditions[] = "$key = ". db_type_placeholder($schema['fields'][$key]['type']);
       $values[] = $object->$key;
     }
@@ -3386,6 +3445,7 @@ function drupal_write_record($table, &$o
  *
  * @param $filename
  *   The file we are parsing. Accepts file with relative or absolute path.
+ *
  * @return
  *   The info array.
  */
@@ -3419,8 +3479,8 @@ function drupal_parse_info_file($filenam
       $value = stripslashes(substr($value1, 1, -1)) . stripslashes(substr($value2, 1, -1)) . $value3;
 
       // Parse array syntax
-      $keys = preg_split('/\]?\[/', rtrim($key, ']'));
-      $last = array_pop($keys);
+      $keys   = preg_split('/\]?\[/', rtrim($key, ']'));
+      $last   = array_pop($keys);
       $parent = &$info;
 
       // Create nested arrays
@@ -3451,6 +3511,7 @@ function drupal_parse_info_file($filenam
 }
 
 /**
+ *
  * @return
  *   Array of the possible severity levels for log messages.
  *
@@ -3458,18 +3519,17 @@ function drupal_parse_info_file($filenam
  */
 function watchdog_severity_levels() {
   return array(
-    WATCHDOG_EMERG    => t('emergency'),
-    WATCHDOG_ALERT    => t('alert'),
+    WATCHDOG_EMERG => t('emergency'),
+    WATCHDOG_ALERT => t('alert'),
     WATCHDOG_CRITICAL => t('critical'),
-    WATCHDOG_ERROR    => t('error'),
-    WATCHDOG_WARNING  => t('warning'),
-    WATCHDOG_NOTICE   => t('notice'),
-    WATCHDOG_INFO     => t('info'),
-    WATCHDOG_DEBUG    => t('debug'),
+    WATCHDOG_ERROR => t('error'),
+    WATCHDOG_WARNING => t('warning'),
+    WATCHDOG_NOTICE => t('notice'),
+    WATCHDOG_INFO => t('info'),
+    WATCHDOG_DEBUG => t('debug'),
   );
 }
 
-
 /**
  * Explode a string of given tags into an array.
  */
@@ -3545,10 +3605,11 @@ function drupal_flush_all_caches() {
  */
 function _drupal_flush_css_js() {
   $string_history = variable_get('css_js_query_string', '00000000000000000000');
-  $new_character = $string_history[0];
-  $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
+  $new_character  = $string_history[0];
+  $characters     = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
   while (strpos($string_history, $new_character) !== FALSE) {
     $new_character = $characters[mt_rand(0, strlen($characters) - 1)];
   }
   variable_set('css_js_query_string', $new_character . substr($string_history, 0, 19));
 }
+
Index: includes/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.inc,v
retrieving revision 1.92
diff -u -p -r1.92 database.inc
--- includes/database.inc	8 Jan 2008 16:03:31 -0000	1.92
+++ includes/database.inc	21 Jan 2008 21:58:44 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: database.inc,v 1.92 2008/01/08 16:03:31 goba Exp $
 
+
 /**
  * @file
  * Wrapper for database interface code.
@@ -56,6 +57,7 @@ define('DB_ERROR', 'a515ac9c2796ca0e23ad
  * @param $sql
  *   A string containing a complete SQL query.  %-substitution
  *   parameters are not supported.
+ *
  * @return
  *   An array containing the keys:
  *      success: a boolean indicating whether the query succeeded
@@ -76,6 +78,7 @@ function update_sql($sql) {
  *
  * @param $sql
  *   A string containing a partial or entire SQL query.
+ *
  * @return
  *   The properly-prefixed string.
  */
@@ -206,15 +209,22 @@ function _db_query_callback($match, $ini
   }
 
   switch ($match[1]) {
-    case '%d': // We must use type casting to int to convert FALSE/NULL/(TRUE?)
-      return (int) array_shift($args); // We don't need db_escape_string as numbers are db-safe
+    case '%d':
+      // We must use type casting to int to convert FALSE/NULL/(TRUE?)
+      // We don't need db_escape_string as numbers are db-safe
+      return (int) array_shift($args);
+
     case '%s':
       return db_escape_string(array_shift($args));
+
     case '%%':
       return '%';
+
     case '%f':
       return (float) array_shift($args);
-    case '%b': // binary data
+
+    case '%b':
+      // binary data
       return db_encode_blob(array_shift($args));
   }
 }
@@ -257,12 +267,13 @@ define('DB_QUERY_REGEXP', '/(%d|%s|%%|%f
  *   Name of the primary field.
  * @param $args
  *   Array of additional arguments.
+ *
  * @return
  *   An array: join statements, where statements, field or DISTINCT(field).
  */
 function _db_rewrite_sql($query = '', $primary_table = 'n', $primary_field = 'nid', $args = array()) {
-  $where = array();
-  $join = array();
+  $where    = array();
+  $join     = array();
   $distinct = FALSE;
   foreach (module_implements('db_rewrite_sql') as $module) {
     $result = module_invoke($module, 'db_rewrite_sql', $query, $primary_table, $primary_field, $args);
@@ -303,11 +314,12 @@ function _db_rewrite_sql($query = '', $p
  *   Name of the primary field.
  * @param $args
  *   An array of arguments, passed to the implementations of hook_db_rewrite_sql.
+ *
  * @return
  *   The original query with JOIN and WHERE statements inserted from
  *   hook_db_rewrite_sql implementations. nid is rewritten if needed.
  */
-function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid',  $args = array()) {
+function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid', $args = array()) {
   list($join, $where, $distinct) = _db_rewrite_sql($query, $primary_table, $primary_field, $args);
 
   if ($distinct) {
@@ -329,9 +341,9 @@ function db_rewrite_sql($query, $primary
     }x';
     preg_match($pattern, $query, $matches);
     if ($where) {
-      $n = strlen($matches[1]);
+      $n           = strlen($matches[1]);
       $second_part = substr($query, $n);
-      $first_part = substr($matches[1], 0, $n - 5) ." $join WHERE $where AND ( ";
+      $first_part  = substr($matches[1], 0, $n - 5) ." $join WHERE $where AND ( ";
       // PHP 4 does not support strrpos for strings. We emulate it.
       $haystack_reverse = strrev($second_part);
       // No need to use strrev on the needle, we supply GROUP, ORDER, LIMIT
@@ -482,7 +494,7 @@ function db_escape_table($string) {
  * @see drupal_install_schema()
  */
 
- /**
+/**
  * Create a new table from a Drupal table definition.
  *
  * @param $ret
@@ -507,6 +519,7 @@ function db_create_table(&$ret, $name, $
  *
  * @param $fields
  *   An array of key/index column specifiers.
+ *
  * @return
  *   An array of field names.
  */
@@ -531,6 +544,7 @@ function db_field_names($fields) {
  *
  * @param $type
  *   The Schema API type of a field.
+ *
  * @return
  *   The placeholder string to embed in a query for that type.
  */
@@ -570,3 +584,4 @@ function db_type_placeholder($type) {
 /**
  * @} End of "defgroup schemaapi".
  */
+
Index: includes/database.mysql-common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql-common.inc,v
retrieving revision 1.16
diff -u -p -r1.16 database.mysql-common.inc
--- includes/database.mysql-common.inc	23 Dec 2007 13:22:12 -0000	1.16
+++ includes/database.mysql-common.inc	21 Jan 2008 21:58:44 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: database.mysql-common.inc,v 1.16 2007/12/23 13:22:12 goba Exp $
 
+
 /**
  * @file
  * Functions shared between mysql and mysqli database engines.
@@ -34,7 +35,8 @@ function db_query($query) {
   $args = func_get_args();
   array_shift($args);
   $query = db_prefix_tables($query);
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -54,6 +56,7 @@ function db_query($query) {
  *   The name of the table to create.
  * @param $table
  *   A Schema API table definition array.
+ *
  * @return
  *   An array of SQL statements to create the table.
  */
@@ -198,38 +201,31 @@ function db_type_map() {
   // it much easier for modules (such as schema.module) to map
   // database types back into schema types.
   $map = array(
-    'varchar:normal'  => 'VARCHAR',
-    'char:normal'     => 'CHAR',
-
-    'text:tiny'       => 'SMALLTEXT',
-    'text:small'      => 'SMALLTEXT',
-    'text:medium'     => 'MEDIUMTEXT',
-    'text:big'        => 'LONGTEXT',
-    'text:normal'     => 'TEXT',
-
-    'serial:tiny'     => 'TINYINT',
-    'serial:small'    => 'SMALLINT',
-    'serial:medium'   => 'MEDIUMINT',
-    'serial:big'      => 'BIGINT',
-    'serial:normal'   => 'INT',
-
-    'int:tiny'        => 'TINYINT',
-    'int:small'       => 'SMALLINT',
-    'int:medium'      => 'MEDIUMINT',
-    'int:big'         => 'BIGINT',
-    'int:normal'      => 'INT',
-
-    'float:tiny'      => 'FLOAT',
-    'float:small'     => 'FLOAT',
-    'float:medium'    => 'FLOAT',
-    'float:big'       => 'DOUBLE',
-    'float:normal'    => 'FLOAT',
-
-    'numeric:normal'  => 'DECIMAL',
-
-    'blob:big'        => 'LONGBLOB',
-    'blob:normal'     => 'BLOB',
-
+    'varchar:normal' => 'VARCHAR',
+    'char:normal' => 'CHAR',
+    'text:tiny' => 'SMALLTEXT',
+    'text:small' => 'SMALLTEXT',
+    'text:medium' => 'MEDIUMTEXT',
+    'text:big' => 'LONGTEXT',
+    'text:normal' => 'TEXT',
+    'serial:tiny' => 'TINYINT',
+    'serial:small' => 'SMALLINT',
+    'serial:medium' => 'MEDIUMINT',
+    'serial:big' => 'BIGINT',
+    'serial:normal' => 'INT',
+    'int:tiny' => 'TINYINT',
+    'int:small' => 'SMALLINT',
+    'int:medium' => 'MEDIUMINT',
+    'int:big' => 'BIGINT',
+    'int:normal' => 'INT',
+    'float:tiny' => 'FLOAT',
+    'float:small' => 'FLOAT',
+    'float:medium' => 'FLOAT',
+    'float:big' => 'DOUBLE',
+    'float:normal' => 'FLOAT',
+    'numeric:normal' => 'DECIMAL',
+    'blob:big' => 'LONGBLOB',
+    'blob:normal' => 'BLOB',
     'datetime:normal' => 'DATETIME',
   );
   return $map;
@@ -298,9 +294,9 @@ function db_add_field(&$ret, $table, $fi
   $ret[] = update_sql($query);
   if (isset($spec['initial'])) {
     // All this because update_sql does not support %-placeholders.
-    $sql = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);
+    $sql    = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);
     $result = db_query($sql, $spec['initial']);
-    $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));
+    $ret[]  = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));
   }
   if ($fixnull) {
     $spec['not null'] = TRUE;
@@ -371,7 +367,8 @@ function db_field_set_no_default(&$ret, 
  */
 function db_add_primary_key(&$ret, $table, $fields) {
   $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD PRIMARY KEY ('.
-    _db_create_key_sql($fields) .')');
+    _db_create_key_sql($fields) .')'
+  );
 }
 
 /**
@@ -400,7 +397,8 @@ function db_drop_primary_key(&$ret, $tab
  */
 function db_add_unique_key(&$ret, $table, $name, $fields) {
   $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD UNIQUE KEY '.
-    $name .' ('. _db_create_key_sql($fields) .')');
+    $name .' ('. _db_create_key_sql($fields) .')'
+  );
 }
 
 /**
@@ -510,10 +508,8 @@ function db_drop_index(&$ret, $table, $n
  *   table along with changing the field. The format is the same as a
  *   table specification but without the 'fields' element.
  */
-
 function db_change_field(&$ret, $table, $field, $field_new, $spec, $keys_new = array()) {
-  $sql = 'ALTER TABLE {'. $table .'} CHANGE '. $field .' '.
-    _db_create_field_sql($field_new, _db_process_field($spec));
+  $sql = 'ALTER TABLE {'. $table .'} CHANGE '. $field .' '. _db_create_field_sql($field_new, _db_process_field($spec));
   if (count($keys_new)) {
     $sql .= ', ADD '. implode(', ADD ', _db_create_keys_sql($keys_new));
   }
@@ -531,3 +527,4 @@ function db_change_field(&$ret, $table, 
 function db_last_insert_id($table, $field) {
   return db_result(db_query('SELECT LAST_INSERT_ID()'));
 }
+
Index: includes/database.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql.inc,v
retrieving revision 1.87
diff -u -p -r1.87 database.mysql.inc
--- includes/database.mysql.inc	4 Jan 2008 09:31:48 -0000	1.87
+++ includes/database.mysql.inc	21 Jan 2008 21:58:44 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: database.mysql.inc,v 1.87 2008/01/04 09:31:48 goba Exp $
 
+
 /**
  * @file
  * Database interface code for MySQL database servers.
@@ -117,8 +118,8 @@ function _db_query($query, $debug = 0) {
   if (variable_get('dev_query', 0)) {
     $query = $bt[2]['function'] ."\n". $query;
     list($usec, $sec) = explode(' ', microtime());
-    $stop = (float)$usec + (float)$sec;
-    $diff = $stop - $timer;
+    $stop      = (float)$usec + (float)$sec;
+    $diff      = $stop - $timer;
     $queries[] = array($query, $diff);
   }
 
@@ -142,6 +143,7 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
@@ -157,6 +159,7 @@ function db_fetch_object($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An associative array representing the next row of the result, or FALSE.
  *   The keys of this object are the names of the table fields selected by the
@@ -176,6 +179,7 @@ function db_fetch_array($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   The resulting field or FALSE.
  */
@@ -229,18 +233,20 @@ function db_affected_rows() {
  *   The first result row to return.
  * @param $count
  *   The maximum number of result rows to return.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
  */
 function db_query_range($query) {
-  $args = func_get_args();
+  $args  = func_get_args();
   $count = array_pop($args);
-  $from = array_pop($args);
+  $from  = array_pop($args);
   array_shift($args);
 
   $query = db_prefix_tables($query);
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -277,6 +283,7 @@ function db_query_range($query) {
  * @param $table
  *   The name of the temporary table to select into. This name will not be
  *   prefixed as there is no risk of collision.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
@@ -287,7 +294,8 @@ function db_query_temporary($query) {
   array_shift($args);
 
   $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE '. $tablename .' Engine=HEAP SELECT', db_prefix_tables($query));
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -300,6 +308,7 @@ function db_query_temporary($query) {
  *
  * @param $data
  *   Data to encode.
+ *
  * @return
  *  Encoded data.
  */
@@ -313,6 +322,7 @@ function db_encode_blob($data) {
  *
  * @param $data
  *   Data to decode.
+ *
  * @return
  *  Decoded data.
  */
@@ -365,6 +375,7 @@ function db_column_exists($table, $colum
  * @param $table Table containing the field to set as DISTINCT
  * @param $field Field to set as DISTINCT
  * @param $query Query to apply the wrapper to
+ *
  * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
  */
 function db_distinct_field($table, $field, $query) {
@@ -376,3 +387,4 @@ function db_distinct_field($table, $fiel
 /**
  * @} End of "ingroup database".
  */
+
Index: includes/database.mysqli.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysqli.inc,v
retrieving revision 1.53
diff -u -p -r1.53 database.mysqli.inc
--- includes/database.mysqli.inc	4 Jan 2008 09:31:48 -0000	1.53
+++ includes/database.mysqli.inc	21 Jan 2008 21:58:44 -0000
@@ -1,13 +1,14 @@
 <?php
 // $Id: database.mysqli.inc,v 1.53 2008/01/04 09:31:48 goba Exp $
 
+
 /**
  * @file
  * Database interface code for MySQL database servers using the mysqli client libraries. mysqli is included in PHP 5 by default and allows developers to use the advanced features of MySQL 4.1.x, 5.0.x and beyond.
  */
 
- // Maintainers of this file should consult:
- // http://www.php.net/manual/en/ref.mysqli.php
+// Maintainers of this file should consult:
+// http://www.php.net/manual/en/ref.mysqli.php
 
 /**
  * @ingroup database
@@ -115,8 +116,8 @@ function _db_query($query, $debug = 0) {
   if (variable_get('dev_query', 0)) {
     $query = $bt[2]['function'] ."\n". $query;
     list($usec, $sec) = explode(' ', microtime());
-    $stop = (float)$usec + (float)$sec;
-    $diff = $stop - $timer;
+    $stop      = (float)$usec + (float)$sec;
+    $diff      = $stop - $timer;
     $queries[] = array($query, $diff);
   }
 
@@ -140,6 +141,7 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
@@ -156,6 +158,7 @@ function db_fetch_object($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An associative array representing the next row of the result, or FALSE.
  *   The keys of this object are the names of the table fields selected by the
@@ -176,6 +179,7 @@ function db_fetch_array($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   The resulting field or FALSE.
  */
@@ -201,7 +205,8 @@ function db_error() {
  * Determine the number of rows changed by the preceding query.
  */
 function db_affected_rows() {
-  global $active_db; /* mysqli connection resource */
+  /* mysqli connection resource */
+  global $active_db;
   return mysqli_affected_rows($active_db);
 }
 
@@ -229,18 +234,20 @@ function db_affected_rows() {
  *   The first result row to return.
  * @param $count
  *   The maximum number of result rows to return.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
  */
 function db_query_range($query) {
-  $args = func_get_args();
+  $args  = func_get_args();
   $count = array_pop($args);
-  $from = array_pop($args);
+  $from  = array_pop($args);
   array_shift($args);
 
   $query = db_prefix_tables($query);
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -277,6 +284,7 @@ function db_query_range($query) {
  * @param $table
  *   The name of the temporary table to select into. This name will not be
  *   prefixed as there is no risk of collision.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
@@ -287,7 +295,8 @@ function db_query_temporary($query) {
   array_shift($args);
 
   $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE '. $tablename .' Engine=HEAP SELECT', db_prefix_tables($query));
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -300,6 +309,7 @@ function db_query_temporary($query) {
  *
  * @param $data
  *   Data to encode.
+ *
  * @return
  *  Encoded data.
  */
@@ -313,6 +323,7 @@ function db_encode_blob($data) {
  *
  * @param $data
  *   Data to decode.
+ *
  * @return
  *  Decoded data.
  */
@@ -365,6 +376,7 @@ function db_column_exists($table, $colum
  * @param $table Table containing the field to set as DISTINCT
  * @param $field Field to set as DISTINCT
  * @param $query Query to apply the wrapper to
+ *
  * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
  */
 function db_distinct_field($table, $field, $query) {
Index: includes/database.pgsql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.pgsql.inc,v
retrieving revision 1.68
diff -u -p -r1.68 database.pgsql.inc
--- includes/database.pgsql.inc	4 Jan 2008 09:31:48 -0000	1.68
+++ includes/database.pgsql.inc	21 Jan 2008 21:58:44 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: database.pgsql.inc,v 1.68 2008/01/04 09:31:48 goba Exp $
 
+
 /**
  * @file
  * Database interface code for PostgreSQL database servers.
@@ -116,7 +117,8 @@ function db_query($query) {
   $args = func_get_args();
   array_shift($args);
   $query = db_prefix_tables($query);
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -141,8 +143,8 @@ function _db_query($query, $debug = 0) {
     $bt = debug_backtrace();
     $query = $bt[2]['function'] ."\n". $query;
     list($usec, $sec) = explode(' ', microtime());
-    $stop = (float)$usec + (float)$sec;
-    $diff = $stop - $timer;
+    $stop      = (float)$usec + (float)$sec;
+    $diff      = $stop - $timer;
     $queries[] = array($query, $diff);
   }
 
@@ -166,6 +168,7 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
@@ -181,6 +184,7 @@ function db_fetch_object($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   An associative array representing the next row of the result, or FALSE.
  *   The keys of this object are the names of the table fields selected by the
@@ -200,6 +204,7 @@ function db_fetch_array($result) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ *
  * @return
  *   The resulting field or FALSE.
  */
@@ -264,18 +269,20 @@ function db_affected_rows() {
  *   The first result row to return.
  * @param $count
  *   The maximum number of result rows to return.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
  */
 function db_query_range($query) {
-  $args = func_get_args();
+  $args  = func_get_args();
   $count = array_pop($args);
-  $from = array_pop($args);
+  $from  = array_pop($args);
   array_shift($args);
 
   $query = db_prefix_tables($query);
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -312,6 +319,7 @@ function db_query_range($query) {
  * @param $table
  *   The name of the temporary table to select into. This name will not be
  *   prefixed as there is no risk of collision.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
@@ -322,7 +330,8 @@ function db_query_temporary($query) {
   array_shift($args);
 
   $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE '. $tablename .' AS SELECT', db_prefix_tables($query));
-  if (isset($args[0]) and is_array($args[0])) { // 'All arguments in one array' syntax
+  // 'All arguments in one array' syntax
+  if (isset($args[0]) and is_array($args[0])) {
     $args = $args[0];
   }
   _db_query_callback($args, TRUE);
@@ -336,6 +345,7 @@ function db_query_temporary($query) {
  *
  * @param $data
  *   Data to encode.
+ *
  * @return
  *  Encoded data.
  */
@@ -349,6 +359,7 @@ function db_encode_blob($data) {
  *
  * @param $data
  *   Data to decode.
+ *
  * @return
  *  Decoded data.
  */
@@ -415,13 +426,14 @@ function db_check_setup() {
  * @param $table Table containing the field to set as DISTINCT
  * @param $field Field to set as DISTINCT
  * @param $query Query to apply the wrapper to
+ *
  * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
  */
 function db_distinct_field($table, $field, $query) {
   $field_to_select = 'DISTINCT ON ('. $table .'.'. $field .") $table.$field";
   // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
   $query = preg_replace('/(SELECT.*)(?:'. $table .'\.|\s)(?<!DISTINCT\()(?<!DISTINCT\('. $table .'\.)'. $field .'(.*FROM )/AUsi', '\1 '. $field_to_select .'\2', $query);
-  $query = preg_replace('/(ORDER BY )(?!'. $table .'\.'. $field .')/', '\1'."$table.$field, ", $query);
+  $query = preg_replace('/(ORDER BY )(?!'. $table .'\.'. $field .')/', '\1'. "$table.$field, ", $query);
   return $query;
 }
 
@@ -445,32 +457,25 @@ function db_type_map() {
   $map = array(
     'varchar:normal' => 'varchar',
     'char:normal' => 'character',
-
     'text:tiny' => 'text',
     'text:small' => 'text',
     'text:medium' => 'text',
     'text:big' => 'text',
     'text:normal' => 'text',
-
     'int:tiny' => 'smallint',
     'int:small' => 'smallint',
     'int:medium' => 'int',
     'int:big' => 'bigint',
     'int:normal' => 'int',
-
     'float:tiny' => 'real',
     'float:small' => 'real',
     'float:medium' => 'real',
     'float:big' => 'double precision',
     'float:normal' => 'real',
-
     'numeric:normal' => 'numeric',
-
     'blob:big' => 'bytea',
     'blob:normal' => 'bytea',
-
     'datetime:normal' => 'timestamp',
-
     'serial:tiny' => 'serial',
     'serial:small' => 'serial',
     'serial:medium' => 'serial',
@@ -487,6 +492,7 @@ function db_type_map() {
  *   The name of the table to create.
  * @param $table
  *   A Schema API table definition array.
+ *
  * @return
  *   An array of SQL statements to create the table.
  */
@@ -684,9 +690,9 @@ function db_add_field(&$ret, $table, $fi
   $ret[] = update_sql($query);
   if (isset($spec['initial'])) {
     // All this because update_sql does not support %-placeholders.
-    $sql = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);
+    $sql    = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);
     $result = db_query($sql, $spec['initial']);
-    $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));
+    $ret[]  = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));
   }
   if ($fixnull) {
     $ret[] = update_sql("ALTER TABLE {". $table ."} ALTER $field SET NOT NULL");
@@ -759,7 +765,8 @@ function db_field_set_no_default(&$ret, 
  */
 function db_add_primary_key(&$ret, $table, $fields) {
   $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD PRIMARY KEY ('.
-    implode(',', $fields) .')');
+    implode(',', $fields) .')'
+  );
 }
 
 /**
@@ -789,7 +796,8 @@ function db_drop_primary_key(&$ret, $tab
 function db_add_unique_key(&$ret, $table, $name, $fields) {
   $name = '{'. $table .'}_'. $name .'_key';
   $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD CONSTRAINT '.
-    $name .' UNIQUE ('. implode(',', $fields) .')');
+    $name .' UNIQUE ('. implode(',', $fields) .')'
+  );
 }
 
 /**
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.118
diff -u -p -r1.118 file.inc
--- includes/file.inc	9 Jan 2008 10:39:48 -0000	1.118
+++ includes/file.inc	21 Jan 2008 21:58:45 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: file.inc,v 1.118 2008/01/09 10:39:48 goba Exp $
 
+
 /**
  * @file
  * API for handling file uploads and server file management.
@@ -36,6 +37,7 @@ define('FILE_STATUS_PERMANENT', 1);
  * Create the download path to a file.
  *
  * @param $path A string containing the path of the file to generate URL for.
+ *
  * @return A string containing a URL that can be used to download the file.
  */
 function file_create_url($path) {
@@ -46,6 +48,7 @@ function file_create_url($path) {
   switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {
     case FILE_DOWNLOADS_PUBLIC:
       return $GLOBALS['base_url'] .'/'. file_directory_path() .'/'. str_replace('\\', '/', $path);
+
     case FILE_DOWNLOADS_PRIVATE:
       return url('system/files/'. $path, array('absolute' => TRUE));
   }
@@ -57,6 +60,7 @@ function file_create_url($path) {
  *
  * @param $dest A string containing the path to verify. If this value is
  *   omitted, Drupal's 'files' directory will be used.
+ *
  * @return A string containing the path to file, with file system directory
  *   appended if necessary, or FALSE if the path is invalid (i.e. outside the
  *   configured 'files' or temp directories).
@@ -93,6 +97,7 @@ function file_create_path($dest = 0) {
  *   any errors will be attached to. This is useful for settings forms that
  *   require the user to specify a writable directory. If it can't be made to
  *   work, a form error will be set preventing them from saving the settings.
+ *
  * @return FALSE when directory not found, or TRUE when directory exists.
  */
 function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
@@ -102,7 +107,8 @@ function file_check_directory(&$director
   if (!is_dir($directory)) {
     if (($mode & FILE_CREATE_DIRECTORY) && @mkdir($directory)) {
       drupal_set_message(t('The directory %directory has been created.', array('%directory' => $directory)));
-      @chmod($directory, 0775); // Necessary for non-webserver users.
+      // Necessary for non-webserver users.
+      @chmod($directory, 0775);
     }
     else {
       if ($form_item) {
@@ -145,6 +151,7 @@ function file_check_directory(&$director
  *
  * @param $path A string containing a file path. This will be set to the
  *   directory's path.
+ *
  * @return If the directory is not in a Drupal writable directory, FALSE is
  *   returned. Otherwise, the base name of the path is returned.
  */
@@ -176,6 +183,7 @@ function file_check_path(&$path) {
  *
  * @param $source A string set to the file to check.
  * @param $directory A string where the file should be located.
+ *
  * @return 0 for invalid path or the real path of the source.
  */
 function file_check_location($source, $directory = '') {
@@ -211,6 +219,7 @@ function file_check_location($source, $d
  *   - FILE_EXISTS_REPLACE - Replace the existing file
  *   - FILE_EXISTS_RENAME - Append _{incrementing number} until the filename is unique
  *   - FILE_EXISTS_ERROR - Do nothing and return FALSE.
+ *
  * @return True for success, FALSE for failure.
  */
 function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
@@ -270,13 +279,14 @@ function file_copy(&$source, $dest = 0, 
   if (isset($file) && is_object($file)) {
     $file->filename = $basename;
     $file->filepath = $dest;
-    $source = $file;
+    $source         = $file;
   }
   else {
     $source = $dest;
   }
 
-  return 1; // Everything went ok.
+  // Everything went ok.
+  return 1;
 }
 
 /**
@@ -289,6 +299,7 @@ function file_copy(&$source, $dest = 0, 
  *   - FILE_EXISTS_RENAME - Append _{incrementing number} until the filename is
  *     unique
  *   - FILE_EXISTS_ERROR - Do nothing and return FALSE.
+ *
  * @return The destination file path or FALSE if the file already exists and
  *   FILE_EXISTS_ERROR was specified.
  */
@@ -296,8 +307,8 @@ function file_destination($destination, 
   if (file_exists($destination)) {
     switch ($replace) {
       case FILE_EXISTS_RENAME:
-        $basename = basename($destination);
-        $directory = dirname($destination);
+        $basename    = basename($destination);
+        $directory   = dirname($destination);
         $destination = file_create_filename($basename, $directory);
         break;
 
@@ -325,6 +336,7 @@ function file_destination($destination, 
  *   - FILE_EXISTS_REPLACE - Replace the existing file
  *   - FILE_EXISTS_RENAME - Append _{incrementing number} until the filename is unique
  *   - FILE_EXISTS_ERROR - Do nothing and return FALSE.
+ *
  * @return True for success, FALSE for failure.
  */
 function file_move(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
@@ -350,6 +362,7 @@ function file_move(&$source, $dest = 0, 
  *   be altered.
  * @param $alerts Whether alerts (watchdog, drupal_set_message()) should be
  *   displayed.
+ *
  * @return $filename The potentially modified $filename.
  */
 function file_munge_filename($filename, $extensions, $alerts = TRUE) {
@@ -362,8 +375,10 @@ function file_munge_filename($filename, 
     // Split the filename up by periods. The first part becomes the basename
     // the last part the final extension.
     $filename_parts = explode('.', $filename);
-    $new_filename = array_shift($filename_parts); // Remove file basename.
-    $final_extension = array_pop($filename_parts); // Remove final extension.
+    // Remove file basename.
+    $new_filename = array_shift($filename_parts);
+    // Remove final extension.
+    $final_extension = array_pop($filename_parts);
 
     // Loop through the middle parts of the name and add an underscore to the
     // end of each section that could be a file extension but isn't in the list
@@ -388,6 +403,7 @@ function file_munge_filename($filename, 
  * Undo the effect of upload_munge_filename().
  *
  * @param $filename string filename
+ *
  * @return string
  */
 function file_unmunge_filename($filename) {
@@ -400,6 +416,7 @@ function file_unmunge_filename($filename
  *
  * @param $basename string filename
  * @param $directory string directory
+ *
  * @return
  */
 function file_create_filename($basename, $directory) {
@@ -428,6 +445,7 @@ function file_create_filename($basename,
  * Delete a file.
  *
  * @param $path A string containing a file path.
+ *
  * @return TRUE for success, FALSE for failure.
  */
 function file_delete($path) {
@@ -474,6 +492,7 @@ function file_space_used($uid = NULL) {
  *   A boolean indicating whether an existing file of the same name in the
  *   destination directory should overwritten. A false value will generate a
  *   new, unique filename in the destination directory.
+ *
  * @return
  *   An object containing the file information, or 0 in the event of an error.
  */
@@ -496,6 +515,7 @@ function file_save_upload($source, $vali
     // lower level system error occurred.
     switch ($_FILES['files']['error'][$source]) {
       // @see http://php.net/manual/en/features.file-upload.errors.php
+
       case UPLOAD_ERR_OK:
         break;
 
@@ -509,7 +529,8 @@ function file_save_upload($source, $vali
         drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => $source)), 'error');
         return 0;
 
-        // Unknown error
+      // Unknown error
+
       default:
         drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $source)), 'error');
         return 0;
@@ -520,11 +541,12 @@ function file_save_upload($source, $vali
     $extensions = '';
     foreach ($user->roles as $rid => $name) {
       $extensions .= ' '. variable_get("upload_extensions_$rid",
-      variable_get('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp'));
+        variable_get('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps odt ods odp')
+      );
     }
 
     // Begin building file object.
-    $file = new stdClass();
+    $file           = new stdClass();
     $file->filename = file_munge_filename(trim(basename($_FILES['files']['name'][$source]), '.'), $extensions);
     $file->filepath = $_FILES['files']['tmp_name'][$source];
     $file->filemime = $_FILES['files']['type'][$source];
@@ -542,9 +564,9 @@ function file_save_upload($source, $vali
       $dest = file_directory_temp();
     }
 
-    $file->source = $source;
+    $file->source      = $source;
     $file->destination = file_destination(file_create_path($dest .'/'. $file->filename), FILE_EXISTS_RENAME);
-    $file->filesize = $_FILES['files']['size'][$source];
+    $file->filesize    = $_FILES['files']['size'][$source];
 
     // Call the validation functions.
     $errors = array();
@@ -576,8 +598,8 @@ function file_save_upload($source, $vali
     }
 
     // If we made it this far it's safe to record this file in the database.
-    $file->uid = $user->uid;
-    $file->status = FILE_STATUS_TEMPORARY;
+    $file->uid       = $user->uid;
+    $file->status    = FILE_STATUS_TEMPORARY;
     $file->timestamp = time();
     drupal_write_record('files', $file);
 
@@ -593,6 +615,7 @@ function file_save_upload($source, $vali
  *
  * @param $file
  *   A Drupal file object.
+ *
  * @return
  *   An array. If the file name is too long, it will contain an error message.
  */
@@ -613,6 +636,7 @@ function file_validate_name_length($file
  *   A Drupal file object.
  * @param $extensions
  *   A string with a space separated
+ *
  * @return
  *   An array. If the file extension is not allowed, it will contain an error message.
  */
@@ -643,6 +667,7 @@ function file_validate_extensions($file,
  * @param $$user_limit
  *   An integer specifying the maximum number of bytes the user is allowed. Zero
  *   indicates that no limit should be enforced.
+ *
  * @return
  *   An array. If the file size exceeds limits, it will contain an error message.
  */
@@ -670,6 +695,7 @@ function file_validate_size($file, $file
  *
  * @param $file
  *   A Drupal file object.
+ *
  * @return
  *   An array. If the file is not an image, it will contain an error message.
  */
@@ -698,6 +724,7 @@ function file_validate_is_image(&$file) 
  * @param $minimum_dimensions
  *   An optional string in the form WIDTHxHEIGHT. This will check that the image
  *   meets a minimum size. A value of 0 indicates no restriction.
+ *
  * @return
  *   An array. If the file is an image and did not meet the requirements, it
  *   will contain an error message.
@@ -773,6 +800,7 @@ function file_save_data($data, $dest, $r
  *
  * @param file A Drupal file object
  * @param status A status value to set the file to.
+ *
  * @return FALSE on failure, TRUE on success and $file->status will contain the
  *     status.
  */
@@ -831,7 +859,7 @@ function file_download() {
 
   // Maintain compatibility with old ?file=paths saved in node bodies.
   if (isset($_GET['file'])) {
-    $filepath =  $_GET['file'];
+    $filepath = $_GET['file'];
   }
 
   if (file_exists(file_create_path($filepath))) {
@@ -846,7 +874,6 @@ function file_download() {
   return drupal_not_found();
 }
 
-
 /**
  * Finds all files that match a given mask in a given directory.
  * Directories and files beginning with a period are excluded; this
@@ -930,8 +957,8 @@ function file_directory_temp() {
 
     // Operating system specific dirs.
     if (substr(PHP_OS, 0, 3) == 'WIN') {
-      $directories[] = 'c:\\windows\\temp';
-      $directories[] = 'c:\\winnt\\temp';
+      $directories[]  = 'c:\\windows\\temp';
+      $directories[]  = 'c:\\winnt\\temp';
       $path_delimiter = '\\';
     }
     else {
@@ -973,8 +1000,9 @@ function file_upload_max_size() {
 
   if ($max_size < 0) {
     $upload_max = parse_size(ini_get('upload_max_filesize'));
-    $post_max = parse_size(ini_get('post_max_size'));
-    $max_size = ($upload_max < $post_max) ? $upload_max : $post_max;
+    $post_max   = parse_size(ini_get('post_max_size'));
+    $max_size   = ($upload_max < $post_max) ? $upload_max : $post_max;
   }
   return $max_size;
 }
+
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.259
diff -u -p -r1.259 form.inc
--- includes/form.inc	21 Jan 2008 15:17:01 -0000	1.259
+++ includes/form.inc	21 Jan 2008 21:58:45 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: form.inc,v 1.259 2008/01/21 15:17:01 goba Exp $
 
+
 /**
  * @defgroup forms Form builder functions
  * @{
@@ -8,9 +9,9 @@
  *
  * All modules should declare their form builder functions to be in this
  * group and each builder function should reference its validate and submit
- * functions using \@see. Conversely, validate and submit functions should 
+ * functions using \@see. Conversely, validate and submit functions should
  * reference the form builder function using \@see. For examples, of this see
- * system_modules_uninstall() or user_pass(), the latter of which has the 
+ * system_modules_uninstall() or user_pass(), the latter of which has the
  * following in its doxygen documentation:
  *
  * \@ingroup forms
@@ -63,6 +64,7 @@
  *   drupal_get_form(), including the unique form constructor function.
  *   For example, the node_edit form requires that a node object be passed
  *   in here when it is called.
+ *
  * @return
  *   The rendered form.
  */
@@ -99,8 +101,8 @@ function drupal_get_form($form_id) {
       $args_temp[0] = &$form_state;
       array_unshift($args_temp, $form_id);
 
-      $form = call_user_func_array('drupal_retrieve_form', $args_temp);
-      $form_build_id = 'form-'. md5(mt_rand());
+      $form              = call_user_func_array('drupal_retrieve_form', $args_temp);
+      $form_build_id     = 'form-'. md5(mt_rand());
       $form['#build_id'] = $form_build_id;
       drupal_prepare_form($form_id, $form, $form_state);
       // Store a copy of the unprocessed form for caching and indicate that it
@@ -182,6 +184,7 @@ function drupal_get_form($form_id) {
  *   If the AHAH callback calling this function only alters part of the form,
  *   then pass in the existing form_build_id so we can re-cache with the same
  *   csid.
+ *
  * @return
  *   The newly built form.
  */
@@ -282,8 +285,8 @@ function form_set_cache($form_build_id, 
  * drupal_execute('story_node_form', $form_state, $node);
  */
 function drupal_execute($form_id, &$form_state) {
-  $args = func_get_args();
-  $form = call_user_func_array('drupal_retrieve_form', $args);
+  $args          = func_get_args();
+  $form          = call_user_func_array('drupal_retrieve_form', $args);
   $form['#post'] = $form_state['values'];
   drupal_prepare_form($form_id, $form, $form_state);
   drupal_process_form($form_id, $form, $form_state);
@@ -411,7 +414,7 @@ function drupal_process_form($form_id, &
       // possibly ending execution. We make sure we do not react to the batch
       // that is already being processed (if a batch operation performs a
       // drupal_execute).
-      if ($batch =& batch_get() && !isset($batch['current_set'])) {
+      if ($batch = &batch_get() && !isset($batch['current_set'])) {
         // The batch uses its own copies of $form and $form_state for
         // late execution of submit handers and post-batch redirection.
         $batch['form'] = $form;
@@ -530,7 +533,6 @@ function drupal_prepare_form($form_id, &
   drupal_alter('form', $data, $form_id);
 }
 
-
 /**
  * Validates user-submitted form data from the $form_state using
  * the validate functions defined in a structured form array.
@@ -579,6 +581,7 @@ function drupal_validate_form($form_id, 
  *   theming, and hook_form_alter functions.
  * @param $form
  *   An associative array containing the structure of the form.
+ *
  * @return
  *   A string containing the path of the page to display when processing
  *   is complete.
@@ -704,7 +707,7 @@ function _form_validate($elements, &$for
     // #value data.
     elseif (isset($elements['#element_validate'])) {
       foreach ($elements['#element_validate'] as $function) {
-        if (function_exists($function))  {
+        if (function_exists($function)) {
           $function($elements, $form_state);
         }
       }
@@ -741,8 +744,8 @@ function form_execute_handlers($type, &$
   }
 
   foreach ($handlers as $function) {
-    if (function_exists($function))  {
-      if ($type == 'submit' && ($batch =& batch_get())) {
+    if (function_exists($function)) {
+      if ($type == 'submit' && ($batch = &batch_get())) {
         // Some previous _submit handler has set a batch. We store the call
         // in a special 'control' batch set, for execution at the correct
         // time during the batch processing workflow.
@@ -767,6 +770,7 @@ function form_execute_handlers($type, &$
  *   element where the #parents array starts with 'foo'.
  * @param $message
  *   The error message to present to the user.
+ *
  * @return
  *   Never use the return value of this function, use form_get_errors and
  *   form_get_error instead.
@@ -884,7 +888,7 @@ function form_builder($form_id, $form, &
 
     // Assign a decimal placeholder weight to preserve original array order.
     if (!isset($form[$key]['#weight'])) {
-      $form[$key]['#weight'] = $count/1000;
+      $form[$key]['#weight'] = $count / 1000;
     }
     else {
       // If one of the child elements has a weight then we will need to sort
@@ -1092,6 +1096,7 @@ function _form_builder_ie_cleanup($form,
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1137,6 +1142,7 @@ function form_type_image_button_value($f
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1155,6 +1161,7 @@ function form_type_checkbox_value($form,
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1182,6 +1189,7 @@ function form_type_checkboxes_value($for
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1201,6 +1209,7 @@ function form_type_password_confirm_valu
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1224,6 +1233,7 @@ function form_type_select_value($form, $
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1244,6 +1254,7 @@ function form_type_textfield_value($form
  * @param $edit
  *   The incoming POST data to populate the form element. If this is FALSE,
  *   the element's default value should be returned.
+ *
  * @return
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
@@ -1302,7 +1313,7 @@ function _element_info($type, $refresh =
     '#attributes' => array(),
     '#required' => FALSE,
     '#tree' => FALSE,
-    '#parents' => array()
+    '#parents' => array(),
   );
   if (!isset($cache) || $refresh) {
     $cache = array();
@@ -1350,6 +1361,7 @@ function form_options_flatten($array, $r
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: title, value, options, description, extra, multiple, required
+ *
  * @return
  *   A themed HTML string representing the form element.
  *
@@ -1373,9 +1385,9 @@ function form_select_options($element, $
   }
   // array_key_exists() accommodates the rare event where $element['#value'] is NULL.
   // isset() fails in this situation.
-  $value_valid = isset($element['#value']) || array_key_exists('#value', $element);
+  $value_valid    = isset($element['#value']) || array_key_exists('#value', $element);
   $value_is_array = is_array($element['#value']);
-  $options = '';
+  $options        = '';
   foreach ($choices as $key => $choice) {
     if (is_array($choice)) {
       $options .= '<optgroup label="'. $key .'">';
@@ -1427,6 +1439,7 @@ function form_select_options($element, $
  *   The select element to search.
  * @param $key
  *   The key to look for.
+ *
  * @return
  *   An array of indexes that match the given $key. Array will be
  *   empty if no elements were found. FALSE if optgroups were found.
@@ -1455,6 +1468,7 @@ function form_get_options($element, $key
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: attributes, title, value, description, children, collapsible, collapsed
+ *
  * @return
  *   A themed HTML string representing the form item group.
  *
@@ -1483,6 +1497,7 @@ function theme_fieldset($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: required, return_value, value, attributes, title, description
+ *
  * @return
  *   A themed HTML string representing the form item group.
  *
@@ -1509,6 +1524,7 @@ function theme_radio($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: title, value, options, description, required and attributes.
+ *
  * @return
  *   A themed HTML string representing the radio button set.
  *
@@ -1535,6 +1551,7 @@ function theme_radios($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: title, value, id, required, error.
+ *
  * @return
  *   A themed HTML string representing the form item.
  *
@@ -1548,14 +1565,14 @@ function theme_password_confirm($element
  * Expand a password_confirm field into two text boxes.
  */
 function expand_password_confirm($element) {
-  $element['pass1'] =  array(
+  $element['pass1'] = array(
     '#type' => 'password',
     '#title' => t('Password'),
     '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'],
     '#required' => $element['#required'],
     '#attributes' => array('class' => 'password-field'),
   );
-  $element['pass2'] =  array(
+  $element['pass2'] = array(
     '#type' => 'password',
     '#title' => t('Confirm password'),
     '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'],
@@ -1594,7 +1611,6 @@ function password_confirm_validate($form
   form_set_value($form, $pass1, $form_state);
 
   return $form;
-
 }
 
 /**
@@ -1603,6 +1619,7 @@ function password_confirm_validate($form
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: title, value, options, description, required and attributes.
+ *
  * @return
  *   A themed HTML string representing the date selection boxes.
  *
@@ -1619,18 +1636,19 @@ function expand_date($element) {
   // Default to current date
   if (empty($element['#value'])) {
     $element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
-                            'month' => format_date(time(), 'custom', 'n'),
-                            'year' => format_date(time(), 'custom', 'Y'));
+      'month' => format_date(time(), 'custom', 'n'),
+      'year' => format_date(time(), 'custom', 'Y'),
+    );
   }
 
   $element['#tree'] = TRUE;
 
   // Determine the order of day, month, year in the site's chosen date format.
-  $format = variable_get('date_format_short', 'm/d/Y - H:i');
-  $sort = array();
-  $sort['day'] = max(strpos($format, 'd'), strpos($format, 'j'));
+  $format        = variable_get('date_format_short', 'm/d/Y - H:i');
+  $sort          = array();
+  $sort['day']   = max(strpos($format, 'd'), strpos($format, 'j'));
   $sort['month'] = max(strpos($format, 'm'), strpos($format, 'M'));
-  $sort['year'] = strpos($format, 'Y');
+  $sort['year']  = strpos($format, 'Y');
   asort($sort);
   $order = array_keys($sort);
 
@@ -1640,15 +1658,17 @@ function expand_date($element) {
       case 'day':
         $options = drupal_map_assoc(range(1, 31));
         break;
+
       case 'month':
         $options = drupal_map_assoc(range(1, 12), 'map_month');
         break;
+
       case 'year':
         $options = drupal_map_assoc(range(1900, 2050));
         break;
     }
-    $parents = $element['#parents'];
-    $parents[] = $type;
+    $parents        = $element['#parents'];
+    $parents[]      = $type;
     $element[$type] = array(
       '#type' => 'select',
       '#value' => $element['#value'][$type],
@@ -1724,6 +1744,7 @@ function expand_radios($element) {
  *   An associative array containing the properties of the element.
  *   Properties used: ahah_event, ahah_path, ahah_wrapper, ahah_parameters,
  *   ahah_effect.
+ *
  * @return
  *   None. Additional code is added to the header of the page using
  *   drupal_add_js.
@@ -1738,11 +1759,13 @@ function form_expand_ahah($element) {
       case 'image_button':
         $element['#ahah']['event'] = 'click';
         break;
+
       case 'password':
       case 'textfield':
       case 'textarea':
         $element['#ahah']['event'] = 'blur';
         break;
+
       case 'radio':
       case 'checkbox':
       case 'select':
@@ -1758,14 +1781,14 @@ function form_expand_ahah($element) {
     drupal_add_js('misc/ahah.js');
 
     $ahah_binding = array(
-      'url'      => url($element['#ahah']['path']),
-      'event'    => $element['#ahah']['event'],
-      'wrapper'  => empty($element['#ahah']['wrapper']) ? NULL : $element['#ahah']['wrapper'],
+      'url' => url($element['#ahah']['path']),
+      'event' => $element['#ahah']['event'],
+      'wrapper' => empty($element['#ahah']['wrapper']) ? NULL : $element['#ahah']['wrapper'],
       'selector' => empty($element['#ahah']['selector']) ? '#'. $element['#id'] : $element['#ahah']['selector'],
-      'effect'   => empty($element['#ahah']['effect']) ? 'none' : $element['#ahah']['effect'],
-      'method'   => empty($element['#ahah']['method']) ? 'replace' : $element['#ahah']['method'],
+      'effect' => empty($element['#ahah']['effect']) ? 'none' : $element['#ahah']['effect'],
+      'method' => empty($element['#ahah']['method']) ? 'replace' : $element['#ahah']['method'],
       'progress' => empty($element['#ahah']['progress']) ? array('type' => 'throbber') : $element['#ahah']['progress'],
-      'button'   => isset($element['#executes_submit_callback']) ? array($element['#name'] => $element['#value']) : FALSE,
+      'button' => isset($element['#executes_submit_callback']) ? array($element['#name'] => $element['#value']) : FALSE,
     );
 
     // Convert a simple #ahah[progress] type string into an array.
@@ -1796,6 +1819,7 @@ function form_expand_ahah($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used:  title, value, description, required, error
+ *
  * @return
  *   A themed HTML string representing the form item.
  *
@@ -1811,6 +1835,7 @@ function theme_item($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used:  title, value, return_value, description, required
+ *
  * @return
  *   A themed HTML string representing the checkbox.
  *
@@ -1821,7 +1846,7 @@ function theme_checkbox($element) {
   $checkbox = '<input ';
   $checkbox .= 'type="checkbox" ';
   $checkbox .= 'name="'. $element['#name'] .'" ';
-  $checkbox .= 'id="'. $element['#id'] .'" ' ;
+  $checkbox .= 'id="'. $element['#id'] .'" ';
   $checkbox .= 'value="'. $element['#return_value'] .'" ';
   $checkbox .= $element['#value'] ? ' checked="checked" ' : ' ';
   $checkbox .= drupal_attributes($element['#attributes']) .' />';
@@ -1839,6 +1864,7 @@ function theme_checkbox($element) {
  *
  * @param $element
  *   An associative array containing the properties of the element.
+ *
  * @return
  *   A themed HTML string representing the checkbox set.
  *
@@ -1915,13 +1941,7 @@ function theme_image_button($element) {
     $element['#attributes']['class'] = 'form-'. $element['#button_type'];
   }
 
-  return '<input type="image" name="'. $element['#name'] .'" '.
-    (!empty($element['#value']) ? ('value="'. check_plain($element['#value']) .'" ') : '') .
-    'id="'. $element['#id'] .'" '.
-    drupal_attributes($element['#attributes']) .
-    ' src="'. base_path() . $element['#src'] .'" '.
-    (!empty($element['#title']) ? 'alt="'. check_plain($element['#title']) .'" title="'. check_plain($element['#title']) .'" ' : '' ) .
-    "/>\n";
+  return '<input type="image" name="'. $element['#name'] .'" '. (!empty($element['#value']) ? ('value="'. check_plain($element['#value']) .'" ') : '') .'id="'. $element['#id'] .'" '. drupal_attributes($element['#attributes']) .' src="'. base_path() . $element['#src'] .'" '. (!empty($element['#title']) ? 'alt="'. check_plain($element['#title']) .'" title="'. check_plain($element['#title']) .'" ' : '') ."/>\n";
 }
 
 /**
@@ -1930,6 +1950,7 @@ function theme_image_button($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used:  value, edit
+ *
  * @return
  *   A themed HTML string representing the hidden form field.
  *
@@ -1954,22 +1975,23 @@ function theme_token($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used:  title, value, description, size, maxlength, required, attributes autocomplete_path
+ *
  * @return
  *   A themed HTML string representing the textfield.
  *
  * @ingroup themeable
  */
 function theme_textfield($element) {
-  $size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
+  $size      = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
   $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"';
-  $class = array('form-text');
-  $extra = '';
-  $output = '';
+  $class     = array('form-text');
+  $extra     = '';
+  $output    = '';
 
   if ($element['#autocomplete_path']) {
     drupal_add_js('misc/autocomplete.js');
     $class[] = 'form-autocomplete';
-    $extra =  '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) .'" disabled="disabled" />';
+    $extra = '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) .'" disabled="disabled" />';
   }
   _form_set_class($element, $class);
 
@@ -1992,6 +2014,7 @@ function theme_textfield($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: action, method, attributes, children
+ *
  * @return
  *   A themed HTML string representing the form.
  *
@@ -2009,6 +2032,7 @@ function theme_form($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: title, value, description, rows, cols, required, attributes
+ *
  * @return
  *   A themed HTML string representing the textarea.
  *
@@ -2044,12 +2068,12 @@ function theme_textarea($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used: value, children.
+ *
  * @return
  *   A themed HTML string representing the HTML markup.
  *
  * @ingroup themeable
  */
-
 function theme_markup($element) {
   return (isset($element['#value']) ? $element['#value'] : '') . (isset($element['#children']) ? $element['#children'] : '');
 }
@@ -2060,6 +2084,7 @@ function theme_markup($element) {
  * @param $element
  *   An associative array containing the properties of the element.
  *   Properties used:  title, value, description, size, maxlength, required, attributes
+ *
  * @return
  *   A themed HTML string representing the form.
  *
@@ -2101,6 +2126,7 @@ function process_weight($element) {
  *   Explanatory text to display after the form item.
  * @param $required
  *   Whether the user must upload a file to the field.
+ *
  * @return
  *   A themed HTML string representing the field.
  *
@@ -2122,6 +2148,7 @@ function theme_file($element) {
  *   Properties used: title, description, id, required
  * @param $value
  *   The form element's data.
+ *
  * @return
  *   A string representing the form element.
  *
@@ -2195,6 +2222,7 @@ function _form_set_class(&$element, $cla
  *   used if a form has completed the validation process. This parameter
  *   should never be set to TRUE if this function is being called to
  *   assign an ID to the #ID element.
+ *
  * @return
  *   The cleaned ID.
  */
@@ -2365,7 +2393,7 @@ function form_clean_id($id = NULL, $flus
  */
 function batch_set($batch_definition) {
   if ($batch_definition) {
-    $batch =& batch_get();
+    $batch = &batch_get();
     // Initialize the batch
     if (empty($batch)) {
       $batch = array(
@@ -2396,8 +2424,8 @@ function batch_set($batch_definition) {
     // insert the new set after the current one.
     if (isset($batch['current_set'])) {
       // array_insert does not exist...
-      $slice1 = array_slice($batch['sets'], 0, $batch['current_set'] + 1);
-      $slice2 = array_slice($batch['sets'], $batch['current_set'] + 1);
+      $slice1        = array_slice($batch['sets'], 0, $batch['current_set'] + 1);
+      $slice2        = array_slice($batch['sets'], $batch['current_set'] + 1);
       $batch['sets'] = array_merge($slice1, array($batch_set), $slice2);
     }
     else {
@@ -2422,7 +2450,7 @@ function batch_set($batch_definition) {
  *   URL of the batch processing page.
  */
 function batch_process($redirect = NULL, $url = NULL) {
-  $batch =& batch_get();
+  $batch = &batch_get();
 
   if (isset($batch)) {
     // Add process information
@@ -2484,3 +2512,4 @@ function &batch_get() {
 /**
  * @} End of "defgroup batch".
  */
+
Index: includes/image.gd.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/image.gd.inc,v
retrieving revision 1.4
diff -u -p -r1.4 image.gd.inc
--- includes/image.gd.inc	15 Jan 2008 10:17:42 -0000	1.4
+++ includes/image.gd.inc	21 Jan 2008 21:58:45 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: image.gd.inc,v 1.4 2008/01/15 10:17:42 goba Exp $
 
+
 /**
  * @file
  * GD2 toolkit for image manipulation within Drupal.
@@ -25,7 +26,7 @@ function image_gd_settings() {
   if (image_gd_check_settings()) {
     $form = array();
     $form['status'] = array(
-      '#value' => t('The GD toolkit is installed and working properly.')
+      '#value' => t('The GD toolkit is installed and working properly.'),
     );
 
     $form['image_jpeg_quality'] = array(
@@ -38,7 +39,7 @@ function image_gd_settings() {
       '#field_suffix' => t('%'),
     );
     $form['#element_validate'] = array('image_gd_settings_validate');
-    
+
     return $form;
   }
   else {
@@ -178,6 +179,7 @@ function image_gd_crop($source, $destina
  *   A string file path where the iamge should be saved.
  * @param $extension
  *   A string containing one of the following extensions: gif, jpg, jpeg, png.
+ *
  * @return
  *   An image resource, or FALSE on error.
  */
@@ -199,6 +201,7 @@ function image_gd_open($file, $extension
  *   A string file path where the iamge should be saved.
  * @param $extension
  *   A string containing one of the following extensions: gif, jpg, jpeg, png.
+ *
  * @return
  *   Boolean indicating success.
  */
@@ -219,3 +222,4 @@ function image_gd_close($res, $destinati
 /**
  * @} End of "ingroup image".
  */
+
Index: includes/image.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/image.inc,v
retrieving revision 1.23
diff -u -p -r1.23 image.inc
--- includes/image.inc	8 Aug 2007 07:46:09 -0000	1.23
+++ includes/image.inc	21 Jan 2008 21:58:45 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: image.inc,v 1.23 2007/08/08 07:46:09 dries Exp $
 
+
 /**
  * @file
  * API for manipulating images.
@@ -107,6 +108,7 @@ function image_get_toolkit() {
  *   A string containing the method to invoke.
  * @param $params
  *   An optional array of parameters to pass to the toolkit method.
+ *
  * @return
  *   Mixed values (typically Boolean indicating successful operation).
  */
@@ -123,7 +125,6 @@ function image_toolkit_invoke($method, $
   }
 }
 
-
 /**
  * Get details about an image.
  *
@@ -143,18 +144,19 @@ function image_get_info($file) {
     return FALSE;
   }
 
-  $details = FALSE;
-  $data = @getimagesize($file);
+  $details   = FALSE;
+  $data      = @getimagesize($file);
   $file_size = @filesize($file);
 
   if (isset($data) && is_array($data)) {
     $extensions = array('1' => 'gif', '2' => 'jpg', '3' => 'png');
-    $extension = array_key_exists($data[2], $extensions) ?  $extensions[$data[2]] : '';
-    $details = array('width'     => $data[0],
-                     'height'    => $data[1],
-                     'extension' => $extension,
-                     'file_size' => $file_size,
-                     'mime_type' => $data['mime']);
+    $extension  = array_key_exists($data[2], $extensions) ? $extensions[$data[2]] : '';
+    $details    = array('width' => $data[0],
+      'height' => $data[1],
+      'extension' => $extension,
+      'file_size' => $file_size,
+      'mime_type' => $data['mime'],
+    );
   }
 
   return $details;
@@ -176,6 +178,7 @@ function image_get_info($file) {
  *   The target width, in pixels.
  * @param $height
  *   The target height, in pixels.
+ *
  * @return
  *   TRUE or FALSE, based on success.
  */
@@ -183,8 +186,8 @@ function image_scale_and_crop($source, $
   $info = image_get_info($source);
 
   $scale = max($width / $info['width'], $height / $info['height']);
-  $x = round(($info['width'] * $scale - $width) / 2);
-  $y = round(($info['height'] * $scale - $height) / 2);
+  $x     = round(($info['width'] * $scale - $width) / 2);
+  $y     = round(($info['height'] * $scale - $height) / 2);
 
   if (image_toolkit_invoke('resize', array($source, $destination, $info['width'] * $scale, $info['height'] * $scale))) {
     return image_toolkit_invoke('crop', array($destination, $destination, $x, $y, $width, $height));
@@ -206,6 +209,7 @@ function image_scale_and_crop($source, $
  *   The target width, in pixels.
  * @param $height
  *   The target height, in pixels.
+ *
  * @return
  *   TRUE or FALSE, based on success.
  */
@@ -241,7 +245,8 @@ function image_scale($source, $destinati
  *   The target width, in pixels.
  * @param $height
  *   The target height, in pixels.
-  * @return
+ *
+ * @return
  *   TRUE or FALSE, based on success.
  */
 function image_resize($source, $destination, $width, $height) {
@@ -261,6 +266,7 @@ function image_resize($source, $destinat
  *   An hexidecimal integer specifying the background color to use for the
  *   uncovered area of the image after the rotation. E.g. 0x000000 for black,
  *   0xff00ff for magenta, and 0xffffff for white.
+ *
  * @return
  *   TRUE or FALSE, based on success.
  */
@@ -283,6 +289,7 @@ function image_rotate($source, $destinat
  *   The target width, in pixels.
  * @param $height
  *   The target height, in pixels.
+ *
  * @return
  *   TRUE or FALSE, based on success.
  */
@@ -293,3 +300,4 @@ function image_crop($source, $destinatio
 /**
  * @} End of "defgroup image".
  */
+
Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.56
diff -u -p -r1.56 install.inc
--- includes/install.inc	19 Dec 2007 11:15:18 -0000	1.56
+++ includes/install.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: install.inc,v 1.56 2007/12/19 11:15:18 goba Exp $
 
+
 define('SCHEMA_UNINSTALLED', -1);
 define('SCHEMA_INSTALLED', 0);
 
@@ -9,13 +10,13 @@ define('REQUIREMENT_OK', 0);
 define('REQUIREMENT_WARNING', 1);
 define('REQUIREMENT_ERROR', 2);
 
-define('FILE_EXIST',          1);
-define('FILE_READABLE',       2);
-define('FILE_WRITABLE',       4);
-define('FILE_EXECUTABLE',     8);
-define('FILE_NOT_EXIST',      16);
-define('FILE_NOT_READABLE',   32);
-define('FILE_NOT_WRITABLE',   64);
+define('FILE_EXIST', 1);
+define('FILE_READABLE', 2);
+define('FILE_WRITABLE', 4);
+define('FILE_EXECUTABLE', 8);
+define('FILE_NOT_EXIST', 16);
+define('FILE_NOT_READABLE', 32);
+define('FILE_NOT_WRITABLE', 64);
 define('FILE_NOT_EXECUTABLE', 128);
 
 /**
@@ -34,6 +35,7 @@ function drupal_load_updates() {
  *
  * @param $module
  *   A module name.
+ *
  * @return
  *   If the module has updates, an array of available updates. Otherwise,
  *   FALSE.
@@ -65,6 +67,7 @@ function drupal_get_schema_versions($mod
  * @param $array
  *   Set to TRUE if you want to get information about all modules in the
  *   system.
+ *
  * @return
  *   The currently installed schema version.
  */
@@ -133,10 +136,10 @@ function drupal_install_profile_name() {
 function drupal_detect_baseurl($file = 'install.php') {
   global $profile;
   $proto = $_SERVER['HTTPS'] ? 'https://' : 'http://';
-  $host = $_SERVER['SERVER_NAME'];
-  $port = ($_SERVER['SERVER_PORT'] == 80 ? '' : ':'. $_SERVER['SERVER_PORT']);
-  $uri = preg_replace("/\?.*/", '', $_SERVER['REQUEST_URI']);
-  $dir = str_replace("/$file", '', $uri);
+  $host  = $_SERVER['SERVER_NAME'];
+  $port  = ($_SERVER['SERVER_PORT'] == 80 ? '' : ':'. $_SERVER['SERVER_PORT']);
+  $uri   = preg_replace("/\?.*/", '', $_SERVER['REQUEST_URI']);
+  $dir   = str_replace("/$file", '', $uri);
 
   return "$proto$host$port$dir";
 }
@@ -210,7 +213,8 @@ function drupal_rewrite_settings($settin
         preg_match('/\$([^ ]*) /', $line, $variable);
         if (in_array($variable[1], $keys)) {
           // Write new value to settings.php in the following format:
-          //    $'setting' = 'value'; // 'comment'
+          // 'comment'
+          //    $'setting' = 'value';
           $setting = $settings[$variable[1]];
           $buffer .= '$'. $variable[1] ." = '". $setting['value'] ."';". (!empty($setting['comment']) ? ' // '. $setting['comment'] ."\n" : "\n");
           unset($settings[$variable[1]]);
@@ -234,7 +238,7 @@ function drupal_rewrite_settings($settin
 
     $fp = fopen($settings_file, 'w');
     if ($fp && fwrite($fp, $buffer) === FALSE) {
-        drupal_set_message(st('Failed to modify %settings, please verify the file permissions.', array('%settings' => $settings_file)), 'error');
+      drupal_set_message(st('Failed to modify %settings, please verify the file permissions.', array('%settings' => $settings_file)), 'error');
     }
   }
   else {
@@ -263,6 +267,7 @@ function drupal_get_install_files($modul
  *   Name of profile to verify.
  * @param locale
  *   Name of locale used (if any).
+ *
  * @return
  *   The list of modules to install.
  */
@@ -276,7 +281,7 @@ function drupal_verify_profile($profile,
     install_no_profile_error();
   }
 
-  require_once($profile_file);
+  require_once ($profile_file);
 
   // Get a list of modules required by this profile.
   $function = $profile .'_profile_modules';
@@ -316,8 +321,8 @@ function drupal_install_modules($module_
       $file = $files[$module];
       if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) {
         foreach ($file->info['dependencies'] as $dependency) {
-          if (isset($module_list[$dependency]) && $module_list[$module] < $module_list[$dependency] +1) {
-            $module_list[$module] = $module_list[$dependency] +1;
+          if (isset($module_list[$dependency]) && $module_list[$module] < $module_list[$dependency] + 1) {
+            $module_list[$module] = $module_list[$dependency] + 1;
             $moved = TRUE;
           }
         }
@@ -365,7 +370,6 @@ function drupal_install_system() {
   module_rebuild_cache();
 }
 
-
 /**
  * Calls the uninstall function and updates the system table for a given module.
  *
@@ -413,6 +417,7 @@ function drupal_uninstall_module($module
  *   An optional bitmask created from various FILE_* constants.
  * @param $type
  *   The type of file. Can be file (default), dir, or link.
+ *
  * @return
  *   TRUE on success or FALSE on failure. A message is set for the latter.
  */
@@ -446,31 +451,37 @@ function drupal_verify_install_file($fil
               }
             }
             break;
+
           case FILE_READABLE:
             if (!is_readable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
             }
             break;
+
           case FILE_WRITABLE:
             if (!is_writable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
             }
             break;
+
           case FILE_EXECUTABLE:
             if (!is_executable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
             }
             break;
+
           case FILE_NOT_READABLE:
             if (is_readable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
             }
             break;
+
           case FILE_NOT_WRITABLE:
             if (is_writable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
             }
             break;
+
           case FILE_NOT_EXECUTABLE:
             if (is_executable($file) && !drupal_install_fix_file($file, $mask)) {
               $return = FALSE;
@@ -505,9 +516,11 @@ function drupal_install_mkdir($file, $ma
         case FILE_READABLE:
           $mod += 444;
           break;
+
         case FILE_WRITABLE:
           $mod += 222;
           break;
+
         case FILE_EXECUTABLE:
           $mod += 111;
           break;
@@ -561,26 +574,31 @@ function drupal_install_fix_file($file, 
             $mod |= 0444;
           }
           break;
+
         case FILE_WRITABLE:
           if (!is_writable($file)) {
             $mod |= 0222;
           }
           break;
+
         case FILE_EXECUTABLE:
           if (!is_executable($file)) {
             $mod |= 0111;
           }
           break;
+
         case FILE_NOT_READABLE:
           if (is_readable($file)) {
             $mod &= ~0444;
           }
           break;
+
         case FILE_NOT_WRITABLE:
           if (is_writable($file)) {
             $mod &= ~0222;
           }
           break;
+
         case FILE_NOT_EXECUTABLE:
           if (is_executable($file)) {
             $mod &= ~0111;
@@ -601,7 +619,6 @@ function drupal_install_fix_file($file, 
   }
 }
 
-
 /**
  * Send the user to a different installer page. This issues an on-site HTTP
  * redirect. Messages (and errors) are erased.
@@ -612,7 +629,8 @@ function drupal_install_fix_file($file, 
 function install_goto($path) {
   global $base_url;
   header('Location: '. $base_url .'/'. $path);
-  header('Cache-Control: no-cache'); // Not a permanent redirect.
+  // Not a permanent redirect.
+  header('Cache-Control: no-cache');
   exit();
 }
 
@@ -630,7 +648,7 @@ function st($string, $args = array()) {
     $filename = './profiles/'. $profile .'/translations/'. $install_locale .'.po';
     if (file_exists($filename)) {
       require_once './includes/locale.inc';
-      $file = (object) array('filepath' => $filename);
+      $file = (object)array('filepath' => $filename);
       _locale_import_read_po('mem-store', $file);
       $locale_strings = _locale_import_one_string('mem-report');
     }
@@ -641,15 +659,18 @@ function st($string, $args = array()) {
   foreach ($args as $key => $value) {
     switch ($key[0]) {
       // Escaped only
+
       case '@':
         $args[$key] = check_plain($value);
         break;
       // Escaped and placeholder
+
       case '%':
       default:
         $args[$key] = '<em>'. check_plain($value) .'</em>';
         break;
       // Pass-through
+
       case '!':
     }
   }
@@ -671,7 +692,7 @@ function drupal_check_profile($profile) 
     install_no_profile_error();
   }
 
-  require_once($profile_file);
+  require_once ($profile_file);
 
   // Get a list of modules required by this profile.
   $function = $profile .'_profile_modules';
@@ -731,3 +752,4 @@ function drupal_check_module($module) {
   }
   return TRUE;
 }
+
Index: includes/install.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.mysql.inc,v
retrieving revision 1.8
diff -u -p -r1.8 install.mysql.inc
--- includes/install.mysql.inc	8 Dec 2007 14:06:20 -0000	1.8
+++ includes/install.mysql.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: install.mysql.inc,v 1.8 2007/12/08 14:06:20 goba Exp $
 
+
 // MySQL specific install functions
 
 /**
@@ -60,7 +61,7 @@ function drupal_test_mysql($url, &$succe
     drupal_set_message(st('Failed to create a test table on your MySQL database server with the command %query. MySQL reports the following message: %error.<ul><li>Are you sure the configured username has the necessary MySQL permissions to create tables in the database?</li></ul>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%query' => $query, '%error' => $error)), 'error');
     return FALSE;
   }
-  $err = FALSE;
+  $err       = FALSE;
   $success[] = 'SELECT';
   $success[] = 'CREATE';
 
@@ -115,3 +116,4 @@ function drupal_test_mysql($url, &$succe
   mysql_close($connection);
   return TRUE;
 }
+
Index: includes/install.mysqli.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.mysqli.inc,v
retrieving revision 1.11
diff -u -p -r1.11 install.mysqli.inc
--- includes/install.mysqli.inc	19 Dec 2007 11:25:47 -0000	1.11
+++ includes/install.mysqli.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: install.mysqli.inc,v 1.11 2007/12/19 11:25:47 goba Exp $
 
+
 // MySQLi specific install functions
 
 /**
@@ -55,7 +56,7 @@ function drupal_test_mysqli($url, &$succ
     drupal_set_message(st('Failed to create a test table on your MySQL database server with the command %query. MySQL reports the following message: %error.<ul><li>Are you sure the configured username has the necessary MySQL permissions to create tables in the database?</li></ul>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%query' => $query, '%error' => $error)), 'error');
     return FALSE;
   }
-  $err = FALSE;
+  $err       = FALSE;
   $success[] = 'SELECT';
   $success[] = 'CREATE';
 
@@ -110,3 +111,4 @@ function drupal_test_mysqli($url, &$succ
   mysqli_close($connection);
   return TRUE;
 }
+
Index: includes/install.pgsql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.pgsql.inc,v
retrieving revision 1.6
diff -u -p -r1.6 install.pgsql.inc
--- includes/install.pgsql.inc	22 Oct 2007 15:22:39 -0000	1.6
+++ includes/install.pgsql.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: install.pgsql.inc,v 1.6 2007/10/22 15:22:39 dries Exp $
 
+
 // PostgreSQL specific install functions
 
 /**
@@ -61,7 +62,7 @@ function drupal_test_pgsql($url, &$succe
     drupal_set_message(st('Failed to create a test table on your PostgreSQL database server with the command %query. PostgreSQL reports the following message: %error.<ul><li>Are you sure the configured username has the necessary PostgreSQL permissions to create tables in the database?</li></ul>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.', array('%query' => $query, '%error' => $error)), 'error');
     return FALSE;
   }
-  $err = FALSE;
+  $err       = FALSE;
   $success[] = 'SELECT';
   $success[] = 'CREATE';
 
@@ -137,4 +138,5 @@ function drupal_test_pgsql($url, &$succe
 
   pg_close($connection);
   return TRUE;
-}
\ No newline at end of file
+}
+
Index: includes/language.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/language.inc,v
retrieving revision 1.14
diff -u -p -r1.14 language.inc
--- includes/language.inc	6 Jan 2008 16:46:02 -0000	1.14
+++ includes/language.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: language.inc,v 1.14 2008/01/06 16:46:02 goba Exp $
 
+
 /**
  * @file
  * Multiple language handling functionality.
@@ -17,7 +18,7 @@ function language_initialize() {
   // Get a list of enabled languages.
   $languages = language_list('enabled');
   $languages = $languages[1];
-  
+
   switch ($mode) {
     case LANGUAGE_NEGOTIATION_NONE:
       return language_default();
@@ -133,7 +134,6 @@ function language_url_rewrite(&$path, &$
           break;
         }
         // Intentionally no break here.
-
       case LANGUAGE_NEGOTIATION_PATH:
         if (!empty($options['language']->prefix)) {
           $options['prefix'] = $options['language']->prefix .'/';
@@ -142,3 +142,4 @@ function language_url_rewrite(&$path, &$
     }
   }
 }
+
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.174
diff -u -p -r1.174 locale.inc
--- includes/locale.inc	9 Jan 2008 21:36:13 -0000	1.174
+++ includes/locale.inc	21 Jan 2008 21:58:46 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: locale.inc,v 1.174 2008/01/09 21:36:13 goba Exp $
 
+
 /**
  * @file
  *   Administration functions for locale.module.
@@ -41,7 +42,7 @@ function locale_languages_overview_form(
     }
     $form['weight'][$langcode] = array(
       '#type' => 'weight',
-      '#default_value' => $language->weight
+      '#default_value' => $language->weight,
     );
     $form['name'][$langcode] = array('#value' => check_plain($language->name));
     $form['native'][$langcode] = array('#value' => check_plain($language->native));
@@ -83,7 +84,7 @@ function theme_locale_languages_overview
         drupal_render($form['direction'][$key]),
         drupal_render($form['site_default'][$key]),
         drupal_render($form['weight'][$key]),
-        l(t('edit'), 'admin/settings/language/edit/'. $key) . (($key != 'en' && $key != $default->language) ? ' '. l(t('delete'), 'admin/settings/language/delete/'. $key) : '')
+        l(t('edit'), 'admin/settings/language/edit/'. $key) . (($key != 'en' && $key != $default->language) ? ' '. l(t('delete'), 'admin/settings/language/delete/'. $key) : ''),
       );
     }
   }
@@ -98,8 +99,8 @@ function theme_locale_languages_overview
  * Process language overview form submissions, updating existing languages.
  */
 function locale_languages_overview_form_submit($form, &$form_state) {
-  $languages = language_list();
-  $default = language_default();
+  $languages     = language_list();
+  $default       = language_default();
   $enabled_count = 0;
   foreach ($languages as $langcode => $language) {
     if ($form_state['values']['site_default'] == $langcode || $default->language == $langcode) {
@@ -129,6 +130,7 @@ function locale_languages_overview_form_
   $form_state['redirect'] = 'admin/settings/language';
   return;
 }
+
 /**
  * @} End of "locale-language-overview"
  */
@@ -180,7 +182,7 @@ function locale_languages_custom_form() 
   _locale_languages_common_controls($form['custom language']);
   $form['custom language']['submit'] = array(
     '#type' => 'submit',
-    '#value' => t('Add custom language')
+    '#value' => t('Add custom language'),
   );
   // Reuse the validation and submit functions of the predefined language setup form.
   $form['#submit'][] = 'locale_languages_predefined_form_submit';
@@ -200,7 +202,7 @@ function locale_languages_edit_form(&$fo
     _locale_languages_common_controls($form, $language);
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save language')
+      '#value' => t('Save language'),
     );
     $form['#submit'][] = 'locale_languages_edit_form_submit';
     $form['#validate'][] = 'locale_languages_edit_form_validate';
@@ -227,11 +229,11 @@ function _locale_languages_common_contro
     $form['langcode_view'] = array(
       '#type' => 'item',
       '#title' => t('Language code'),
-      '#value' => $language->language
+      '#value' => $language->language,
     );
     $form['langcode'] = array(
       '#type' => 'value',
-      '#value' => $language->language
+      '#value' => $language->language,
     );
   }
   else {
@@ -263,7 +265,7 @@ function _locale_languages_common_contro
     '#title' => t('Path prefix'),
     '#maxlength' => 64,
     '#default_value' => @$language->prefix,
-    '#description' => t('Language code or other custom string for pattern matching within the path. With language negotiation set to <em>Path prefix only</em> or <em>Path prefix with language fallback</em>, this site is presented in this language when the Path prefix value matches an element in the path. For the default language, this value may be left blank. <strong>Modifying this value will break existing URLs and should be used with caution in a production environment.</strong> <em>Example: Specifying "deutsch" as the path prefix for German results in URLs in the form "www.example.com/deutsch/node".</em>')
+    '#description' => t('Language code or other custom string for pattern matching within the path. With language negotiation set to <em>Path prefix only</em> or <em>Path prefix with language fallback</em>, this site is presented in this language when the Path prefix value matches an element in the path. For the default language, this value may be left blank. <strong>Modifying this value will break existing URLs and should be used with caution in a production environment.</strong> <em>Example: Specifying "deutsch" as the path prefix for German results in URLs in the form "www.example.com/deutsch/node".</em>'),
   );
   $form['domain'] = array('#type' => 'textfield',
     '#title' => t('Language domain'),
@@ -276,7 +278,7 @@ function _locale_languages_common_contro
     '#required' => TRUE,
     '#description' => t('Direction that text in this language is presented.'),
     '#default_value' => @$language->direction,
-    '#options' => array(LANGUAGE_LTR => t('Left to right'), LANGUAGE_RTL => t('Right to left'))
+    '#options' => array(LANGUAGE_LTR => t('Left to right'), LANGUAGE_RTL => t('Right to left')),
   );
   return $form;
 }
@@ -367,6 +369,7 @@ function locale_languages_edit_form_subm
   $form_state['redirect'] = 'admin/settings/language';
   return;
 }
+
 /**
  * @} End of "locale-language-add-edit"
  */
@@ -429,6 +432,7 @@ function locale_languages_delete_form_su
   $form_state['redirect'] = 'admin/settings/language';
   return;
 }
+
 /**
  * @} End of "locale-language-add-edit"
  */
@@ -449,13 +453,14 @@ function locale_languages_configure_form
       LANGUAGE_NEGOTIATION_NONE => t('None.'),
       LANGUAGE_NEGOTIATION_PATH_DEFAULT => t('Path prefix only.'),
       LANGUAGE_NEGOTIATION_PATH => t('Path prefix with language fallback.'),
-      LANGUAGE_NEGOTIATION_DOMAIN => t('Domain name only.')),
+      LANGUAGE_NEGOTIATION_DOMAIN => t('Domain name only.'),
+    ),
     '#default_value' => variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE),
-    '#description' => t("Select the mechanism used to determine your site's presentation language. <strong>Modifying this setting may break all incoming URLs and should be used with caution in a production environment.</strong>")
+    '#description' => t("Select the mechanism used to determine your site's presentation language. <strong>Modifying this setting may break all incoming URLs and should be used with caution in a production environment.</strong>"),
   );
   $form['submit'] = array(
     '#type' => 'submit',
-    '#value' => t('Save settings')
+    '#value' => t('Save settings'),
   );
   return $form;
 }
@@ -469,6 +474,7 @@ function locale_languages_configure_form
   $form_state['redirect'] = 'admin/settings/language';
   return;
 }
+
 /**
  * @} End of "locale-languages-negotiation"
  */
@@ -507,12 +513,13 @@ function locale_translate_overview_scree
   // Languages with at least one record in the locale table.
   $translations = db_query("SELECT COUNT(*) AS translation, t.language, s.textgroup FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid GROUP BY textgroup, language");
   while ($data = db_fetch_object($translations)) {
-    $ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation/$groupsums[$data->textgroup])*100., 2) : 0;
+    $ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation / $groupsums[$data->textgroup]) * 100., 2) : 0;
     $rows[$data->language][$data->textgroup] = $data->translation .'/'. $groupsums[$data->textgroup] ." ($ratio%)";
   }
 
   return theme('table', $headers, $rows);
 }
+
 /**
  * @} End of "locale-translate-overview"
  */
@@ -540,8 +547,8 @@ function locale_translate_seek_form() {
   unset($languages['en']);
 
   // Present edit form preserving previous user settings
-  $query = _locale_translate_seek_query();
-  $form = array();
+  $query          = _locale_translate_seek_query();
+  $form           = array();
   $form['search'] = array('#type' => 'fieldset',
     '#title' => t('Search'),
   );
@@ -575,6 +582,7 @@ function locale_translate_seek_form() {
 
   return $form;
 }
+
 /**
  * @} End of "locale-translate-seek"
  */
@@ -599,7 +607,7 @@ function locale_translate_import_form() 
   else {
     $languages = array(
       t('Already added languages') => $names,
-      t('Languages not yet added') => _locale_prepare_predefined_list()
+      t('Languages not yet added') => _locale_prepare_predefined_list(),
     );
     $default = array_shift(array_keys($names));
   }
@@ -630,7 +638,7 @@ function locale_translate_import_form() 
     '#default_value' => LOCALE_IMPORT_KEEP,
     '#options' => array(
       LOCALE_IMPORT_OVERWRITE => t('Strings in the uploaded file replace existing ones, new ones are added'),
-      LOCALE_IMPORT_KEEP => t('Existing strings are kept, only new strings are added')
+      LOCALE_IMPORT_KEEP => t('Existing strings are kept, only new strings are added'),
     ),
   );
   $form['import']['submit'] = array('#type' => 'submit', '#value' => t('Import'));
@@ -670,6 +678,7 @@ function locale_translate_import_form_su
   $form_state['redirect'] = 'admin/build/translate';
   return;
 }
+
 /**
  * @} End of "locale-translate-import"
  */
@@ -754,6 +763,7 @@ function locale_translate_export_po_form
   }
   _locale_export_po($language, _locale_export_po_generate($language, _locale_export_get_strings($language, $form_state['values']['group'])));
 }
+
 /**
  * @} End of "locale-translate-export"
  */
@@ -777,21 +787,21 @@ function locale_translate_edit_form(&$fo
   // Add original text to the top and some values for form altering.
   $form = array(
     'original' => array(
-      '#type'  => 'item',
+      '#type' => 'item',
       '#title' => t('Original text'),
       '#value' => check_plain(wordwrap($source->source, 0)),
     ),
     'lid' => array(
-      '#type'  => 'value',
-      '#value' => $lid
+      '#type' => 'value',
+      '#value' => $lid,
     ),
     'textgroup' => array(
-      '#type'  => 'value',
+      '#type' => 'value',
       '#value' => $source->textgroup,
     ),
     'location' => array(
-      '#type'  => 'value',
-      '#value' => $source->location
+      '#type' => 'value',
+      '#value' => $source->location,
     ),
   );
 
@@ -858,6 +868,7 @@ function locale_translate_edit_form_subm
   $form_state['redirect'] = 'admin/build/translate/search';
   return;
 }
+
 /**
  * @} End of "locale-translate-edit"
  */
@@ -879,6 +890,7 @@ function locale_translate_delete($lid) {
   drupal_set_message(t('The string has been removed.'));
   drupal_goto('admin/build/translate/search');
 }
+
 /**
  * @} End of "locale-translate-delete"
  */
@@ -919,16 +931,16 @@ function locale_add_language($langcode, 
   // If name was not set, we add a predefined language.
   if (!isset($name)) {
     $predefined = _locale_get_predefined_list();
-    $name = $predefined[$langcode][0];
-    $native = isset($predefined[$langcode][1]) ? $predefined[$langcode][1] : $predefined[$langcode][0];
-    $direction = isset($predefined[$langcode][2]) ? $predefined[$langcode][2] : LANGUAGE_LTR;
+    $name       = $predefined[$langcode][0];
+    $native     = isset($predefined[$langcode][1]) ? $predefined[$langcode][1] : $predefined[$langcode][0];
+    $direction  = isset($predefined[$langcode][2]) ? $predefined[$langcode][2] : LANGUAGE_LTR;
   }
 
   db_query("INSERT INTO {languages} (language, name, native, direction, domain, prefix, enabled) VALUES ('%s', '%s', '%s', %d, '%s', '%s', %d)", $langcode, $name, $native, $direction, $domain, $prefix, $enabled);
 
   // Only set it as default if enabled.
   if ($enabled && $default) {
-    variable_set('language_default', (object) array('language' => $langcode, 'name' => $name, 'native' => $native, 'direction' => $direction, 'enabled' => (int) $enabled, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => $prefix, 'weight' => 0, 'javascript' => ''));
+    variable_set('language_default', (object)array('language' => $langcode, 'name' => $name, 'native' => $native, 'direction' => $direction, 'enabled' => (int) $enabled, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => $prefix, 'weight' => 0, 'javascript' => ''));
   }
 
   if ($enabled) {
@@ -941,6 +953,7 @@ function locale_add_language($langcode, 
 
   watchdog('locale', 'The %language language (%code) has been created.', array('%language' => $name, '%code' => $langcode));
 }
+
 /**
  * @} End of "locale-api-add"
  */
@@ -1016,19 +1029,25 @@ function _locale_import_po($file, $langc
  */
 function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group = 'default') {
 
-  $fd = fopen($file->filepath, "rb"); // File will get closed by PHP on return
+  // File will get closed by PHP on return
+  $fd = fopen($file->filepath, "rb");
   if (!$fd) {
     _locale_import_message('The translation import failed, because the file %filename could not be read.', $file);
     return FALSE;
   }
 
-  $context = "COMMENT"; // Parser context: COMMENT, MSGID, MSGID_PLURAL, MSGSTR and MSGSTR_ARR
-  $current = array();   // Current entry being read
-  $plural = 0;          // Current plural form
-  $lineno = 0;          // Current line
+  // Parser context: COMMENT, MSGID, MSGID_PLURAL, MSGSTR and MSGSTR_ARR
+  $context = "COMMENT";
+  // Current entry being read
+  $current = array();
+  // Current plural form
+  $plural = 0;
+  // Current line
+  $lineno = 0;
 
   while (!feof($fd)) {
-    $line = fgets($fd, 10*1024); // A line should not be this long
+    // A line should not be this long
+    $line = fgets($fd, 10 * 1024);
     if ($lineno == 0) {
       // The first line might come with a UTF-8 BOM, which should be removed.
       $line = str_replace("\xEF\xBB\xBF", '', $line);
@@ -1036,23 +1055,28 @@ function _locale_import_read_po($op, $fi
     $lineno++;
     $line = trim(strtr($line, array("\\\n" => "")));
 
-    if (!strncmp("#", $line, 1)) { // A comment
-      if ($context == "COMMENT") { // Already in comment context: add
+    // A comment
+    if (!strncmp("#", $line, 1)) {
+      // Already in comment context: add
+      if ($context == "COMMENT") {
         $current["#"][] = substr($line, 1);
       }
-      elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one
+      // End current entry, start a new one
+      elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) {
         _locale_import_one_string($op, $current, $mode, $lang, $file, $group);
-        $current = array();
+        $current        = array();
         $current["#"][] = substr($line, 1);
-        $context = "COMMENT";
+        $context        = "COMMENT";
       }
-      else { // Parse error
+      // Parse error
+      else {
         _locale_import_message('The translation file %filename contains an error: "msgstr" was expected but not found on line %line.', $file, $lineno);
         return FALSE;
       }
     }
     elseif (!strncmp("msgid_plural", $line, 12)) {
-      if ($context != "MSGID") { // Must be plural form for current entry
+      // Must be plural form for current entry
+      if ($context != "MSGID") {
         _locale_import_message('The translation file %filename contains an error: "msgid_plural" was expected but not found on line %line.', $file, $lineno);
         return FALSE;
       }
@@ -1066,11 +1090,13 @@ function _locale_import_read_po($op, $fi
       $context = "MSGID_PLURAL";
     }
     elseif (!strncmp("msgid", $line, 5)) {
-      if ($context == "MSGSTR") {   // End current entry, start a new one
+      // End current entry, start a new one
+      if ($context == "MSGSTR") {
         _locale_import_one_string($op, $current, $mode, $lang, $file, $group);
         $current = array();
       }
-      elseif ($context == "MSGID") { // Already in this context? Parse error
+      // Already in this context? Parse error
+      elseif ($context == "MSGID") {
         _locale_import_message('The translation file %filename contains an error: "msgid" is unexpected on line %line.', $file, $lineno);
         return FALSE;
       }
@@ -1084,7 +1110,8 @@ function _locale_import_read_po($op, $fi
       $context = "MSGID";
     }
     elseif (!strncmp("msgstr[", $line, 7)) {
-      if (($context != "MSGID") && ($context != "MSGID_PLURAL") && ($context != "MSGSTR_ARR")) { // Must come after msgid, msgid_plural, or msgstr[]
+      // Must come after msgid, msgid_plural, or msgstr[]
+      if (($context != "MSGID") && ($context != "MSGID_PLURAL") && ($context != "MSGSTR_ARR")) {
         _locale_import_message('The translation file %filename contains an error: "msgstr[]" is unexpected on line %line.', $file, $lineno);
         return FALSE;
       }
@@ -1093,9 +1120,9 @@ function _locale_import_read_po($op, $fi
         return FALSE;
       }
       $frombracket = strstr($line, "[");
-      $plural = substr($frombracket, 1, strpos($frombracket, "]") - 1);
-      $line = trim(strstr($line, " "));
-      $quoted = _locale_import_parse_quoted($line);
+      $plural      = substr($frombracket, 1, strpos($frombracket, "]") - 1);
+      $line        = trim(strstr($line, " "));
+      $quoted      = _locale_import_parse_quoted($line);
       if ($quoted === FALSE) {
         _locale_import_message('The translation file %filename contains a syntax error on line %line.', $file, $lineno);
         return FALSE;
@@ -1104,7 +1131,8 @@ function _locale_import_read_po($op, $fi
       $context = "MSGSTR_ARR";
     }
     elseif (!strncmp("msgstr", $line, 6)) {
-      if ($context != "MSGID") {   // Should come just after a msgid block
+      // Should come just after a msgid block
+      if ($context != "MSGID") {
         _locale_import_message('The translation file %filename contains an error: "msgstr" is unexpected on line %line.', $file, $lineno);
         return FALSE;
       }
@@ -1147,7 +1175,6 @@ function _locale_import_read_po($op, $fi
     _locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
     return FALSE;
   }
-
 }
 
 /**
@@ -1192,19 +1219,23 @@ function _locale_import_one_string($op, 
 
   switch ($op) {
     // Return stored strings
+
     case 'mem-report':
       return $strings;
 
     // Store string in memory (only supports single strings)
+
     case 'mem-store':
       $strings[$value['msgid']] = $value['msgstr'];
       return;
 
     // Called at end of import to inform the user
+
     case 'db-report':
       return array($headerdone, $report[0], $report[1], $report[2]);
 
     // Store the string we got in the database.
+
     case 'db-store':
       // We got header information.
       if ($value['msgid'] == '') {
@@ -1220,7 +1251,6 @@ function _locale_import_one_string($op, 
         }
         $headerdone = TRUE;
       }
-
       else {
         // Some real string to import.
         $comments = _locale_import_shorten_comments(empty($value['#']) ? array() : $value['#']);
@@ -1241,7 +1271,6 @@ function _locale_import_one_string($op, 
             $plid = _locale_import_one_string_db($report, $lang, $english[$key], $trans, $group, $comments, $mode, $plid, $key);
           }
         }
-
         else {
           // A simple string to import.
           $english = $value['msgid'];
@@ -1249,7 +1278,8 @@ function _locale_import_one_string($op, 
           _locale_import_one_string_db($report, $lang, $english, $translation, $group, $comments, $mode);
         }
       }
-  } // end of db-store operation
+  }
+  // end of db-store operation
 }
 
 /**
@@ -1274,6 +1304,7 @@ function _locale_import_one_string($op, 
  *   Optional plural ID to use.
  * @param $plural
  *   Optional plural value to use.
+ *
  * @return
  *   The string ID of the existing string modified or the new string added.
  */
@@ -1318,6 +1349,7 @@ function _locale_import_one_string_db(&$
  *
  * @param $header
  *   A string containing the complete header
+ *
  * @return
  *   An associative array of key-value pairs
  */
@@ -1340,6 +1372,7 @@ function _locale_import_parse_header($he
  *   A string containing the Plural-Forms entry
  * @param $filename
  *   A string containing the filename
+ *
  * @return
  *   An array containing the number of plurals and a
  *   formula in PHP for computing the plural form
@@ -1384,6 +1417,7 @@ function _locale_import_parse_plural_for
  *
  * @param $string
  *   A string containing the arithmetic formula
+ *
  * @return
  *   The PHP version of the formula
  */
@@ -1428,9 +1462,11 @@ function _locale_import_parse_arithmetic
         $topop = array_pop($opstk);
       }
       if ($topop) {
-        $opstk[] = $topop;   // Return element to top
+        // Return element to top
+        $opstk[] = $topop;
       }
-      $opstk[] = $ctok;      // Parentheses are not needed
+      // Parentheses are not needed
+      $opstk[] = $ctok;
     }
     else {
       return FALSE;
@@ -1481,6 +1517,7 @@ function _locale_import_parse_arithmetic
  *
  * @param $string
  *   A string containing the arithmetic formula
+ *
  * @return
  *   The PHP version of the formula
  */
@@ -1498,7 +1535,8 @@ function _locale_import_tokenize_formula
       $i = $j - 1;
       $tokens[] = $num;
     }
-    elseif ($pos = strpos(" =<>!&|", $formula[$i])) { // We won't have a space
+    // We won't have a space
+    elseif ($pos = strpos(" =<>!&|", $formula[$i])) {
       $next = $formula[$i + 1];
       switch ($pos) {
         case 1:
@@ -1513,6 +1551,7 @@ function _locale_import_tokenize_formula
             $tokens[] = $formula[$i];
           }
           break;
+
         case 5:
           if ($next == '&') {
             $tokens[] = '&&';
@@ -1522,6 +1561,7 @@ function _locale_import_tokenize_formula
             $tokens[] = $formula[$i];
           }
           break;
+
         case 6:
           if ($next == '|') {
             $tokens[] = '||';
@@ -1566,6 +1606,7 @@ function _locale_import_append_plural($e
  *
  * @param $comment
  *   An array of strings containing a comment
+ *
  * @return
  *   Short one string version of the comment
  */
@@ -1588,25 +1629,31 @@ function _locale_import_shorten_comments
  *
  * @param $string
  *   A string specified with enclosing quotes
+ *
  * @return
  *   The string parsed from inside the quotes
  */
 function _locale_import_parse_quoted($string) {
   if (substr($string, 0, 1) != substr($string, -1, 1)) {
-    return FALSE;   // Start and end quotes must be the same
+    // Start and end quotes must be the same
+    return FALSE;
   }
   $quote = substr($string, 0, 1);
   $string = substr($string, 1, -1);
-  if ($quote == '"') {        // Double quotes: strip slashes
+  // Double quotes: strip slashes
+  if ($quote == '"') {
     return stripcslashes($string);
   }
-  elseif ($quote == "'") {  // Simple quote: return as-is
+  // Simple quote: return as-is
+  elseif ($quote == "'") {
     return $string;
   }
   else {
-    return FALSE;             // Unrecognized quote
+    // Unrecognized quote
+    return FALSE;
   }
 }
+
 /**
  * @} End of "locale-api-import"
  */
@@ -1690,9 +1737,9 @@ function _locale_export_get_strings($lan
   $strings = array();
   while ($child = db_fetch_object($result)) {
     $string = array(
-      'comment'     => $child->location,
-      'source'      => $child->source,
-      'translation' => isset($child->translation) ? $child->translation : ''
+      'comment' => $child->location,
+      'source' => $child->source,
+      'translation' => isset($child->translation) ? $child->translation : '',
     );
     if ($child->plid) {
       // Has a parent lid. Since we process in the order of plids,
@@ -1786,8 +1833,8 @@ function _locale_export_po_generate($lan
           }
         }
         else {
-          $output .= 'msgstr[0] ""'."\n";
-          $output .= 'msgstr[1] ""'."\n";
+          $output .= 'msgstr[0] ""' . "\n";
+          $output .= 'msgstr[1] ""' . "\n";
         }
       }
       else {
@@ -1896,6 +1943,7 @@ function _locale_export_wrap($str, $len)
 function _locale_export_remove_plural($entry) {
   return preg_replace('/(@count)\[[0-9]\]/', '\\1', $entry);
 }
+
 /**
  * @} End of "locale-api-export"
  */
@@ -1920,19 +1968,21 @@ function _locale_translate_seek() {
     // Compute LIKE section
     switch ($query['translation']) {
       case 'translated':
-        $where = "WHERE (t.translation LIKE '%%%s%%')";
-        $orderby = "ORDER BY t.translation";
+        $where       = "WHERE (t.translation LIKE '%%%s%%')";
+        $orderby     = "ORDER BY t.translation";
         $arguments[] = $query['string'];
         break;
+
       case 'untranslated':
-        $where = "WHERE (s.source LIKE '%%%s%%' AND t.translation IS NULL)";
-        $orderby = "ORDER BY s.source";
+        $where       = "WHERE (s.source LIKE '%%%s%%' AND t.translation IS NULL)";
+        $orderby     = "ORDER BY s.source";
         $arguments[] = $query['string'];
         break;
-      case 'all' :
+
+      case 'all':
       default:
-        $where = "WHERE (s.source LIKE '%%%s%%' OR t.translation LIKE '%%%s%%')";
-        $orderby = '';
+        $where       = "WHERE (s.source LIKE '%%%s%%' OR t.translation LIKE '%%%s%%')";
+        $orderby     = '';
         $arguments[] = $query['string'];
         $arguments[] = $query['string'];
         break;
@@ -1945,18 +1995,22 @@ function _locale_translate_seek() {
 
     switch ($query['language']) {
       // Force search in source strings
+
       case "en":
         $sql = $join ." WHERE s.source LIKE '%%%s%%' $grouplimit ORDER BY s.source";
-        $arguments = array($query['string']); // $where is not used, discard its arguments
+        // $where is not used, discard its arguments
+        $arguments = array($query['string']);
         if (!empty($grouplimit)) {
           $arguments[] = $query['group'];
         }
         break;
       // Search in all languages
+
       case "all":
         $sql = "$join $where $grouplimit $orderby";
         break;
       // Some different language
+
       default:
         $sql = "$join AND t.language = '%s' $where $grouplimit $orderby";
         array_unshift($arguments, $query['language']);
@@ -1968,7 +2022,7 @@ function _locale_translate_seek() {
 
     $groups = module_invoke_all('locale', 'groups');
     $header = array(t('Text group'), t('String'), ($limit_language) ? t('Language') : t('Languages'), array('data' => t('Operations'), 'colspan' => '2'));
-    $arr = array();
+    $arr    = array();
     while ($locale = db_fetch_object($result)) {
       $arr[$locale->lid]['group'] = $groups[$locale->textgroup];
       $arr[$locale->lid]['languages'][$locale->language] = $locale->translation;
@@ -2027,6 +2081,7 @@ function _locale_translate_seek_query() 
  *
  * @param $langcode
  *   The language code for which the file needs to be refreshed.
+ *
  * @return
  *   New content of the 'javascript_parsed' variable.
  */
@@ -2105,466 +2160,487 @@ function _locale_rebuild_js($langcode = 
     $data = "Drupal.locale = { ";
 
     if (!empty($language->formula)) {
-      $data .= "'pluralFormula': function(\$n) { return Number({$language->formula}); }, ";
+      $data .= "'pluralFormula': function(\$n) {
+         return Number({$language->formula}); }, ";
+      }
+
+      $data .= "'strings': ". drupal_to_js($translations) ." };";
+      $data_hash = md5($data);
     }
 
-    $data .= "'strings': ". drupal_to_js($translations) ." };";
-    $data_hash = md5($data);
-  }
+    // Construct the filepath where JS translation files are stored.
+    // There is (on purpose) no front end to edit that variable.
+    $dir = file_create_path(variable_get('locale_js_directory', 'languages'));
 
-  // Construct the filepath where JS translation files are stored.
-  // There is (on purpose) no front end to edit that variable.
-  $dir = file_create_path(variable_get('locale_js_directory', 'languages'));
+    // Delete old file, if we have no translations anymore, or a different file to be saved.
+    if (!empty($language->javascript) && (!$data || $language->javascript != $data_hash)) {
+      file_delete(file_create_path($dir .'/'. $language->language .'_'. $language->javascript .'.js'));
+      $language->javascript = '';
+      $status = 'deleted';
+    }
 
-  // Delete old file, if we have no translations anymore, or a different file to be saved.
-  if (!empty($language->javascript) && (!$data || $language->javascript != $data_hash)) {
-    file_delete(file_create_path($dir .'/'. $language->language .'_'. $language->javascript .'.js'));
-    $language->javascript = '';
-    $status = 'deleted';
-  }
+    // Only create a new file if the content has changed.
+    if ($data && $language->javascript != $data_hash) {
+      // Ensure that the directory exists and is writable, if possible.
+      file_check_directory($dir, TRUE);
+
+      // Save the file.
+      $dest = $dir .'/'. $language->language .'_'. $data_hash .'.js';
+      if (file_save_data($data, $dest)) {
+        $language->javascript = $data_hash;
+        $status = ($status == 'deleted') ? 'updated' : 'created';
+      }
+      else {
+        $language->javascript = '';
+        $status = 'error';
+      }
+    }
 
-  // Only create a new file if the content has changed.
-  if ($data && $language->javascript != $data_hash) {
-    // Ensure that the directory exists and is writable, if possible.
-    file_check_directory($dir, TRUE);
+    // Save the new JavaScript hash (or an empty value if the file
+    // just got deleted). Act only if some operation was executed.
+    if ($status) {
+      db_query("UPDATE {languages} SET javascript = '%s' WHERE language = '%s'", $language->javascript, $language->language);
 
-    // Save the file.
-    $dest = $dir .'/'. $language->language .'_'. $data_hash .'.js';
-    if (file_save_data($data, $dest)) {
-      $language->javascript = $data_hash;
-      $status = ($status == 'deleted') ? 'updated' : 'created';
-    }
-    else {
-      $language->javascript = '';
-      $status = 'error';
+      // Update the default language variable if the default language has been altered.
+      // This is necessary to keep the variable consistent with the database
+      // version of the language and to prevent checking against an outdated hash.
+      $default_langcode = language_default('language');
+      if ($default_langcode == $language->language) {
+        $default = db_fetch_object(db_query("SELECT * FROM {languages} WHERE language = '%s'", $default_langcode));
+        variable_set('language_default', $default);
+      }
     }
-  }
 
-  // Save the new JavaScript hash (or an empty value if the file
-  // just got deleted). Act only if some operation was executed.
-  if ($status) {
-    db_query("UPDATE {languages} SET javascript = '%s' WHERE language = '%s'", $language->javascript, $language->language);
-
-    // Update the default language variable if the default language has been altered.
-    // This is necessary to keep the variable consistent with the database
-    // version of the language and to prevent checking against an outdated hash.
-    $default_langcode = language_default('language');
-    if ($default_langcode == $language->language) {
-      $default = db_fetch_object(db_query("SELECT * FROM {languages} WHERE language = '%s'", $default_langcode));
-      variable_set('language_default', $default);
-    }
-  }
+    // Log the operation and return success flag.
+    switch ($status) {
+      case 'updated':
+        watchdog('locale', 'Updated JavaScript translation file for the language %language.', array('%language' => t($language->name)));
+        return TRUE;
 
-  // Log the operation and return success flag.
-  switch ($status) {
-    case 'updated':
-      watchdog('locale', 'Updated JavaScript translation file for the language %language.', array('%language' => t($language->name)));
-      return TRUE;
-    case 'created':
-      watchdog('locale', 'Created JavaScript translation file for the language %language.', array('%language' => t($language->name)));
-      return TRUE;
-    case 'deleted':
-      watchdog('locale', 'Removed JavaScript translation file for the language %language, because no translations currently exist for that language.', array('%language' => t($language->name)));
-      return TRUE;
-    case 'error':
-      watchdog('locale', 'An error occurred during creation of the JavaScript translation file for the language %language.', array('%language' => t($language->name)), WATCHDOG_ERROR);
-      return FALSE;
-    default:
-      // No operation needed.
-      return TRUE;
-  }
-}
+      case 'created':
+        watchdog('locale', 'Created JavaScript translation file for the language %language.', array('%language' => t($language->name)));
+        return TRUE;
 
-/**
- * List languages in search result table
- */
-function _locale_translate_language_list($translation, $limit_language) {
-  // Add CSS
-  drupal_add_css(drupal_get_path('module', 'locale') .'/locale.css', 'module', 'all', FALSE);
+      case 'deleted':
+        watchdog('locale', 'Removed JavaScript translation file for the language %language, because no translations currently exist for that language.', array('%language' => t($language->name)));
+        return TRUE;
 
-  $languages = language_list();
-  unset($languages['en']);
-  $output = '';
-  foreach ($languages as $langcode => $language) {
-    if (!$limit_language || $limit_language == $langcode) {
-      $output .= (!empty($translation[$langcode])) ? $langcode .' ' : "<em class=\"locale-untranslated\">$langcode</em> ";
+      case 'error':
+        watchdog('locale', 'An error occurred during creation of the JavaScript translation file for the language %language.', array('%language' => t($language->name)), WATCHDOG_ERROR);
+        return FALSE;
+
+      default:
+        // No operation needed.
+        return TRUE;
     }
   }
 
-  return $output;
-}
-/**
- * @} End of "locale-api-seek"
- */
+  /**
+   * List languages in search result table
+   */
+  function _locale_translate_language_list($translation, $limit_language) {
+    // Add CSS
+    drupal_add_css(drupal_get_path('module', 'locale') .'/locale.css', 'module', 'all', FALSE);
 
-/**
- * @defgroup locale-api-predefined List of predefined languages
- * @{
- */
-
-/**
- * Prepares the language code list for a select form item with only the unsupported ones
- */
-function _locale_prepare_predefined_list() {
-  $languages = language_list();
-  $predefined = _locale_get_predefined_list();
-  foreach ($predefined as $key => $value) {
-    if (isset($languages[$key])) {
-      unset($predefined[$key]);
-      continue;
-    }
-    // Include native name in output, if possible
-    if (count($value) > 1) {
-      $tname = t($value[0]);
-      $predefined[$key] = ($tname == $value[1]) ? $tname : "$tname ($value[1])";
-    }
-    else {
-      $predefined[$key] = t($value[0]);
+    $languages = language_list();
+    unset($languages['en']);
+    $output = '';
+    foreach ($languages as $langcode => $language) {
+      if (!$limit_language || $limit_language == $langcode) {
+        $output .= (!empty($translation[$langcode])) ? $langcode .' ' : "<em class=\"locale-untranslated\">$langcode</em> ";
+      }
     }
+
+    return $output;
   }
-  asort($predefined);
-  return $predefined;
-}
 
-/**
- * Some of the common languages with their English and native names
- *
- * Based on ISO 639 and http://people.w3.org/rishida/names/languages.html
- */
-function _locale_get_predefined_list() {
-  return array(
-    "aa" => array("Afar"),
-    "ab" => array("Abkhazian", "аҧсуа бызшәа"),
-    "ae" => array("Avestan"),
-    "af" => array("Afrikaans"),
-    "ak" => array("Akan"),
-    "am" => array("Amharic", "አማርኛ"),
-    "ar" => array("Arabic", /* Left-to-right marker "‭" */ "العربية", LANGUAGE_RTL),
-    "as" => array("Assamese"),
-    "av" => array("Avar"),
-    "ay" => array("Aymara"),
-    "az" => array("Azerbaijani", "azərbaycan"),
-    "ba" => array("Bashkir"),
-    "be" => array("Belarusian", "Беларуская"),
-    "bg" => array("Bulgarian", "Български"),
-    "bh" => array("Bihari"),
-    "bi" => array("Bislama"),
-    "bm" => array("Bambara", "Bamanankan"),
-    "bn" => array("Bengali"),
-    "bo" => array("Tibetan"),
-    "br" => array("Breton"),
-    "bs" => array("Bosnian", "Bosanski"),
-    "ca" => array("Catalan", "Català"),
-    "ce" => array("Chechen"),
-    "ch" => array("Chamorro"),
-    "co" => array("Corsican"),
-    "cr" => array("Cree"),
-    "cs" => array("Czech", "Čeština"),
-    "cu" => array("Old Slavonic"),
-    "cv" => array("Chuvash"),
-    "cy" => array("Welsh", "Cymraeg"),
-    "da" => array("Danish", "Dansk"),
-    "de" => array("German", "Deutsch"),
-    "dv" => array("Maldivian"),
-    "dz" => array("Bhutani"),
-    "ee" => array("Ewe", "Ɛʋɛ"),
-    "el" => array("Greek", "Ελληνικά"),
-    "en" => array("English"),
-    "eo" => array("Esperanto"),
-    "es" => array("Spanish", "Español"),
-    "et" => array("Estonian", "Eesti"),
-    "eu" => array("Basque", "Euskera"),
-    "fa" => array("Persian", /* Left-to-right marker "‭" */ "فارسی", LANGUAGE_RTL),
-    "ff" => array("Fulah", "Fulfulde"),
-    "fi" => array("Finnish", "Suomi"),
-    "fj" => array("Fiji"),
-    "fo" => array("Faeroese"),
-    "fr" => array("French", "Français"),
-    "fy" => array("Frisian", "Frysk"),
-    "ga" => array("Irish", "Gaeilge"),
-    "gd" => array("Scots Gaelic"),
-    "gl" => array("Galician", "Galego"),
-    "gn" => array("Guarani"),
-    "gu" => array("Gujarati"),
-    "gv" => array("Manx"),
-    "ha" => array("Hausa"),
-    "he" => array("Hebrew", /* Left-to-right marker "‭" */ "עברית", LANGUAGE_RTL),
-    "hi" => array("Hindi", "हिन्दी"),
-    "ho" => array("Hiri Motu"),
-    "hr" => array("Croatian", "Hrvatski"),
-    "hu" => array("Hungarian", "Magyar"),
-    "hy" => array("Armenian", "Հայերեն"),
-    "hz" => array("Herero"),
-    "ia" => array("Interlingua"),
-    "id" => array("Indonesian", "Bahasa Indonesia"),
-    "ie" => array("Interlingue"),
-    "ig" => array("Igbo"),
-    "ik" => array("Inupiak"),
-    "is" => array("Icelandic", "Íslenska"),
-    "it" => array("Italian", "Italiano"),
-    "iu" => array("Inuktitut"),
-    "ja" => array("Japanese", "日本語"),
-    "jv" => array("Javanese"),
-    "ka" => array("Georgian"),
-    "kg" => array("Kongo"),
-    "ki" => array("Kikuyu"),
-    "kj" => array("Kwanyama"),
-    "kk" => array("Kazakh", "Қазақ"),
-    "kl" => array("Greenlandic"),
-    "km" => array("Cambodian"),
-    "kn" => array("Kannada", "ಕನ್ನಡ"),
-    "ko" => array("Korean", "한국어"),
-    "kr" => array("Kanuri"),
-    "ks" => array("Kashmiri"),
-    "ku" => array("Kurdish", "Kurdî"),
-    "kv" => array("Komi"),
-    "kw" => array("Cornish"),
-    "ky" => array("Kirghiz", "Кыргыз"),
-    "la" => array("Latin", "Latina"),
-    "lb" => array("Luxembourgish"),
-    "lg" => array("Luganda"),
-    "ln" => array("Lingala"),
-    "lo" => array("Laothian"),
-    "lt" => array("Lithuanian", "Lietuvių"),
-    "lv" => array("Latvian", "Latviešu"),
-    "mg" => array("Malagasy"),
-    "mh" => array("Marshallese"),
-    "mi" => array("Maori"),
-    "mk" => array("Macedonian", "Македонски"),
-    "ml" => array("Malayalam", "മലയാളം"),
-    "mn" => array("Mongolian"),
-    "mo" => array("Moldavian"),
-    "mr" => array("Marathi"),
-    "ms" => array("Malay", "Bahasa Melayu"),
-    "mt" => array("Maltese", "Malti"),
-    "my" => array("Burmese"),
-    "na" => array("Nauru"),
-    "nd" => array("North Ndebele"),
-    "ne" => array("Nepali"),
-    "ng" => array("Ndonga"),
-    "nl" => array("Dutch", "Nederlands"),
-    "nb" => array("Norwegian Bokmål", "Bokmål"),
-    "nn" => array("Norwegian Nynorsk", "Nynorsk"),
-    "nr" => array("South Ndebele"),
-    "nv" => array("Navajo"),
-    "ny" => array("Chichewa"),
-    "oc" => array("Occitan"),
-    "om" => array("Oromo"),
-    "or" => array("Oriya"),
-    "os" => array("Ossetian"),
-    "pa" => array("Punjabi"),
-    "pi" => array("Pali"),
-    "pl" => array("Polish", "Polski"),
-    "ps" => array("Pashto", /* Left-to-right marker "‭" */ "پښتو", LANGUAGE_RTL),
-    "pt" => array("Portuguese, Portugal", "Português"),
-    "pt-br" => array("Portuguese, Brazil", "Português"),
-    "qu" => array("Quechua"),
-    "rm" => array("Rhaeto-Romance"),
-    "rn" => array("Kirundi"),
-    "ro" => array("Romanian", "Română"),
-    "ru" => array("Russian", "Русский"),
-    "rw" => array("Kinyarwanda"),
-    "sa" => array("Sanskrit"),
-    "sc" => array("Sardinian"),
-    "sd" => array("Sindhi"),
-    "se" => array("Northern Sami"),
-    "sg" => array("Sango"),
-    "sh" => array("Serbo-Croatian"),
-    "si" => array("Singhalese"),
-    "sk" => array("Slovak", "Slovenčina"),
-    "sl" => array("Slovenian", "Slovenščina"),
-    "sm" => array("Samoan"),
-    "sn" => array("Shona"),
-    "so" => array("Somali"),
-    "sq" => array("Albanian", "Shqip"),
-    "sr" => array("Serbian", "Српски"),
-    "ss" => array("Siswati"),
-    "st" => array("Sesotho"),
-    "su" => array("Sudanese"),
-    "sv" => array("Swedish", "Svenska"),
-    "sw" => array("Swahili", "Kiswahili"),
-    "ta" => array("Tamil", "தமிழ்"),
-    "te" => array("Telugu", "తెలుగు"),
-    "tg" => array("Tajik"),
-    "th" => array("Thai", "ภาษาไทย"),
-    "ti" => array("Tigrinya"),
-    "tk" => array("Turkmen"),
-    "tl" => array("Tagalog"),
-    "tn" => array("Setswana"),
-    "to" => array("Tonga"),
-    "tr" => array("Turkish", "Türkçe"),
-    "ts" => array("Tsonga"),
-    "tt" => array("Tatar", "Tatarça"),
-    "tw" => array("Twi"),
-    "ty" => array("Tahitian"),
-    "ug" => array("Uighur"),
-    "uk" => array("Ukrainian", "Українська"),
-    "ur" => array("Urdu", /* Left-to-right marker "‭" */ "اردو", LANGUAGE_RTL),
-    "uz" => array("Uzbek", "o'zbek"),
-    "ve" => array("Venda"),
-    "vi" => array("Vietnamese", "Tiếng Việt"),
-    "wo" => array("Wolof"),
-    "xh" => array("Xhosa", "isiXhosa"),
-    "yi" => array("Yiddish"),
-    "yo" => array("Yoruba", "Yorùbá"),
-    "za" => array("Zhuang"),
-    "zh-hans" => array("Chinese, Simplified", "简体中文"),
-    "zh-hant" => array("Chinese, Traditional", "繁體中文"),
-    "zu" => array("Zulu", "isiZulu"),
-  );
-}
-/**
- * @} End of "locale-api-languages-predefined"
- */
+  /**
+   * @} End of "locale-api-seek"
+   */
 
-/**
- * @defgroup locale-autoimport Automatic interface translation import
- * @{
- */
+  /**
+   * @defgroup locale-api-predefined List of predefined languages
+   * @{
+   */
 
-/**
- * Prepare a batch to import translations for all enabled
- * modules in a given language.
- *
- * @param $langcode
- *   Language code to import translations for.
- * @param $finished
- *   Optional finished callback for the batch.
- * @param $skip
- *   Array of component names to skip. Used in the installer for the
- *   second pass import, when most components are already imported.
- * @return
- *   A batch structure or FALSE if no files found.
- */
-function locale_batch_by_language($langcode, $finished = NULL, $skip = array()) {
-  // Collect all files to import for all enabled modules and themes.
-  $files = array();
-  $components = array();
-  $query = "SELECT name, filename FROM {system} WHERE status = 1";
-  if (count($skip)) {
-    $query .= " AND name NOT IN (". db_placeholders($skip, 'varchar') .")";
-  }
-  $result = db_query($query, $skip);
-  while ($component = db_fetch_object($result)) {
-    // Collect all files for all components, names as $langcode.po or
-    // with names ending with $langcode.po. This allows for filenames
-    // like node-module.de.po to let translators use small files and
-    // be able to import in smaller chunks.
-    $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)'. $langcode .'\.po$', array('.', '..', 'CVS'), 0, FALSE));
-    $components[] = $component->name;
-  }
-
-  return _locale_batch_build($files, $finished, $components);
-}
+  /**
+   * Prepares the language code list for a select form item with only the unsupported ones
+   */
+  function _locale_prepare_predefined_list() {
+    $languages = language_list();
+    $predefined = _locale_get_predefined_list();
+    foreach ($predefined as $key => $value) {
+      if (isset($languages[$key])) {
+        unset($predefined[$key]);
+        continue;
+      }
+      // Include native name in output, if possible
+      if (count($value) > 1) {
+        $tname = t($value[0]);
+        $predefined[$key] = ($tname == $value[1]) ? $tname : "$tname ($value[1])";
+      }
+      else {
+        $predefined[$key] = t($value[0]);
+      }
+    }
+    asort($predefined);
+    return $predefined;
+  }
 
-/**
- * Prepare a batch to run when installing modules or enabling themes.
- * This batch will import translations for the newly added components
- * in all the languages already set up on the site.
- *
- * @param $components
- *   An array of component (theme and/or module) names to import
- *   translations for.
- * @param $finished
- *   Optional finished callback for the batch.
- */
-function locale_batch_by_component($components, $finished = '_locale_batch_system_finished') {
-  $files = array();
-  $languages = language_list('enabled');
-  unset($languages[1]['en']);
-  if (count($languages[1])) {
-    $language_list = join('|', array_keys($languages[1]));
-    // Collect all files to import for all $components.
-    $result = db_query("SELECT name, filename FROM {system} WHERE status = 1");
+  /**
+   * Some of the common languages with their English and native names
+   *
+   * Based on ISO 639 and http://people.w3.org/rishida/names/languages.html
+   */
+  function _locale_get_predefined_list() {
+    return array(
+      "aa" => array("Afar"),
+      "ab" => array("Abkhazian", "аҧсуа бызшәа"),
+      "ae" => array("Avestan"),
+      "af" => array("Afrikaans"),
+      "ak" => array("Akan"),
+      "am" => array("Amharic", "አማርኛ"),
+        /* Left-to-right marker "‭" */
+      "ar" => array("Arabic",
+        "العربية", LANGUAGE_RTL),
+      "as" => array("Assamese"),
+      "av" => array("Avar"),
+      "ay" => array("Aymara"),
+      "az" => array("Azerbaijani", "azərbaycan"),
+      "ba" => array("Bashkir"),
+      "be" => array("Belarusian", "Беларуская"),
+      "bg" => array("Bulgarian", "Български"),
+      "bh" => array("Bihari"),
+      "bi" => array("Bislama"),
+      "bm" => array("Bambara", "Bamanankan"),
+      "bn" => array("Bengali"),
+      "bo" => array("Tibetan"),
+      "br" => array("Breton"),
+      "bs" => array("Bosnian", "Bosanski"),
+      "ca" => array("Catalan", "Català"),
+      "ce" => array("Chechen"),
+      "ch" => array("Chamorro"),
+      "co" => array("Corsican"),
+      "cr" => array("Cree"),
+      "cs" => array("Czech", "Čeština"),
+      "cu" => array("Old Slavonic"),
+      "cv" => array("Chuvash"),
+      "cy" => array("Welsh", "Cymraeg"),
+      "da" => array("Danish", "Dansk"),
+      "de" => array("German", "Deutsch"),
+      "dv" => array("Maldivian"),
+      "dz" => array("Bhutani"),
+      "ee" => array("Ewe", "Ɛʋɛ"),
+      "el" => array("Greek", "Ελληνικά"),
+      "en" => array("English"),
+      "eo" => array("Esperanto"),
+      "es" => array("Spanish", "Español"),
+      "et" => array("Estonian", "Eesti"),
+      "eu" => array("Basque", "Euskera"),
+        /* Left-to-right marker "‭" */
+      "fa" => array("Persian",
+        "فارسی", LANGUAGE_RTL),
+      "ff" => array("Fulah", "Fulfulde"),
+      "fi" => array("Finnish", "Suomi"),
+      "fj" => array("Fiji"),
+      "fo" => array("Faeroese"),
+      "fr" => array("French", "Français"),
+      "fy" => array("Frisian", "Frysk"),
+      "ga" => array("Irish", "Gaeilge"),
+      "gd" => array("Scots Gaelic"),
+      "gl" => array("Galician", "Galego"),
+      "gn" => array("Guarani"),
+      "gu" => array("Gujarati"),
+      "gv" => array("Manx"),
+      "ha" => array("Hausa"),
+        /* Left-to-right marker "‭" */
+      "he" => array("Hebrew",
+        "עברית", LANGUAGE_RTL),
+      "hi" => array("Hindi", "हिन्दी"),
+      "ho" => array("Hiri Motu"),
+      "hr" => array("Croatian", "Hrvatski"),
+      "hu" => array("Hungarian", "Magyar"),
+      "hy" => array("Armenian", "Հայերեն"),
+      "hz" => array("Herero"),
+      "ia" => array("Interlingua"),
+      "id" => array("Indonesian", "Bahasa Indonesia"),
+      "ie" => array("Interlingue"),
+      "ig" => array("Igbo"),
+      "ik" => array("Inupiak"),
+      "is" => array("Icelandic", "Íslenska"),
+      "it" => array("Italian", "Italiano"),
+      "iu" => array("Inuktitut"),
+      "ja" => array("Japanese", "日本語"),
+      "jv" => array("Javanese"),
+      "ka" => array("Georgian"),
+      "kg" => array("Kongo"),
+      "ki" => array("Kikuyu"),
+      "kj" => array("Kwanyama"),
+      "kk" => array("Kazakh", "Қазақ"),
+      "kl" => array("Greenlandic"),
+      "km" => array("Cambodian"),
+      "kn" => array("Kannada", "ಕನ್ನಡ"),
+      "ko" => array("Korean", "한국어"),
+      "kr" => array("Kanuri"),
+      "ks" => array("Kashmiri"),
+      "ku" => array("Kurdish", "Kurdî"),
+      "kv" => array("Komi"),
+      "kw" => array("Cornish"),
+      "ky" => array("Kirghiz", "Кыргыз"),
+      "la" => array("Latin", "Latina"),
+      "lb" => array("Luxembourgish"),
+      "lg" => array("Luganda"),
+      "ln" => array("Lingala"),
+      "lo" => array("Laothian"),
+      "lt" => array("Lithuanian", "Lietuvių"),
+      "lv" => array("Latvian", "Latviešu"),
+      "mg" => array("Malagasy"),
+      "mh" => array("Marshallese"),
+      "mi" => array("Maori"),
+      "mk" => array("Macedonian", "Македонски"),
+      "ml" => array("Malayalam", "മലയാളം"),
+      "mn" => array("Mongolian"),
+      "mo" => array("Moldavian"),
+      "mr" => array("Marathi"),
+      "ms" => array("Malay", "Bahasa Melayu"),
+      "mt" => array("Maltese", "Malti"),
+      "my" => array("Burmese"),
+      "na" => array("Nauru"),
+      "nd" => array("North Ndebele"),
+      "ne" => array("Nepali"),
+      "ng" => array("Ndonga"),
+      "nl" => array("Dutch", "Nederlands"),
+      "nb" => array("Norwegian Bokmål", "Bokmål"),
+      "nn" => array("Norwegian Nynorsk", "Nynorsk"),
+      "nr" => array("South Ndebele"),
+      "nv" => array("Navajo"),
+      "ny" => array("Chichewa"),
+      "oc" => array("Occitan"),
+      "om" => array("Oromo"),
+      "or" => array("Oriya"),
+      "os" => array("Ossetian"),
+      "pa" => array("Punjabi"),
+      "pi" => array("Pali"),
+      "pl" => array("Polish", "Polski"),
+        /* Left-to-right marker "‭" */
+      "ps" => array("Pashto",
+        "پښتو", LANGUAGE_RTL),
+      "pt" => array("Portuguese, Portugal", "Português"),
+      "pt-br" => array("Portuguese, Brazil", "Português"),
+      "qu" => array("Quechua"),
+      "rm" => array("Rhaeto-Romance"),
+      "rn" => array("Kirundi"),
+      "ro" => array("Romanian", "Română"),
+      "ru" => array("Russian", "Русский"),
+      "rw" => array("Kinyarwanda"),
+      "sa" => array("Sanskrit"),
+      "sc" => array("Sardinian"),
+      "sd" => array("Sindhi"),
+      "se" => array("Northern Sami"),
+      "sg" => array("Sango"),
+      "sh" => array("Serbo-Croatian"),
+      "si" => array("Singhalese"),
+      "sk" => array("Slovak", "Slovenčina"),
+      "sl" => array("Slovenian", "Slovenščina"),
+      "sm" => array("Samoan"),
+      "sn" => array("Shona"),
+      "so" => array("Somali"),
+      "sq" => array("Albanian", "Shqip"),
+      "sr" => array("Serbian", "Српски"),
+      "ss" => array("Siswati"),
+      "st" => array("Sesotho"),
+      "su" => array("Sudanese"),
+      "sv" => array("Swedish", "Svenska"),
+      "sw" => array("Swahili", "Kiswahili"),
+      "ta" => array("Tamil", "தமிழ்"),
+      "te" => array("Telugu", "తెలుగు"),
+      "tg" => array("Tajik"),
+      "th" => array("Thai", "ภาษาไทย"),
+      "ti" => array("Tigrinya"),
+      "tk" => array("Turkmen"),
+      "tl" => array("Tagalog"),
+      "tn" => array("Setswana"),
+      "to" => array("Tonga"),
+      "tr" => array("Turkish", "Türkçe"),
+      "ts" => array("Tsonga"),
+      "tt" => array("Tatar", "Tatarça"),
+      "tw" => array("Twi"),
+      "ty" => array("Tahitian"),
+      "ug" => array("Uighur"),
+      "uk" => array("Ukrainian", "Українська"),
+        /* Left-to-right marker "‭" */
+      "ur" => array("Urdu",
+        "اردو", LANGUAGE_RTL),
+      "uz" => array("Uzbek", "o'zbek"),
+      "ve" => array("Venda"),
+      "vi" => array("Vietnamese", "Tiếng Việt"),
+      "wo" => array("Wolof"),
+      "xh" => array("Xhosa", "isiXhosa"),
+      "yi" => array("Yiddish"),
+      "yo" => array("Yoruba", "Yorùbá"),
+      "za" => array("Zhuang"),
+      "zh-hans" => array("Chinese, Simplified", "简体中文"),
+      "zh-hant" => array("Chinese, Traditional", "繁體中文"),
+      "zu" => array("Zulu", "isiZulu"),
+    );
+  }
+
+  /**
+   * @} End of "locale-api-languages-predefined"
+   */
+
+  /**
+   * @defgroup locale-autoimport Automatic interface translation import
+   * @{
+   */
+
+  /**
+   * Prepare a batch to import translations for all enabled
+   * modules in a given language.
+   *
+   * @param $langcode
+   *   Language code to import translations for.
+   * @param $finished
+   *   Optional finished callback for the batch.
+   * @param $skip
+   *   Array of component names to skip. Used in the installer for the
+   *   second pass import, when most components are already imported.
+   *
+   * @return
+   *   A batch structure or FALSE if no files found.
+   */
+  function locale_batch_by_language($langcode, $finished = NULL, $skip = array()) {
+    // Collect all files to import for all enabled modules and themes.
+    $files      = array();
+    $components = array();
+    $query      = "SELECT name, filename FROM {system} WHERE status = 1";
+    if (count($skip)) {
+      $query .= " AND name NOT IN (". db_placeholders($skip, 'varchar') .")";
+    }
+    $result = db_query($query, $skip);
     while ($component = db_fetch_object($result)) {
-      if (in_array($component->name, $components)) {
-        // Collect all files for this component in all enabled languages, named
-        // as $langcode.po or with names ending with $langcode.po. This allows
-        // for filenames like node-module.de.po to let translators use small
-        // files and be able to import in smaller chunks.
-        $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)('. $language_list .')\.po$', array('.', '..', 'CVS'), 0, FALSE));
+      // Collect all files for all components, names as $langcode.po or
+      // with names ending with $langcode.po. This allows for filenames
+      // like node-module.de.po to let translators use small files and
+      // be able to import in smaller chunks.
+      $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)'. $langcode .'\.po$', array('.', '..', 'CVS'), 0, FALSE));
+      $components[] = $component->name;
+    }
+
+    return _locale_batch_build($files, $finished, $components);
+  }
+
+  /**
+   * Prepare a batch to run when installing modules or enabling themes.
+   * This batch will import translations for the newly added components
+   * in all the languages already set up on the site.
+   *
+   * @param $components
+   *   An array of component (theme and/or module) names to import
+   *   translations for.
+   * @param $finished
+   *   Optional finished callback for the batch.
+   */
+  function locale_batch_by_component($components, $finished = '_locale_batch_system_finished') {
+    $files = array();
+    $languages = language_list('enabled');
+    unset($languages[1]['en']);
+    if (count($languages[1])) {
+      $language_list = join('|', array_keys($languages[1]));
+      // Collect all files to import for all $components.
+      $result = db_query("SELECT name, filename FROM {system} WHERE status = 1");
+      while ($component = db_fetch_object($result)) {
+        if (in_array($component->name, $components)) {
+          // Collect all files for this component in all enabled languages, named
+          // as $langcode.po or with names ending with $langcode.po. This allows
+          // for filenames like node-module.de.po to let translators use small
+          // files and be able to import in smaller chunks.
+          $files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)('. $language_list .')\.po$', array('.', '..', 'CVS'), 0, FALSE));
+        }
       }
+      return _locale_batch_build($files, $finished);
     }
-    return _locale_batch_build($files, $finished);
+    return FALSE;
   }
-  return FALSE;
-}
 
-/**
- * Build a locale batch from an array of files.
- *
- * @param $files
- *   Array of files to import
- * @param $finished
- *   Optional finished callback for the batch.
- * @param $components
- *   Optional list of component names the batch covers. Used in the installer.
- * @return
- *   A batch structure
- */
-function _locale_batch_build($files, $finished = NULL, $components = array()) {
-  $t = get_t();
-  if (count($files)) {
-    $operations = array();
-    foreach ($files as $file) {
-      // We call _locale_batch_import for every batch operation.
-      $operations[] = array('_locale_batch_import', array($file->filename));    }
+  /**
+   * Build a locale batch from an array of files.
+   *
+   * @param $files
+   *   Array of files to import
+   * @param $finished
+   *   Optional finished callback for the batch.
+   * @param $components
+   *   Optional list of component names the batch covers. Used in the installer.
+   *
+   * @return
+   *   A batch structure
+   */
+  function _locale_batch_build($files, $finished = NULL, $components = array()) {
+    $t = get_t();
+    if (count($files)) {
+      $operations = array();
+      foreach ($files as $file) {
+        // We call _locale_batch_import for every batch operation.
+        $operations[] = array('_locale_batch_import', array($file->filename));
+      }
       $batch = array(
-        'operations'    => $operations,
-        'title'         => $t('Importing interface translations'),
-        'init_message'  => $t('Starting import'),
+        'operations' => $operations,
+        'title' => $t('Importing interface translations'),
+        'init_message' => $t('Starting import'),
         'error_message' => $t('Error importing interface translations'),
-        'file'          => './includes/locale.inc',
+        'file' => './includes/locale.inc',
         // This is not a batch API construct, but data passed along to the
         // installer, so we know what did we import already.
-        '#components'   => $components,
+        '#components' => $components,
       );
       if (isset($finished)) {
         $batch['finished'] = $finished;
       }
-    return $batch;
+      return $batch;
+    }
+    return FALSE;
   }
-  return FALSE;
-}
 
-/**
- * Perform interface translation import as a batch step.
- *
- * @param $filepath
- *   Path to a file to import.
- * @param $results
- *   Contains a list of files imported.
- */
-function _locale_batch_import($filepath, &$context) {
-  // The filename is either {langcode}.po or {prefix}.{langcode}.po, so
-  // we can extract the language code to use for the import from the end.
-  if (preg_match('!(/|\.)([^\./]+)\.po$!', $filepath, $langcode)) {
-    $file = (object) array('filename' => basename($filepath), 'filepath' => $filepath);
-    _locale_import_read_po('db-store', $file, LOCALE_IMPORT_KEEP, $langcode[2]);
-    $context['results'][] = $filepath;
+  /**
+   * Perform interface translation import as a batch step.
+   *
+   * @param $filepath
+   *   Path to a file to import.
+   * @param $results
+   *   Contains a list of files imported.
+   */
+  function _locale_batch_import($filepath, &$context) {
+    // The filename is either {langcode}.po or {prefix}.{langcode}.po, so
+    // we can extract the language code to use for the import from the end.
+    if (preg_match('!(/|\.)([^\./]+)\.po$!', $filepath, $langcode)) {
+      $file = (object)array('filename' => basename($filepath), 'filepath' => $filepath);
+      _locale_import_read_po('db-store', $file, LOCALE_IMPORT_KEEP, $langcode[2]);
+      $context['results'][] = $filepath;
+    }
   }
-}
 
-/**
- * Finished callback of system page locale import batch.
- * Inform the user of translation files imported.
- */
-function _locale_batch_system_finished($success, $results) {
-  if ($success) {
-    drupal_set_message(format_plural(count($results), 'One translation file imported for the newly installed modules.', '@count translation files imported for the newly installed modules.'));
+  /**
+   * Finished callback of system page locale import batch.
+   * Inform the user of translation files imported.
+   */
+  function _locale_batch_system_finished($success, $results) {
+    if ($success) {
+      drupal_set_message(format_plural(count($results), 'One translation file imported for the newly installed modules.', '@count translation files imported for the newly installed modules.'));
+    }
   }
-}
 
-/**
- * Finished callback of language addition locale import batch.
- * Inform the user of translation files imported.
- */
-function _locale_batch_language_finished($success, $results) {
-  if ($success) {
-    drupal_set_message(format_plural(count($results), 'One translation file imported for the enabled modules.', '@count translation files imported for the enabled modules.'));
+  /**
+   * Finished callback of language addition locale import batch.
+   * Inform the user of translation files imported.
+   */
+  function _locale_batch_language_finished($success, $results) {
+    if ($success) {
+      drupal_set_message(format_plural(count($results), 'One translation file imported for the enabled modules.', '@count translation files imported for the enabled modules.'));
+    }
   }
-}
 
-/**
- * @} End of "locale-autoimport"
- */
+  /**
+   * @} End of "locale-autoimport"
+   */
+
Index: includes/mail.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/mail.inc,v
retrieving revision 1.7
diff -u -p -r1.7 mail.inc
--- includes/mail.inc	4 Sep 2007 21:10:45 -0000	1.7
+++ includes/mail.inc	21 Jan 2008 21:58:47 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: mail.inc,v 1.7 2007/09/04 21:10:45 dries Exp $
 
+
 /**
  * Compose and optionally send an e-mail message.
  *
@@ -73,6 +74,7 @@
  *   Sets From, Reply-To, Return-Path and Error-To to this value, if given.
  * @param $send
  *   Send the message directly, without calling drupal_mail_send() manually.
+ *
  * @return
  *   The $message array structure containing all details of the
  *   message. If already sent ($send = TRUE), then the 'result' element
@@ -85,21 +87,21 @@ function drupal_mail($module, $key, $to,
 
   // Bundle up the variables into a structured array for altering.
   $message = array(
-    'id'       => $module .'_'. $key,
-    'to'       => $to,
-    'from'     => isset($from) ? $from : $default_from,
+    'id' => $module .'_'. $key,
+    'to' => $to,
+    'from' => isset($from) ? $from : $default_from,
     'language' => $language,
-    'params'   => $params,
-    'subject'  => '',
-    'body'     => array()
+    'params' => $params,
+    'subject' => '',
+    'body' => array(),
   );
 
   // Build the default headers
   $headers = array(
-    'MIME-Version'              => '1.0',
-    'Content-Type'              => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
+    'MIME-Version' => '1.0',
+    'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
     'Content-Transfer-Encoding' => '8Bit',
-    'X-Mailer'                  => 'Drupal'
+    'X-Mailer' => 'Drupal',
   );
   if ($default_from) {
     // To prevent e-mail from looking like spam, the addresses in the Sender and
@@ -166,6 +168,7 @@ function drupal_mail($module, $key, $to,
  *      smart plain text wrapping.
  *   - headers
  *      Associative array containing all mail headers.
+ *
  * @return
  *   Returns TRUE if the mail was successfully accepted for delivery,
  *   FALSE otherwise.
@@ -253,6 +256,7 @@ function drupal_wrap_mail($text, $indent
  * @param $allowed_tags (optional)
  *   If supplied, a list of tags that will be transformed. If omitted, all
  *   all supported tags are transformed.
+ *
  * @return
  *   The transformed string.
  */
@@ -276,9 +280,9 @@ function drupal_html_to_text($string, $a
   // Replace inline <a> tags with the text of link and a footnote.
   // 'See <a href="http://drupal.org">the Drupal site</a>' becomes
   // 'See the Drupal site [1]' with the URL included as a footnote.
-  $pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i';
-  $string = preg_replace_callback($pattern, '_drupal_html_to_mail_urls', $string);
-  $urls = _drupal_html_to_mail_urls();
+  $pattern   = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i';
+  $string    = preg_replace_callback($pattern, '_drupal_html_to_mail_urls', $string);
+  $urls      = _drupal_html_to_mail_urls();
   $footnotes = '';
   if (count($urls)) {
     $footnotes .= "\n";
@@ -292,86 +296,109 @@ function drupal_html_to_text($string, $a
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting $null as required).
 
-  $tag = FALSE; // Odd/even counter (tag or no tag)
-  $casing = NULL; // Case conversion function
+  // Odd/even counter (tag or no tag)
+  $tag = FALSE;
+  // Case conversion function
+  $casing = NULL;
   $output = '';
-  $indent = array(); // All current indentation string chunks
-  $lists = array(); // Array of counters for opened lists
+  // All current indentation string chunks
+  $indent = array();
+  // Array of counters for opened lists
+  $lists = array();
   foreach ($split as $value) {
-    $chunk = NULL; // Holds a string ready to be formatted and output.
+    // Holds a string ready to be formatted and output.
+    $chunk = NULL;
 
     // Process HTML tags (but don't output any literally).
     if ($tag) {
       list($tagname) = explode(' ', strtolower($value), 2);
       switch ($tagname) {
         // List counters
+
         case 'ul':
           array_unshift($lists, '*');
           break;
+
         case 'ol':
           array_unshift($lists, 1);
           break;
+
         case '/ul':
         case '/ol':
           array_shift($lists);
-          $chunk = ''; // Ensure blank new-line.
+          // Ensure blank new-line.
+          $chunk = '';
           break;
 
         // Quotation/list markers, non-fancy headers
+
         case 'blockquote':
           // Format=flowed indentation cannot be mixed with lists.
           $indent[] = count($lists) ? ' "' : '>';
           break;
+
         case 'li':
           $indent[] = is_numeric($lists[0]) ? ' '. $lists[0]++ .') ' : ' * ';
           break;
+
         case 'dd':
           $indent[] = '    ';
           break;
+
         case 'h3':
           $indent[] = '.... ';
           break;
+
         case 'h4':
           $indent[] = '.. ';
           break;
+
         case '/blockquote':
           if (count($lists)) {
             // Append closing quote for inline quotes (immediately).
             $output = rtrim($output, "> \n") ."\"\n";
-            $chunk = ''; // Ensure blank new-line.
+            // Ensure blank new-line.
+            $chunk = '';
           }
           // Fall-through
         case '/li':
         case '/dd':
           array_pop($indent);
           break;
+
         case '/h3':
         case '/h4':
           array_pop($indent);
         case '/h5':
         case '/h6':
-          $chunk = ''; // Ensure blank new-line.
+          // Ensure blank new-line.
+          $chunk = '';
           break;
 
         // Fancy headers
+
         case 'h1':
           $indent[] = '======== ';
           $casing = 'drupal_strtoupper';
           break;
+
         case 'h2':
           $indent[] = '-------- ';
           $casing = 'drupal_strtoupper';
           break;
+
         case '/h1':
         case '/h2':
           $casing = NULL;
           // Pad the line with dashes.
           $output = _drupal_html_to_text_pad($output, ($tagname == '/h1') ? '=' : '-', ' ');
           array_pop($indent);
-          $chunk = ''; // Ensure blank new-line.
+          // Ensure blank new-line.
+          $chunk = '';
           break;
 
         // Horizontal rulers
+
         case 'hr':
           // Insert immediately.
           $output .= drupal_wrap_mail('', implode('', $indent)) ."\n";
@@ -379,9 +406,11 @@ function drupal_html_to_text($string, $a
           break;
 
         // Paragraphs and definition lists
+
         case '/p':
         case '/dl':
-          $chunk = ''; // Ensure blank new-line.
+          // Ensure blank new-line.
+          $chunk = '';
           break;
       }
     }
@@ -469,3 +498,4 @@ function _drupal_html_to_text_pad($text,
   // Add prefix and padding, and restore linebreak.
   return $text . $prefix . str_repeat($pad, $n - strlen($prefix)) ."\n";
 }
+
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.247
diff -u -p -r1.247 menu.inc
--- includes/menu.inc	21 Jan 2008 12:05:36 -0000	1.247
+++ includes/menu.inc	21 Jan 2008 21:58:48 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: menu.inc,v 1.247 2008/01/21 12:05:36 goba Exp $
 
+
 /**
  * @file
  * API for the Drupal menu system.
@@ -155,18 +156,16 @@ define('MENU_SITE_OFFLINE', 4);
  * Menu tree
  */
 
- /**
+/**
  * The maximum number of path elements for a menu callback
  */
 define('MENU_MAX_PARTS', 7);
 
-
 /**
  * The maximum depth of a menu links tree - matches the number of p columns.
  */
 define('MENU_MAX_DEPTH', 9);
 
-
 /**
  * @} End of "Menu tree parameters".
  */
@@ -195,6 +194,7 @@ define('MENU_MAX_DEPTH', 9);
  * @param $parts
  *   An array of path parts, for the above example
  *   array('node', '12345', 'edit').
+ *
  * @return
  *   An array which contains the ancestors and placeholders. Placeholders
  *   simply contain as many '%s' as the ancestors.
@@ -202,10 +202,10 @@ define('MENU_MAX_DEPTH', 9);
 function menu_get_ancestors($parts) {
   $number_parts = count($parts);
   $placeholders = array();
-  $ancestors = array();
-  $length =  $number_parts - 1;
-  $end = (1 << $number_parts) - 1;
-  $masks = variable_get('menu_masks', array());
+  $ancestors    = array();
+  $length       = $number_parts - 1;
+  $end          = (1 << $number_parts) - 1;
+  $masks        = variable_get('menu_masks', array());
   // Only examine patterns that actually exist as router items (the masks).
   foreach ($masks as $i) {
     if ($i > $end) {
@@ -251,6 +251,7 @@ function menu_get_ancestors($parts) {
  *   A serialized array.
  * @param @map
  *   An array of potential replacements.
+ *
  * @return
  *   The $data array unserialized and mapped.
  */
@@ -268,8 +269,6 @@ function menu_unserialize($data, $map) {
   }
 }
 
-
-
 /**
  * Replaces the statically cached item for a given path.
  *
@@ -293,6 +292,7 @@ function menu_set_item($path, $router_it
  *   node/% item and return that.
  * @param $router_item
  *   Internal use only.
+ *
  * @return
  *   The router item, an associate array corresponding to one row in the
  *   menu_router table. The value of key map holds the loaded objects. The
@@ -313,7 +313,7 @@ function menu_get_item($path = NULL, $ro
     $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
     list($ancestors, $placeholders) = menu_get_ancestors($parts);
 
-    if ($router_item = db_fetch_array(db_query_range('SELECT * FROM {menu_router} WHERE path IN ('. implode (',', $placeholders) .') ORDER BY fit DESC', $ancestors, 0, 1))) {
+    if ($router_item = db_fetch_array(db_query_range('SELECT * FROM {menu_router} WHERE path IN ('. implode(',', $placeholders) .') ORDER BY fit DESC', $ancestors, 0, 1))) {
       $map = _menu_translate($router_item, $original_map);
       if ($map === FALSE) {
         $router_items[$path] = FALSE;
@@ -342,7 +342,7 @@ function menu_execute_active_handler($pa
   if ($router_item = menu_get_item($path)) {
     if ($router_item['access']) {
       if ($router_item['file']) {
-        require_once($router_item['file']);
+        require_once ($router_item['file']);
       }
       return call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
     }
@@ -360,6 +360,7 @@ function menu_execute_active_handler($pa
  *   A menu router or menu link item
  * @param $map
  *   An array of path arguments (ex: array('node', '5'))
+ *
  * @return
  *   Returns TRUE for success, FALSE if an object cannot be loaded
  */
@@ -425,6 +426,7 @@ function _menu_load_objects(&$item, &$ma
  *   A menu router or menu link item
  * @param $map
  *   An array of path arguments (ex: array('node', '5'))
+ *
  * @return
  *   $item['access'] becomes TRUE if the item is accessible, FALSE otherwise.
  */
@@ -451,7 +453,7 @@ function _menu_check_access(&$item, $map
 
 /**
  * Localize the router item title using t() or another callback.
- * 
+ *
  * Translate the title and description to allow storage of English title
  * strings in the database, yet display of them in the language required
  * by the current user.
@@ -527,6 +529,7 @@ function _menu_item_localize(&$item, $ma
  * @param $to_arg
  *   Execute $item['to_arg_functions'] or not. Use only if you want to render a
  *   path from the menu table, for example tabs.
+ *
  * @return
  *   Returns the map with objects loaded as defined in the
  *   $item['load_functions. $item['access'] becomes TRUE if the item is
@@ -597,6 +600,7 @@ function menu_tail_to_arg($arg, $map, $i
  *
  * @param $item
  *   A menu link
+ *
  * @return
  *   Returns the map of path arguments with objects loaded as defined in the
  *   $item['load_functions'].
@@ -608,9 +612,9 @@ function _menu_link_translate(&$item) {
   $item['options'] = unserialize($item['options']);
   if ($item['external']) {
     $item['access'] = 1;
-    $map = array();
-    $item['href'] = $item['link_path'];
-    $item['title'] = $item['link_title'];
+    $map            = array();
+    $item['href']   = $item['link_path'];
+    $item['title']  = $item['link_title'];
   }
   else {
     $map = explode('/', $item['link_path']);
@@ -673,6 +677,7 @@ function menu_get_object($type = 'node',
  *
  * @param $menu_name
  *   The name of the menu.
+ *
  * @return
  *   The rendered HTML of that menu on the current page.
  */
@@ -691,6 +696,7 @@ function menu_tree($menu_name = 'navigat
  *
  * @param $tree
  *   A data structure representing the tree as returned from menu_tree_data.
+ *
  * @return
  *   The rendered HTML of that data structure.
  */
@@ -738,6 +744,7 @@ function menu_tree_output($tree) {
  *   A fully loaded menu link, or NULL.  If a link is supplied, only the
  *   path to root will be included in the returned tree- as if this link
  *   represented the current page in a visible menu.
+ *
  * @return
  *   An tree of menu links in an array, in the order they should be rendered.
  */
@@ -764,16 +771,16 @@ function menu_tree_all_data($menu_name =
         for ($i = 1; $i < MENU_MAX_DEPTH; $i++) {
           $args[] = $item["p$i"];
         }
-        $args = array_unique($args);
+        $args         = array_unique($args);
         $placeholders = implode(', ', array_fill(0, count($args), '%d'));
-        $where = ' AND ml.plid IN ('. $placeholders .')';
-        $parents = $args;
-        $parents[] = $item['mlid'];
+        $where        = ' AND ml.plid IN ('. $placeholders .')';
+        $parents      = $args;
+        $parents[]    = $item['mlid'];
       }
       else {
         // Get all links in this menu.
-        $where = '';
-        $args = array();
+        $where   = '';
+        $args    = array();
         $parents = array();
       }
       array_unshift($args, $menu_name);
@@ -806,6 +813,7 @@ function menu_tree_all_data($menu_name =
  *
  * @param $menu_name
  *   The named menu links to return
+ *
  * @return
  *   An array of menu links, in the order they should be rendered. The array
  *   is a list of associative arrays -- these have two keys, link and below.
@@ -842,9 +850,9 @@ function menu_tree_page_data($menu_name 
           $parents[] = '0';
 
           // Use array_values() so that the indices are numeric for array_merge().
-          $args = $parents = array_unique(array_values($parents));
+          $args         = $parents = array_unique(array_values($parents));
           $placeholders = implode(', ', array_fill(0, count($args), '%d'));
-          $expanded = variable_get('menu_expanded', array());
+          $expanded     = variable_get('menu_expanded', array());
           // Check whether the current menu has any links set to be expanded.
           if (in_array($menu_name, $expanded)) {
             // Collect all the links set to be expanded, and then add all of
@@ -863,9 +871,9 @@ function menu_tree_page_data($menu_name 
         }
         else {
           // Show only the top-level menu items when access is denied.
-          $args = array($menu_name, '0');
+          $args         = array($menu_name, '0');
           $placeholders = '%d';
-          $parents = array();
+          $parents      = array();
         }
         // Select the links from the table, and recursively build the tree. We
         // LEFT JOIN since there is no match in {menu_router} for an external
@@ -915,9 +923,9 @@ function menu_tree_check_access(&$tree, 
 
   if ($node_links) {
     // Use db_rewrite_sql to evaluate view access without loading each full node.
-    $nids = array_keys($node_links);
+    $nids         = array_keys($node_links);
     $placeholders = '%d'. str_repeat(', %d', count($nids) - 1);
-    $result = db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE n.nid IN (". $placeholders .")"), $nids);
+    $result       = db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE n.nid IN (". $placeholders .")"), $nids);
     while ($node = db_fetch_array($result)) {
       $nid = $node['nid'];
       foreach ($node_links[$nid] as $mlid => $link) {
@@ -962,6 +970,7 @@ function _menu_tree_check_access(&$tree)
  *   to the root of the menu tree.
  * @param $depth
  *   The depth of the current menu tree.
+ *
  * @return
  *   See menu_tree_page_data for a description of the data structure.
  */
@@ -1165,6 +1174,7 @@ function menu_secondary_links() {
  *   The name of the menu.
  * @param $level
  *   Optional, the depth of the menu to be returned.
+ *
  * @return
  *   An array of links of the specified menu and level.
  */
@@ -1193,8 +1203,8 @@ function menu_navigation_links($menu_nam
   $links = array();
   foreach ($tree as $item) {
     if (!$item['link']['hidden']) {
-      $l = $item['link']['options'];
-      $l['href'] = $item['link']['href'];
+      $l          = $item['link']['options'];
+      $l['href']  = $item['link']['href'];
       $l['title'] = $item['link']['title'];
       // Keyed with unique menu id to generate classes from theme_links().
       $links['menu-'. $item['link']['mlid']] = $l;
@@ -1210,6 +1220,7 @@ function menu_navigation_links($menu_nam
  *   The level of tasks you ask for. Primary tasks are 0, secondary are 1.
  * @param $return_root
  *   Whether to return the root path for the current page.
+ *
  * @return
  *   Themed output corresponding to the tabs of the requested level, or
  *   router path if $return_root == TRUE. This router path corresponds to
@@ -1227,10 +1238,10 @@ function menu_local_tasks($level = 0, $r
       return '';
     }
     // Get all tabs and the root page.
-    $result = db_query("SELECT * FROM {menu_router} WHERE tab_root = '%s' ORDER BY weight, title", $router_item['tab_root']);
-    $map = arg();
-    $children = array();
-    $tasks = array();
+    $result    = db_query("SELECT * FROM {menu_router} WHERE tab_root = '%s' ORDER BY weight, title", $router_item['tab_root']);
+    $map       = arg();
+    $children  = array();
+    $tasks     = array();
     $root_path = $router_item['path'];
 
     while ($item = db_fetch_array($result)) {
@@ -1250,8 +1261,8 @@ function menu_local_tasks($level = 0, $r
     $depth = 1001;
     while (isset($children[$path])) {
       $tabs_current = '';
-      $next_path = '';
-      $count = 0;
+      $next_path    = '';
+      $count        = 0;
       foreach ($children[$path] as $item) {
         if ($item['access']) {
           $count++;
@@ -1276,15 +1287,15 @@ function menu_local_tasks($level = 0, $r
     }
 
     // Find all tabs at the same level or above the current one.
-    $parent = $router_item['tab_parent'];
-    $path = $router_item['path'];
+    $parent  = $router_item['tab_parent'];
+    $path    = $router_item['path'];
     $current = $router_item;
-    $depth = 1000;
+    $depth   = 1000;
     while (isset($children[$parent])) {
       $tabs_current = '';
-      $next_path = '';
-      $next_parent = '';
-      $count = 0;
+      $next_path    = '';
+      $next_parent  = '';
+      $count        = 0;
       foreach ($children[$parent] as $item) {
         if ($item['access']) {
           $count++;
@@ -1418,9 +1429,9 @@ function menu_set_active_trail($new_trai
     $trail = $new_trail;
   }
   elseif (!isset($trail)) {
-    $trail = array();
+    $trail   = array();
     $trail[] = array('title' => t('Home'), 'href' => '<front>', 'options' => array(), 'type' => 0);
-    $item = menu_get_item();
+    $item    = menu_get_item();
 
     // Check whether the current item is a local task (displayed as a tab).
     if ($item['tab_parent']) {
@@ -1522,6 +1533,7 @@ function menu_get_active_title() {
  *
  * @param $mlid
  *   The mlid of the menu item.
+ *
  * @return
  *   A menu link, with $item['access'] filled and link translated for
  *   rendering.
@@ -1644,9 +1656,9 @@ function _menu_navigation_links_rebuild(
   $menu_links = array();
   foreach ($menu as $path => $item) {
     if ($item['_visible']) {
-      $item = _menu_link_build($item);
+      $item              = _menu_link_build($item);
       $menu_links[$path] = $item;
-      $sort[$path] = $item['_number_parts'];
+      $sort[$path]       = $item['_number_parts'];
     }
   }
   if ($menu_links) {
@@ -1656,9 +1668,9 @@ function _menu_navigation_links_rebuild(
     foreach ($menu_links as $item) {
       $existing_item = db_fetch_array(db_query("SELECT mlid, menu_name, plid, customized FROM {menu_links} WHERE link_path = '%s' AND module = '%s'", $item['link_path'], 'system'));
       if ($existing_item) {
-        $item['mlid'] = $existing_item['mlid'];
+        $item['mlid']      = $existing_item['mlid'];
         $item['menu_name'] = $existing_item['menu_name'];
-        $item['plid'] = $existing_item['plid'];
+        $item['plid']      = $existing_item['plid'];
       }
       if (!$existing_item || !$existing_item['customized']) {
         menu_link_save($item);
@@ -1742,7 +1754,7 @@ function menu_link_save(&$item) {
 
   // This is the easiest way to handle the unique internal path '<front>',
   // since a path marked as external does not need to match a router path.
-  $item['_external'] = menu_path_is_external($item['link_path'])  || $item['link_path'] == '<front>';
+  $item['_external'] = menu_path_is_external($item['link_path']) || $item['link_path'] == '<front>';
   // Load defaults.
   $item += array(
     'menu_name' => 'navigation',
@@ -1776,7 +1788,7 @@ function menu_link_save(&$item) {
   // Menu callbacks need to be in the links table for breadcrumbs, but can't
   // be parents if they are generated directly from a router item.
   if (empty($parent['mlid']) || $parent['hidden'] < 0) {
-    $item['plid'] =  0;
+    $item['plid'] = 0;
   }
   else {
     $item['plid'] = $parent['mlid'];
@@ -1796,8 +1808,9 @@ function menu_link_save(&$item) {
       $item['menu_name'], $item['plid'], $item['link_path'],
       $item['hidden'], $item['_external'], $item['has_children'],
       $item['expanded'], $item['weight'],
-      $item['module'],  $item['link_title'], serialize($item['options']),
-      $item['customized'], $item['updated']);
+      $item['module'], $item['link_title'], serialize($item['options']),
+      $item['customized'], $item['updated']
+    );
     $item['mlid'] = db_last_insert_id('menu_links', 'mlid');
   }
 
@@ -1828,7 +1841,7 @@ function menu_link_save(&$item) {
   }
   // Find the callback. During the menu update we store empty paths to be
   // fixed later, so we skip this.
-  if (!isset($_SESSION['system_update_6021']) && (empty($item['router_path'])  || !$existing_item || ($existing_item['link_path'] != $item['link_path']))) {
+  if (!isset($_SESSION['system_update_6021']) && (empty($item['router_path']) || !$existing_item || ($existing_item['link_path'] != $item['link_path']))) {
     if ($item['_external']) {
       $item['router_path'] = '';
     }
@@ -1845,9 +1858,10 @@ function menu_link_save(&$item) {
     module = '%s', link_title = '%s', options = '%s', customized = %d WHERE mlid = %d",
     $item['menu_name'], $item['plid'], $item['link_path'],
     $item['router_path'], $item['hidden'], $item['_external'], $item['has_children'],
-    $item['expanded'], $item['weight'],  $item['depth'],
+    $item['expanded'], $item['weight'], $item['depth'],
     $item['p1'], $item['p2'], $item['p3'], $item['p4'], $item['p5'], $item['p6'], $item['p7'], $item['p8'], $item['p9'],
-    $item['module'],  $item['link_title'], serialize($item['options']), $item['customized'], $item['mlid']);
+    $item['module'], $item['link_title'], serialize($item['options']), $item['customized'], $item['mlid']
+  );
   // Check the has_children status of the parent.
   _menu_update_parental_status($item);
   menu_cache_clear($menu_name);
@@ -1900,6 +1914,7 @@ function _menu_set_expanded_menus() {
  *  The full built menu.
  * @param $link_path
  *  The path for we are looking up its router path.
+ *
  * @return
  *  A path from $menu keys or empty if $link_path points to a nonexisting
  *  place.
@@ -1931,6 +1946,7 @@ function _menu_find_router_path($menu, $
  * @param $link_title
  *   Title of the link to insert or new title to update the link to.
  *   Unused for delete.
+ *
  * @return
  *   The insert op returns the mlid of the new item. Others op return NULL.
  */
@@ -1943,11 +1959,13 @@ function menu_link_maintain($module, $op
         'module' => $module,
       );
       return menu_link_save($menu_link);
-      break;
+    break;
+
     case 'update':
       db_query("UPDATE {menu_links} SET link_title = '%s' WHERE link_path = '%s' AND customized = 0 AND module = '%s'", $link_title, $link_path, $module);
       menu_cache_clear();
       break;
+
     case 'delete':
       menu_link_delete(NULL, $link_path);
       break;
@@ -1962,19 +1980,20 @@ function menu_link_maintain($module, $op
  *
  * @param $item
  *   An array representing a menu link item.
+ *
  * @return
  *   The relative depth, or zero.
  *
  */
 function menu_link_children_relative_depth($item) {
-  $i = 1;
-  $match = '';
+  $i      = 1;
+  $match  = '';
   $args[] = $item['menu_name'];
-  $p = 'p1';
+  $p      = 'p1';
   while ($i <= MENU_MAX_DEPTH && $item[$p]) {
     $match .= " AND $p = %d";
     $args[] = $item[$p];
-    $p = 'p'. ++$i;
+    $p      = 'p'. ++$i;
   }
 
   $max_depth = db_result(db_query_range("SELECT depth FROM {menu_links} WHERE menu_name = '%s'". $match ." ORDER BY depth DESC", $args, 0, 1));
@@ -1995,8 +2014,8 @@ function _menu_link_move_children($item,
 
   $i = 1;
   while ($i <= $item['depth']) {
-    $p = 'p'. $i++;
-    $set[] = "$p = %d";
+    $p      = 'p'. $i++;
+    $set[]  = "$p = %d";
     $args[] = $item[$p];
   }
   $j = $existing_item['depth'] + 1;
@@ -2024,8 +2043,8 @@ function _menu_link_move_children($item,
     $set[] = 'depth = depth + %d';
   }
   $where[] = "menu_name = '%s'";
-  $args[] = $existing_item['menu_name'];
-  $p = 'p1';
+  $args[]  = $existing_item['menu_name'];
+  $p       = 'p1';
   for ($i = 1; $i <= MENU_MAX_DEPTH && $existing_item[$p]; $p = 'p'. ++$i) {
     $where[] = "$p = %d";
     $args[] = $existing_item[$p];
@@ -2076,10 +2095,10 @@ function _menu_router_build($callbacks) 
   // matching. Calculate fitness, and fill some default values.
   $menu = array();
   foreach ($callbacks as $path => $item) {
-    $load_functions = array();
+    $load_functions   = array();
     $to_arg_functions = array();
-    $fit = 0;
-    $move = FALSE;
+    $fit              = 0;
+    $move             = FALSE;
 
     $parts = explode('/', $path, MENU_MAX_PARTS);
     $number_parts = count($parts);
@@ -2114,7 +2133,7 @@ function _menu_router_build($callbacks) 
         $parts[$k] = '%';
       }
       else {
-        $fit |=  1 << ($slashes - $k);
+        $fit |= 1 << ($slashes - $k);
       }
     }
     if ($fit) {
@@ -2140,7 +2159,7 @@ function _menu_router_build($callbacks) 
       '_tab' => (bool)($item['type'] & MENU_IS_LOCAL_TASK),
     );
     if ($move) {
-      $new_path = implode('/', $item['_parts']);
+      $new_path        = implode('/', $item['_parts']);
       $menu[$new_path] = $item;
       $sort[$new_path] = $number_parts;
     }
@@ -2246,7 +2265,8 @@ function _menu_router_build($callbacks) 
       serialize($item['access arguments']), $item['page callback'], serialize($item['page arguments']), $item['_fit'],
       $item['_number_parts'], $item['tab_parent'], $item['tab_root'],
       $item['title'], $item['title callback'], $title_arguments,
-      $item['type'], $item['block callback'], $item['description'], $item['position'], $item['weight'], $item['include file']);
+      $item['type'], $item['block callback'], $item['description'], $item['position'], $item['weight'], $item['include file']
+    );
   }
   // Sort the masks so they are in order of descending fit, and store them.
   $masks = array_keys($masks);
@@ -2318,7 +2338,7 @@ function menu_valid_path($form_item) {
       $item['link_path']  = $form_item['link_path'];
       $item['link_title'] = $form_item['link_title'];
       $item['external']   = FALSE;
-      $item['options'] = '';
+      $item['options']    = '';
       _menu_link_translate($item);
     }
   }
@@ -2328,3 +2348,4 @@ function menu_valid_path($form_item) {
   $menu_admin = FALSE;
   return $item && $item['access'];
 }
+
Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.115
diff -u -p -r1.115 module.inc
--- includes/module.inc	27 Dec 2007 12:31:05 -0000	1.115
+++ includes/module.inc	21 Jan 2008 21:58:48 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: module.inc,v 1.115 2007/12/27 12:31:05 goba Exp $
 
+
 /**
  * @file
  * API for loading and interacting with Drupal modules.
@@ -40,6 +41,7 @@ function module_iterate($function, $argu
  * @param $fixed_list
  *   (Optional) Override the module list with the given modules. Stays until the
  *   next call with $refresh = TRUE.
+ *
  * @return
  *   An associative array whose keys and values are the names of all loaded
  *   modules.
@@ -166,6 +168,7 @@ function module_rebuild_cache() {
  *
  * @param $files
  *   The array of filesystem objects used to rebuild the cache.
+ *
  * @return
  *   The same array with dependencies and dependents added where applicable.
  */
@@ -223,6 +226,7 @@ function _module_build_dependencies($fil
  *
  * @param $module
  *   The name of the module (without the .module extension).
+ *
  * @return
  *   TRUE if the module is both installed and enabled.
  */
@@ -378,6 +382,7 @@ function module_disable($module_list) {
  *   The name of the module (without the .module extension).
  * @param $hook
  *   The name of the hook (e.g. "help" or "menu").
+ *
  * @return
  *   TRUE if the module is both installed and enabled, and the hook is
  *   implemented in that module.
@@ -398,6 +403,7 @@ function module_hook($module, $hook) {
  *   For internal use only: Whether to force the stored list of hook
  *   implementations to be regenerated (such as after enabling a new module,
  *   before processing hook_enable).
+ *
  * @return
  *   An array with the names of the modules which are implementing this hook.
  */
@@ -437,19 +443,21 @@ function module_implements($hook, $sort 
  *   The name of the hook to invoke.
  * @param ...
  *   Arguments to pass to the hook implementation.
+ *
  * @return
  *   The return value of the hook implementation.
  */
 function module_invoke() {
-  $args = func_get_args();
+  $args   = func_get_args();
   $module = $args[0];
-  $hook = $args[1];
+  $hook   = $args[1];
   unset($args[0], $args[1]);
   $function = $module .'_'. $hook;
   if (module_hook($module, $hook)) {
     return call_user_func_array($function, $args);
   }
 }
+
 /**
  * Invoke a hook in all enabled modules that implement it.
  *
@@ -457,6 +465,7 @@ function module_invoke() {
  *   The name of the hook to invoke.
  * @param ...
  *   Arguments to pass to the hook.
+ *
  * @return
  *   An array of return values of the hook implementations. If modules return
  *   arrays from their implementations, those are merged into one array.
@@ -490,3 +499,4 @@ function module_invoke_all() {
 function drupal_required_modules() {
   return array('block', 'filter', 'node', 'system', 'user');
 }
+
Index: includes/pager.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/pager.inc,v
retrieving revision 1.63
diff -u -p -r1.63 pager.inc
--- includes/pager.inc	6 Dec 2007 09:58:30 -0000	1.63
+++ includes/pager.inc	21 Jan 2008 21:58:48 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: pager.inc,v 1.63 2007/12/06 09:58:30 goba Exp $
 
+
 /**
  * @file
  * Functions to aid in presenting database results as a set of pages.
@@ -42,6 +43,7 @@
  *   the count query) using printf() syntax. Instead of a variable number of
  *   query arguments, you may also pass a single array containing the query
  *   arguments.
+ *
  * @return
  *   A database query result resource, or FALSE if the query was not executed
  *   correctly.
@@ -107,6 +109,7 @@ function pager_get_querystring() {
  *   An associative array of query string parameters to append to the pager links.
  * @param $quantity
  *   The number of pages in the list.
+ *
  * @return
  *   An HTML string that generates the query pager.
  *
@@ -142,10 +145,10 @@ function theme_pager($tags = array(), $l
   }
   // End of generation loop preparation.
 
-  $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $limit, $element, $parameters);
+  $li_first    = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $limit, $element, $parameters);
   $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('‹ previous')), $limit, $element, 1, $parameters);
-  $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('next ›')), $limit, $element, 1, $parameters);
-  $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $limit, $element, $parameters);
+  $li_next     = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('next ›')), $limit, $element, 1, $parameters);
+  $li_last     = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $limit, $element, $parameters);
 
   if ($pager_total[$element] > 1) {
     if ($li_first) {
@@ -214,7 +217,6 @@ function theme_pager($tags = array(), $l
   }
 }
 
-
 /**
  * @name Pager pieces
  * @{
@@ -233,6 +235,7 @@ function theme_pager($tags = array(), $l
  *   An optional integer to distinguish between multiple pagers on one page.
  * @param $parameters
  *   An associative array of query string parameters to append to the pager links.
+ *
  * @return
  *   An HTML string that generates this piece of the query pager.
  *
@@ -263,6 +266,7 @@ function theme_pager_first($text, $limit
  *   The number of pages to move backward when the link is clicked.
  * @param $parameters
  *   An associative array of query string parameters to append to the pager links.
+ *
  * @return
  *   An HTML string that generates this piece of the query pager.
  *
@@ -302,6 +306,7 @@ function theme_pager_previous($text, $li
  *   The number of pages to move forward when the link is clicked.
  * @param $parameters
  *   An associative array of query string parameters to append to the pager links.
+ *
  * @return
  *   An HTML string that generates this piece of the query pager.
  *
@@ -338,6 +343,7 @@ function theme_pager_next($text, $limit,
  *   An optional integer to distinguish between multiple pagers on one page.
  * @param $parameters
  *   An associative array of query string parameters to append to the pager links.
+ *
  * @return
  *   An HTML string that generates this piece of the query pager.
  *
@@ -355,7 +361,6 @@ function theme_pager_last($text, $limit,
   return $output;
 }
 
-
 /**
  * Format a link to a specific query result page.
  *
@@ -367,6 +372,7 @@ function theme_pager_last($text, $limit,
  *   An associative array of query string parameters to append to the pager link.
  * @param $attributes
  *   An associative array of HTML attributes to apply to a pager anchor tag.
+ *
  * @return
  *   An HTML string that generates the link.
  *
@@ -432,3 +438,4 @@ function pager_load_array($value, $eleme
   $new_array[$element] = (int)$value;
   return $new_array;
 }
+
Index: includes/path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.19
diff -u -p -r1.19 path.inc
--- includes/path.inc	4 Nov 2007 16:42:45 -0000	1.19
+++ includes/path.inc	21 Jan 2008 21:58:48 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: path.inc,v 1.19 2007/11/04 16:42:45 goba Exp $
 
+
 /**
  * @file
  * Functions to handle paths in Drupal, including path aliasing.
@@ -240,3 +241,4 @@ function drupal_match_path($path, $patte
   }
   return preg_match($regexps[$patterns], $path);
 }
+
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.44
diff -u -p -r1.44 session.inc
--- includes/session.inc	22 Dec 2007 23:24:24 -0000	1.44
+++ includes/session.inc	21 Jan 2008 21:58:48 -0000
@@ -1,11 +1,11 @@
 <?php
 // $Id: session.inc,v 1.44 2007/12/22 23:24:24 goba Exp $
 
+
 /**
  * @file
  * User session handling functions.
  */
-
 function sess_open($save_path, $session_name) {
   return TRUE;
 }
@@ -116,6 +116,7 @@ function sess_regenerate() {
  *   TRUE counts only anonymous users.
  *   FALSE counts only authenticated users.
  *   Any other value will return the count of both authenticated and anonymous users.
+ *
  * @return  int
  *   The number of users with sessions.
  */
@@ -164,6 +165,7 @@ function sess_gc($lifetime) {
  *
  * @param $status
  *   Disables writing of session data when FALSE, (re-)enables writing when TRUE.
+ *
  * @return
  *   FALSE if writing session data has been disabled. Otherwise, TRUE.
  */
@@ -174,3 +176,4 @@ function session_save_session($status = 
   }
   return ($save_session);
 }
+
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.47
diff -u -p -r1.47 tablesort.inc
--- includes/tablesort.inc	4 Jan 2008 09:31:48 -0000	1.47
+++ includes/tablesort.inc	21 Jan 2008 21:58:48 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: tablesort.inc,v 1.47 2008/01/04 09:31:48 goba Exp $
 
+
 /**
  * @file
  * Functions to aid in the creation of sortable tables.
@@ -13,8 +14,8 @@
  * Initialize the table sort context.
  */
 function tablesort_init($header) {
-  $ts = tablesort_get_order($header);
-  $ts['sort'] = tablesort_get_sort($header);
+  $ts                 = tablesort_get_order($header);
+  $ts['sort']         = tablesort_get_sort($header);
   $ts['query_string'] = tablesort_get_querystring();
   return $ts;
 }
@@ -31,6 +32,7 @@ function tablesort_init($header) {
  * @param $before
  *   An SQL string to insert after ORDER BY and before the table sorting code.
  *   Useful for sorting by important attributes like "sticky" first.
+ *
  * @return
  *   An SQL string to append to the end of a query.
  *
@@ -62,6 +64,7 @@ function tablesort_sql($header, $before 
  *   An array of column headers in the format described in theme_table().
  * @param $ts
  *   The current table sort context as returned from tablesort_init().
+ *
  * @return
  *   A properly formatted cell, ready for _theme_table_cell().
  */
@@ -108,6 +111,7 @@ function tablesort_header($cell, $header
  *   The current table sort context as returned from tablesort_init().
  * @param $i
  *   The index of the cell's table column.
+ *
  * @return
  *   A properly formatted cell, ready for _theme_table_cell().
  */
@@ -144,6 +148,7 @@ function tablesort_get_querystring() {
  *
  * @param $headers
  *   An array of column headers in the format described in theme_table().
+ *
  * @return
  *   An associative array describing the criterion, containing the keys:
  *   - "name": The localized title of the table column.
@@ -181,6 +186,7 @@ function tablesort_get_order($headers) {
  *
  * @param $headers
  *   An array of column headers in the format described in theme_table().
+ *
  * @return
  *   The current sort direction ("asc" or "desc").
  */
@@ -198,3 +204,4 @@ function tablesort_get_sort($headers) {
   }
   return 'asc';
 }
+
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.412
diff -u -p -r1.412 theme.inc
--- includes/theme.inc	21 Jan 2008 21:47:08 -0000	1.412
+++ includes/theme.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: theme.inc,v 1.412 2008/01/21 21:47:08 goba Exp $
 
+
 /**
  * @file
  * The theme system, which controls the output of Drupal.
@@ -18,9 +19,10 @@
  * Markers used by theme_mark() and node_mark() to designate content.
  * @see theme_mark(), node_mark()
  */
-define('MARK_READ',    0);
-define('MARK_NEW',     1);
+define('MARK_READ', 0);
+define('MARK_NEW', 1);
 define('MARK_UPDATED', 2);
+
 /**
  * @} End of "Content markers".
  */
@@ -280,10 +282,10 @@ function _theme_process_registry(&$cache
       // files can prevent them from getting registered.
       if (isset($info['file']) && !isset($info['path'])) {
         $result[$hook]['file'] = $path .'/'. $info['file'];
-        include_once($result[$hook]['file']);
+        include_once ($result[$hook]['file']);
       }
       elseif (isset($info['file']) && isset($info['path'])) {
-        include_once($info['path'] .'/'. $info['file']);
+        include_once ($info['path'] .'/'. $info['file']);
       }
 
       if (isset($info['template']) && !isset($info['path'])) {
@@ -402,6 +404,7 @@ function _theme_build_registry($theme, $
  *
  * @param $refresh
  *   Whether to reload the list of themes from the database.
+ *
  * @return
  *   An array of the currently available themes.
  */
@@ -537,6 +540,7 @@ function list_themes($refresh = FALSE) {
  *   priority than items in template_files. theme() will then look for these
  *   files, one at a time, and use the first one
  *   that exists.
+ *
  * @param $hook
  *   The name of the theme function to call. May be an array, in which
  *   case the first hook that actually has an implementation registered
@@ -546,6 +550,7 @@ function list_themes($refresh = FALSE) {
  *   implementations for named objects.
  * @param ...
  *   Additional arguments to pass along to the theme function.
+ *
  * @return
  *   An HTML string that generates the themed output.
  */
@@ -584,7 +589,7 @@ function theme() {
     if (isset($info['path'])) {
       $include_file = $info['path'] .'/'. $include_file;
     }
-    include_once($include_file);
+    include_once ($include_file);
   }
   if (isset($info['function'])) {
     // The theme call is a function.
@@ -593,7 +598,7 @@ function theme() {
   else {
     // The theme call is a template.
     $variables = array(
-      'template_files' => array()
+      'template_files' => array(),
     );
     if (!empty($info['arguments'])) {
       $count = 0;
@@ -844,23 +849,23 @@ function drupal_find_theme_templates($ca
  */
 function theme_get_settings($key = NULL) {
   $defaults = array(
-    'mission'                       =>  '',
-    'default_logo'                  =>  1,
-    'logo_path'                     =>  '',
-    'default_favicon'               =>  1,
-    'favicon_path'                  =>  '',
-    'primary_links'                 =>  1,
-    'secondary_links'               =>  1,
-    'toggle_logo'                   =>  1,
-    'toggle_favicon'                =>  1,
-    'toggle_name'                   =>  1,
-    'toggle_search'                 =>  1,
-    'toggle_slogan'                 =>  0,
-    'toggle_mission'                =>  1,
-    'toggle_node_user_picture'      =>  0,
-    'toggle_comment_user_picture'   =>  0,
-    'toggle_primary_links'          =>  1,
-    'toggle_secondary_links'        =>  1,
+    'mission' => '',
+    'default_logo' => 1,
+    'logo_path' => '',
+    'default_favicon' => 1,
+    'favicon_path' => '',
+    'primary_links' => 1,
+    'secondary_links' => 1,
+    'toggle_logo' => 1,
+    'toggle_favicon' => 1,
+    'toggle_name' => 1,
+    'toggle_search' => 1,
+    'toggle_slogan' => 0,
+    'toggle_mission' => 1,
+    'toggle_node_user_picture' => 0,
+    'toggle_comment_user_picture' => 0,
+    'toggle_primary_links' => 1,
+    'toggle_secondary_links' => 1,
   );
 
   if (module_exists('node')) {
@@ -958,12 +963,18 @@ function theme_get_setting($setting_name
  *   The output generated by the template.
  */
 function theme_render_template($file, $variables) {
-  extract($variables, EXTR_SKIP);  // Extract the variables to a local namespace
-  ob_start();                      // Start output buffering
-  include "./$file";               // Include the file
-  $contents = ob_get_contents();   // Get the contents of the buffer
-  ob_end_clean();                  // End buffering and discard
-  return $contents;                // Return the contents
+  // Extract the variables to a local namespace
+  extract($variables, EXTR_SKIP);
+  // Start output buffering
+  ob_start();
+  // Include the file
+  include "./$file";
+  // Get the contents of the buffer
+  $contents = ob_get_contents();
+  // End buffering and discard
+  ob_end_clean();
+  // Return the contents
+  return $contents;
 }
 
 /**
@@ -1038,6 +1049,7 @@ function theme_render_template($file, $v
  *
  * @param $text
  *   The text to format (plain-text).
+ *
  * @return
  *   The formatted text (html).
  */
@@ -1081,6 +1093,7 @@ function theme_status_messages($display 
  *   A keyed array of links to be themed.
  * @param $attributes
  *   A keyed array of attributes
+ *
  * @return
  *   A string containing an unordered list of links.
  */
@@ -1147,6 +1160,7 @@ function theme_links($links, $attributes
  *   Associative array of attributes to be placed in the img tag.
  * @param $getsize
  *   If set to TRUE, the image's dimension are fetched and added as width/height attributes.
+ *
  * @return
  *   A string containing the image tag.
  */
@@ -1163,6 +1177,7 @@ function theme_image($path, $alt = '', $
  *
  * @param $breadcrumb
  *   An array containing the breadcrumb links.
+ *
  * @return a string containing the breadcrumb output.
  */
 function theme_breadcrumb($breadcrumb) {
@@ -1232,6 +1247,7 @@ function theme_submenu($links) {
  *   An array of HTML attributes to apply to the table tag.
  * @param $caption
  *   A localized string to use for the <caption> tag.
+ *
  * @return
  *   An HTML string representing the table.
  */
@@ -1331,6 +1347,7 @@ function theme_table_select_header_cell(
  *
  * @param $style
  *   Set to either asc or desc. This sets which icon to show.
+ *
  * @return
  *   A themed sort icon.
  */
@@ -1352,6 +1369,7 @@ function theme_tablesort_indicator($styl
  *   The content of the box.
  * @param $region
  *   The region in which the box is displayed.
+ *
  * @return
  *   A string containing the box output.
  */
@@ -1367,6 +1385,7 @@ function theme_box($title, $content, $re
  * @param $type
  *   Number representing the marker type to display
  * @see MARK_NEW, MARK_UPDATED, MARK_READ
+ *
  * @return
  *   A string containing the marker.
  */
@@ -1397,6 +1416,7 @@ function theme_mark($type = MARK_NEW) {
  *   The attributes applied to the list element.
  * @param $type
  *   The type of list to return (e.g. "ul", "ol")
+ *
  * @return
  *   A string containing the list output.
  */
@@ -1429,7 +1449,8 @@ function theme_item_list($items = array(
         $data = $item;
       }
       if (count($children) > 0) {
-        $data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list
+        // Render nested list
+        $data .= theme_item_list($children, NULL, $type, $attributes);
       }
       if ($i == 0) {
         $attributes['class'] = empty($attributes['class']) ? 'first' : ($attributes['class'] .' first');
@@ -1468,7 +1489,7 @@ function theme_xml_icon($url) {
  *   The url of the feed.
  * @param $title
  *   A descriptive title of the feed.
-  */
+ */
 function theme_feed_icon($url, $title) {
   if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), $title)) {
     return '<a href="'. check_url($url) .'" class="feed-icon">'. $image .'</a>';
@@ -1493,6 +1514,7 @@ function theme_more_link($url, $title) {
  *
  * @param $main (optional)
  *   Whether the current page is the front page of the site.
+ *
  * @return
  *   A string containing the results of the hook_footer() calls.
  */
@@ -1506,6 +1528,7 @@ function theme_closure($main = 0) {
  *
  * @param $region
  *   Which set of blocks to retrieve.
+ *
  * @return
  *   A string containing the themed blocks for this region.
  */
@@ -1530,6 +1553,7 @@ function theme_blocks($region) {
  *
  * @param $object
  *   The user object to format, usually returned from user_load().
+ *
  * @return
  *   A string containing an HTML link to the user's page if the passed object
  *   suggests that this is a site user. Otherwise, only the username is returned.
@@ -1580,6 +1604,7 @@ function theme_username($object) {
  *   The percentage of the progress.
  * @param $message
  *   A string containing information to be displayed.
+ *
  * @return
  *   A themed HTML string representing the progress bar.
  */
@@ -1598,6 +1623,7 @@ function theme_progress_bar($percent, $m
  *
  * @param $size
  *   Optional. The number of indentations to create.
+ *
  * @return
  *   A string containing indentations.
  */
@@ -1612,7 +1638,6 @@ function theme_indentation($size = 1) {
 /**
  * @} End of "defgroup themeable".
  */
-
 function _theme_table_cell($cell, $header = FALSE) {
   $attributes = '';
 
@@ -1649,18 +1674,18 @@ function template_preprocess(&$variables
 
   // Track run count for each hook to provide zebra striping.
   // See "template_preprocess_block()" which provides the same feature specific to blocks.
-  $count[$hook] = isset($count[$hook]) && is_int($count[$hook]) ? $count[$hook] : 1;
+  $count[$hook]       = isset($count[$hook]) && is_int($count[$hook]) ? $count[$hook] : 1;
   $variables['zebra'] = ($count[$hook] % 2) ? 'odd' : 'even';
-  $variables['id'] = $count[$hook]++;
+  $variables['id']    = $count[$hook]++;
 
   // Tell all templates where they are located.
   $variables['directory'] = path_to_theme();
 
   // Set default variables that depend on the database.
-  $variables['is_admin']            = FALSE;
-  $variables['is_front']            = FALSE;
-  $variables['logged_in']           = FALSE;
-  if ($variables['db_is_active'] = db_is_active()  && !defined('MAINTENANCE_MODE')) {
+  $variables['is_admin'] = FALSE;
+  $variables['is_front'] = FALSE;
+  $variables['logged_in'] = FALSE;
+  if ($variables['db_is_active'] = db_is_active() && !defined('MAINTENANCE_MODE')) {
     // Check for administrators.
     if (user_access('access administration pages')) {
       $variables['is_admin'] = TRUE;
@@ -1739,30 +1764,30 @@ function template_preprocess_page(&$vari
       $head_title[] = variable_get('site_slogan', '');
     }
   }
-  $variables['head_title']        = implode(' | ', $head_title);
-  $variables['base_path']         = base_path();
-  $variables['front_page']        = url();
-  $variables['breadcrumb']        = theme('breadcrumb', drupal_get_breadcrumb());
-  $variables['feed_icons']        = drupal_get_feeds();
-  $variables['footer_message']    = filter_xss_admin(variable_get('site_footer', FALSE));
-  $variables['head']              = drupal_get_html_head();
-  $variables['help']              = theme('help');
-  $variables['language']          = $GLOBALS['language'];
-  $variables['logo']              = theme_get_setting('logo');
-  $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
-  $variables['mission']           = isset($mission) ? $mission : '';
-  $variables['primary_links']     = theme_get_setting('toggle_primary_links') ? menu_primary_links() : array();
-  $variables['secondary_links']   = theme_get_setting('toggle_secondary_links') ? menu_secondary_links() : array();
-  $variables['search_box']        = (theme_get_setting('toggle_search') ? drupal_get_form('search_theme_form') : '');
-  $variables['site_name']         = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
-  $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
-  $variables['css']               = drupal_add_css();
-  $variables['styles']            = drupal_get_css();
-  $variables['scripts']           = drupal_get_js();
-  $variables['tabs']              = theme('menu_local_tasks');
-  $variables['title']             = drupal_get_title();
+  $variables['head_title'] = implode(' | ', $head_title);
+  $variables['base_path'] = base_path();
+  $variables['front_page'] = url();
+  $variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb());
+  $variables['feed_icons'] = drupal_get_feeds();
+  $variables['footer_message'] = filter_xss_admin(variable_get('site_footer', FALSE));
+  $variables['head'] = drupal_get_html_head();
+  $variables['help'] = theme('help');
+  $variables['language'] = $GLOBALS['language'];
+  $variables['logo'] = theme_get_setting('logo');
+  $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
+  $variables['mission'] = isset($mission) ? $mission : '';
+  $variables['primary_links'] = theme_get_setting('toggle_primary_links') ? menu_primary_links() : array();
+  $variables['secondary_links'] = theme_get_setting('toggle_secondary_links') ? menu_secondary_links() : array();
+  $variables['search_box'] = (theme_get_setting('toggle_search') ? drupal_get_form('search_theme_form') : '');
+  $variables['site_name'] = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
+  $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
+  $variables['css'] = drupal_add_css();
+  $variables['styles'] = drupal_get_css();
+  $variables['scripts'] = drupal_get_js();
+  $variables['tabs'] = theme('menu_local_tasks');
+  $variables['title'] = drupal_get_title();
   // Closure should be filled last.
-  $variables['closure']           = theme('closure');
+  $variables['closure'] = theme('closure');
 
   if ($node = menu_get_object()) {
     $variables['node'] = $node;
@@ -1807,8 +1832,8 @@ function template_preprocess_page(&$vari
   // page-node-1.tpl.php
   // page-node.tpl.php
   // page.tpl.php
-  $i = 0;
-  $suggestion = 'page';
+  $i           = 0;
+  $suggestion  = 'page';
   $suggestions = array();
   while ($arg = arg($i++)) {
     $suggestions[] = $suggestion .'-'. $arg;
@@ -1858,12 +1883,12 @@ function template_preprocess_node(&$vari
     $variables['content'] = '';
   }
 
-  $variables['date']      = format_date($node->created);
-  $variables['links']     = !empty($node->links) ? theme('links', $node->links, array('class' => 'links inline')) : '';
-  $variables['name']      = theme('username', $node);
-  $variables['node_url']  = url('node/'. $node->nid);
-  $variables['terms']     = theme('links', $variables['taxonomy'], array('class' => 'links inline'));
-  $variables['title']     = check_plain($node->title);
+  $variables['date'] = format_date($node->created);
+  $variables['links'] = !empty($node->links) ? theme('links', $node->links, array('class' => 'links inline')) : '';
+  $variables['name'] = theme('username', $node);
+  $variables['node_url'] = url('node/'. $node->nid);
+  $variables['terms'] = theme('links', $variables['taxonomy'], array('class' => 'links inline'));
+  $variables['title'] = check_plain($node->title);
 
   // Flatten the node object's member fields.
   $variables = array_merge((array)$node, $variables);
Index: includes/theme.maintenance.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.maintenance.inc,v
retrieving revision 1.9
diff -u -p -r1.9 theme.maintenance.inc
--- includes/theme.maintenance.inc	16 Jan 2008 10:47:17 -0000	1.9
+++ includes/theme.maintenance.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: theme.maintenance.inc,v 1.9 2008/01/16 10:47:17 goba Exp $
 
+
 /**
  * @file
  * Theming for maintenance pages.
@@ -124,7 +125,7 @@ function theme_install_page($content) {
     $variables['messages'] .= theme('status_messages', 'error');
     $variables['content'] .= '<p>'. st('Please check the error messages and <a href="!url">try again</a>.', array('!url' => request_uri())) .'</p>';
   }
-  
+
   // Special handling of warning messages
   if (isset($messages['warning'])) {
     $title = count($messages['warning']) > 1 ? st('The following installation warnings should be carefully reviewed') : st('The following installation warning should be carefully reviewed');
@@ -239,28 +240,28 @@ function template_preprocess_maintenance
       $head_title[] = variable_get('site_slogan', '');
     }
   }
-  $variables['head_title']        = implode(' | ', $head_title);
-  $variables['base_path']         = base_path();
-  $variables['breadcrumb']        = '';
-  $variables['feed_icons']        = '';
-  $variables['footer_message']    = filter_xss_admin(variable_get('site_footer', FALSE));
-  $variables['head']              = drupal_get_html_head();
-  $variables['help']              = '';
-  $variables['language']          = $GLOBALS['language'];
-  $variables['logo']              = theme_get_setting('logo');
-  $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
-  $variables['mission']           = '';
-  $variables['primary_links']     = array();
-  $variables['secondary_links']   = array();
-  $variables['search_box']        = '';
-  $variables['site_name']         = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
-  $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
-  $variables['css']               = drupal_add_css();
-  $variables['styles']            = drupal_get_css();
-  $variables['scripts']           = drupal_get_js();
-  $variables['tabs']              = '';
-  $variables['title']             = drupal_get_title();
-  $variables['closure']           = '';
+  $variables['head_title'] = implode(' | ', $head_title);
+  $variables['base_path'] = base_path();
+  $variables['breadcrumb'] = '';
+  $variables['feed_icons'] = '';
+  $variables['footer_message'] = filter_xss_admin(variable_get('site_footer', FALSE));
+  $variables['head'] = drupal_get_html_head();
+  $variables['help'] = '';
+  $variables['language'] = $GLOBALS['language'];
+  $variables['logo'] = theme_get_setting('logo');
+  $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
+  $variables['mission'] = '';
+  $variables['primary_links'] = array();
+  $variables['secondary_links'] = array();
+  $variables['search_box'] = '';
+  $variables['site_name'] = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
+  $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
+  $variables['css'] = drupal_add_css();
+  $variables['styles'] = drupal_get_css();
+  $variables['scripts'] = drupal_get_js();
+  $variables['tabs'] = '';
+  $variables['title'] = drupal_get_title();
+  $variables['closure'] = '';
 
   // Compile a list of classes that are going to be applied to the body element.
   $body_classes = array();
@@ -285,3 +286,4 @@ function template_preprocess_maintenance
     $variables['template_file'] = 'maintenance-page-offline';
   }
 }
+
Index: includes/unicode.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/unicode.inc,v
retrieving revision 1.29
diff -u -p -r1.29 unicode.inc
--- includes/unicode.inc	28 Dec 2007 12:02:50 -0000	1.29
+++ includes/unicode.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: unicode.inc,v 1.29 2007/12/28 12:02:50 dries Exp $
 
+
 /**
  * Indicates an error during check for PHP unicode support.
  */
@@ -120,6 +121,7 @@ function unicode_requirements() {
  *
  * @param &$data
  *   The XML data which will be parsed later.
+ *
  * @return
  *   An XML parser object.
  */
@@ -167,6 +169,7 @@ function drupal_xml_parser_create(&$data
  *   The data to be converted.
  * @param $encoding
  *   The encoding that the data is in
+ *
  * @return
  *   Converted data or FALSE.
  */
@@ -203,6 +206,7 @@ function drupal_convert_to_utf8($data, $
  *   The string to truncate.
  * @param $len
  *   An upper limit on the returned string length.
+ *
  * @return
  *   The truncated string.
  */
@@ -228,6 +232,7 @@ function drupal_truncate_bytes($string, 
  *   Flag to truncate at last space within the upper limit. Defaults to FALSE.
  * @param $dots
  *   Flag to add trailing dots. Defaults to FALSE.
+ *
  * @return
  *   The truncated string.
  */
@@ -242,8 +247,10 @@ function truncate_utf8($string, $len, $w
   }
 
   if ($wordsafe) {
-    $string = drupal_substr($string, 0, $len + 1); // leave one more character
-    if ($last_space = strrpos($string, ' ')) { // space exists AND is not on position 0
+    // leave one more character
+    $string = drupal_substr($string, 0, $len + 1);
+    // space exists AND is not on position 0
+    if ($last_space = strrpos($string, ' ')) {
       $string = substr($string, 0, $last_space);
     }
     else {
@@ -278,9 +285,10 @@ function truncate_utf8($string, $len, $w
  */
 function mime_header_encode($string) {
   if (preg_match('/[^\x20-\x7E]/', $string)) {
-    $chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);
-    $len = strlen($string);
-    $output = '';
+    // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);
+    $chunk_size = 47;
+    $len        = strlen($string);
+    $output     = '';
     while ($len > 0) {
       $chunk = drupal_truncate_bytes($string, $chunk_size);
       $output .= ' =?UTF-8?B?'. base64_encode($chunk) ."?=\n";
@@ -371,19 +379,13 @@ function _decode_entities($prefix, $code
     $str = chr($codepoint);
   }
   else if ($codepoint < 0x800) {
-    $str = chr(0xC0 | ($codepoint >> 6))
-         . chr(0x80 | ($codepoint & 0x3F));
+    $str = chr(0xC0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3F));
   }
   else if ($codepoint < 0x10000) {
-    $str = chr(0xE0 | ( $codepoint >> 12))
-         . chr(0x80 | (($codepoint >> 6) & 0x3F))
-         . chr(0x80 | ( $codepoint       & 0x3F));
+    $str = chr(0xE0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3F)) . chr(0x80 | ($codepoint & 0x3F));
   }
   else if ($codepoint < 0x200000) {
-    $str = chr(0xF0 | ( $codepoint >> 18))
-         . chr(0x80 | (($codepoint >> 12) & 0x3F))
-         . chr(0x80 | (($codepoint >> 6)  & 0x3F))
-         . chr(0x80 | ( $codepoint        & 0x3F));
+    $str = chr(0xF0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3F)) . chr(0x80 | (($codepoint >> 6) & 0x3F)) . chr(0x80 | ($codepoint & 0x3F));
   }
   // Check for excluded characters
   if (in_array($str, $exclude)) {
@@ -479,7 +481,8 @@ function drupal_substr($text, $start, $l
     if ($start > 0) {
       // Count all the continuation bytes from the start until we have found
       // $start characters
-      $bytes = -1; $chars = -1;
+      $bytes = -1;
+      $chars = -1;
       while ($bytes < $strlen && $chars < $start) {
         $bytes++;
         $c = ord($text[$bytes]);
@@ -492,7 +495,8 @@ function drupal_substr($text, $start, $l
       // Count all the continuation bytes from the end until we have found
       // abs($start) characters
       $start = abs($start);
-      $bytes = $strlen; $chars = 0;
+      $bytes = $strlen;
+      $chars = 0;
       while ($bytes > 0 && $chars < $start) {
         $bytes--;
         $c = ord($text[$bytes]);
@@ -510,7 +514,8 @@ function drupal_substr($text, $start, $l
     else if ($length > 0) {
       // Count all the continuation bytes from the starting index until we have
       // found $length + 1 characters. Then backtrack one byte.
-      $bytes = $istart; $chars = 0;
+      $bytes = $istart;
+      $chars = 0;
       while ($bytes < $strlen && $chars < $length) {
         $bytes++;
         $c = ord($text[$bytes]);
@@ -524,7 +529,8 @@ function drupal_substr($text, $start, $l
       // Count all the continuation bytes from the end until we have found
       // abs($length) characters
       $length = abs($length);
-      $bytes = $strlen - 1; $chars = 0;
+      $bytes  = $strlen - 1;
+      $chars  = 0;
       while ($bytes >= 0 && $chars < $length) {
         $c = ord($text[$bytes]);
         if ($c < 0x80 || $c >= 0xC0) {
@@ -539,4 +545,3 @@ function drupal_substr($text, $start, $l
   }
 }
 
-
Index: includes/xmlrpc.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/xmlrpc.inc,v
retrieving revision 1.47
diff -u -p -r1.47 xmlrpc.inc
--- includes/xmlrpc.inc	9 Jan 2008 21:52:43 -0000	1.47
+++ includes/xmlrpc.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: xmlrpc.inc,v 1.47 2008/01/09 21:52:43 goba Exp $
 
+
 /**
  * @file
  * Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
@@ -17,6 +18,7 @@
  *   The data structure.
  * @param  $type
  *   Optional type assign to $data.
+ *
  * @return
  *   Object.
  */
@@ -46,6 +48,7 @@ function xmlrpc_value($data, $type = FAL
  *
  * @param $xmlrpc_value
  *   Variable whose type should be mapped.
+ *
  * @return
  *   XML-RPC type as string.
  * @see
@@ -60,7 +63,7 @@ function xmlrpc_value_calculate_type(&$x
     return 'double';
   }
   if (is_int($xmlrpc_value->data)) {
-      return 'int';
+    return 'int';
   }
   if (is_array($xmlrpc_value->data)) {
     // empty or integer-indexed arrays are 'array', string-indexed arrays 'struct'
@@ -84,6 +87,7 @@ function xmlrpc_value_calculate_type(&$x
  * Generate XML representing the given value.
  *
  * @param $xmlrpc_value
+ *
  * @return
  *   XML representation of value.
  */
@@ -91,41 +95,48 @@ function xmlrpc_value_get_xml($xmlrpc_va
   switch ($xmlrpc_value->type) {
     case 'boolean':
       return '<boolean>'. (($xmlrpc_value->data) ? '1' : '0') .'</boolean>';
-      break;
+    break;
+
     case 'int':
       return '<int>'. $xmlrpc_value->data .'</int>';
-      break;
+    break;
+
     case 'double':
       return '<double>'. $xmlrpc_value->data .'</double>';
-      break;
+    break;
+
     case 'string':
       // Note: we don't escape apostrophes because of the many blogging clients
       // that don't support numerical entities (and XML in general) properly.
       return '<string>'. htmlspecialchars($xmlrpc_value->data) .'</string>';
-      break;
+    break;
+
     case 'array':
-      $return = '<array><data>'."\n";
+      $return = '<array><data>' . "\n";
       foreach ($xmlrpc_value->data as $item) {
         $return .= '  <value>'. xmlrpc_value_get_xml($item) ."</value>\n";
       }
       $return .= '</data></array>';
       return $return;
-      break;
+    break;
+
     case 'struct':
-      $return = '<struct>'."\n";
+      $return = '<struct>' . "\n";
       foreach ($xmlrpc_value->data as $name => $value) {
         $return .= "  <member><name>". check_plain($name) ."</name><value>";
         $return .= xmlrpc_value_get_xml($value) ."</value></member>\n";
       }
       $return .= '</struct>';
       return $return;
-      break;
+    break;
+
     case 'date':
       return xmlrpc_date_get_xml($xmlrpc_value->data);
-      break;
+    break;
+
     case 'base64':
       return xmlrpc_base64_get_xml($xmlrpc_value->data);
-      break;
+    break;
   }
   return FALSE;
 }
@@ -135,14 +146,18 @@ function xmlrpc_value_get_xml($xmlrpc_va
  *
  * @param $message
  *   String containing XML as defined at http://www.xmlrpc.com/spec
+ *
  * @return
  *   Object
  */
 function xmlrpc_message($message) {
   $xmlrpc_message = new stdClass();
-  $xmlrpc_message->array_structs = array();   // The stack used to keep track of the current array/struct
-  $xmlrpc_message->array_structs_types = array(); // The stack used to keep track of if things are structs or array
-  $xmlrpc_message->current_struct_name = array();  // A stack as well
+  // The stack used to keep track of the current array/struct
+  $xmlrpc_message->array_structs = array();
+  // The stack used to keep track of if things are structs or array
+  $xmlrpc_message->array_structs_types = array();
+  // A stack as well
+  $xmlrpc_message->current_struct_name = array();
   $xmlrpc_message->message = $message;
   return $xmlrpc_message;
 }
@@ -153,12 +168,13 @@ function xmlrpc_message($message) {
  *
  * @param $xmlrpc_message
  *   Object generated by xmlrpc_message()
+ *
  * @return
  *   TRUE if parsing succeeded; FALSE otherwise
  */
 function xmlrpc_message_parse(&$xmlrpc_message) {
   // First remove the XML declaration
-  $xmlrpc_message->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $xmlrpc_message->message);
+  $xmlrpc_message->message = preg_replace('/<\?xml(.*)?\?' . '>/', '', $xmlrpc_message->message);
   if (trim($xmlrpc_message->message) == '') {
     return FALSE;
   }
@@ -187,6 +203,7 @@ function xmlrpc_message_parse(&$xmlrpc_m
  *
  * @param $value
  *   Object
+ *
  * @return
  *   The most recently stored $xmlrpc_message
  */
@@ -213,10 +230,12 @@ function xmlrpc_message_tag_open($parser
       $xmlrpc_message->messagetype = $tag;
       break;
     // Deal with stacks of arrays and structs
+
     case 'data':
       $xmlrpc_message->array_structs_types[] = 'array';
       $xmlrpc_message->array_structs[] = array();
       break;
+
     case 'struct':
       $xmlrpc_message->array_structs_types[] = 'struct';
       $xmlrpc_message->array_structs[] = array();
@@ -240,19 +259,23 @@ function xmlrpc_message_tag_close($parse
       $value = (int)trim($xmlrpc_message->current_tag_contents);
       $value_flag = TRUE;
       break;
+
     case 'double':
       $value = (double)trim($xmlrpc_message->current_tag_contents);
       $value_flag = TRUE;
       break;
+
     case 'string':
       $value = $xmlrpc_message->current_tag_contents;
       $value_flag = TRUE;
       break;
+
     case 'dateTime.iso8601':
       $value = xmlrpc_date(trim($xmlrpc_message->current_tag_contents));
       // $value = $iso->getTimestamp();
       $value_flag = TRUE;
       break;
+
     case 'value':
       // If no type is indicated, the type is string
       // We take special care for empty values
@@ -262,41 +285,47 @@ function xmlrpc_message_tag_close($parse
       }
       unset($xmlrpc_message->last_open);
       break;
+
     case 'boolean':
       $value = (boolean)trim($xmlrpc_message->current_tag_contents);
       $value_flag = TRUE;
       break;
+
     case 'base64':
       $value = base64_decode(trim($xmlrpc_message->current_tag_contents));
       $value_flag = TRUE;
       break;
     // Deal with stacks of arrays and structs
+
     case 'data':
     case 'struct':
-      $value = array_pop($xmlrpc_message->array_structs );
+      $value = array_pop($xmlrpc_message->array_structs);
       array_pop($xmlrpc_message->array_structs_types);
       $value_flag = TRUE;
       break;
+
     case 'member':
       array_pop($xmlrpc_message->current_struct_name);
       break;
+
     case 'name':
       $xmlrpc_message->current_struct_name[] = trim($xmlrpc_message->current_tag_contents);
       break;
+
     case 'methodName':
       $xmlrpc_message->methodname = trim($xmlrpc_message->current_tag_contents);
       break;
   }
   if ($value_flag) {
-    if (count($xmlrpc_message->array_structs ) > 0) {
+    if (count($xmlrpc_message->array_structs) > 0) {
       // Add value to struct or array
-      if ($xmlrpc_message->array_structs_types[count($xmlrpc_message->array_structs_types)-1] == 'struct') {
+      if ($xmlrpc_message->array_structs_types[count($xmlrpc_message->array_structs_types) - 1] == 'struct') {
         // Add to struct
-        $xmlrpc_message->array_structs [count($xmlrpc_message->array_structs )-1][$xmlrpc_message->current_struct_name[count($xmlrpc_message->current_struct_name)-1]] = $value;
+        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][$xmlrpc_message->current_struct_name[count($xmlrpc_message->current_struct_name) - 1]] = $value;
       }
       else {
         // Add to array
-        $xmlrpc_message->array_structs [count($xmlrpc_message->array_structs )-1][] = $value;
+        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][] = $value;
       }
     }
     else {
@@ -317,6 +346,7 @@ function xmlrpc_message_tag_close($parse
  *   The name of the method to be called
  * @param $args
  *   An array of parameters to send with the method.
+ *
  * @return
  *   Object
  */
@@ -341,7 +371,6 @@ EOD;
   return $xmlrpc_request;
 }
 
-
 function xmlrpc_error($code = NULL, $message = NULL) {
   static $xmlrpc_error;
   if (isset($code)) {
@@ -475,3 +504,4 @@ function xmlrpc_error_msg() {
   $error = xmlrpc_error();
   return $error->message;
 }
+
Index: includes/xmlrpcs.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/xmlrpcs.inc,v
retrieving revision 1.24
diff -u -p -r1.24 xmlrpcs.inc
--- includes/xmlrpcs.inc	31 Dec 2007 08:54:36 -0000	1.24
+++ includes/xmlrpcs.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: xmlrpcs.inc,v 1.24 2007/12/31 08:54:36 dries Exp $
 
+
 /**
  * The main entry point for XML-RPC requests.
  *
@@ -11,29 +12,31 @@ function xmlrpc_server($callbacks) {
   $xmlrpc_server = new stdClass();
   // Define built-in XML-RPC method names
   $defaults = array(
-      'system.multicall' => 'xmlrpc_server_multicall',
+    'system.multicall' => 'xmlrpc_server_multicall',
     array(
       'system.methodSignature',
       'xmlrpc_server_method_signature',
       array('array', 'string'),
-      'Returns an array describing the return type and required parameters of a method.'
+      'Returns an array describing the return type and required parameters of a method.',
     ),
     array(
       'system.getCapabilities',
       'xmlrpc_server_get_capabilities',
       array('struct'),
-      'Returns a struct describing the XML-RPC specifications supported by this server.'
+      'Returns a struct describing the XML-RPC specifications supported by this server.',
     ),
     array(
       'system.listMethods',
       'xmlrpc_server_list_methods',
       array('array'),
-      'Returns an array of available methods on this server.'),
+      'Returns an array of available methods on this server.',
+    ),
     array(
       'system.methodHelp',
       'xmlrpc_server_method_help',
       array('string', 'string'),
-      'Returns a documentation string for the specified method.')
+      'Returns a documentation string for the specified method.',
+    ),
   );
   // We build an array of all method names by combining the built-ins
   // with those defined by modules implementing the _xmlrpc hook.
@@ -77,9 +80,7 @@ function xmlrpc_server($callbacks) {
 <methodResponse>
   <params>
   <param>
-    <value>'.
-    xmlrpc_value_get_xml($r)
-    .'</value>
+    <value>'. xmlrpc_value_get_xml($r) .'</value>
   </param>
   </params>
 </methodResponse>
@@ -105,7 +106,7 @@ function xmlrpc_server_error($error, $me
 }
 
 function xmlrpc_server_output($xml) {
-  $xml = '<?xml version="1.0"?>'."\n". $xml;
+  $xml = '<?xml version="1.0"?>' . "\n". $xml;
   header('Connection: close');
   header('Content-Length: '. strlen($xml));
   header('Content-Type: text/xml');
@@ -172,23 +173,27 @@ function xmlrpc_server_call($xmlrpc_serv
             $ok = FALSE;
           }
           break;
+
         case 'base64':
         case 'string':
           if (!is_string($arg)) {
             $ok = FALSE;
           }
           break;
+
         case 'boolean':
           if ($arg !== FALSE && $arg !== TRUE) {
             $ok = FALSE;
           }
           break;
+
         case 'float':
         case 'double':
           if (!is_float($arg)) {
             $ok = FALSE;
           }
           break;
+
         case 'date':
         case 'dateTime.iso8601':
           if (!$arg->is_date) {
@@ -230,7 +235,7 @@ function xmlrpc_server_multicall($method
     if ($result->is_error) {
       $return[] = array(
         'faultCode' => $result->code,
-        'faultString' => $result->message
+        'faultString' => $result->message,
       );
     }
     else {
@@ -240,7 +245,6 @@ function xmlrpc_server_multicall($method
   return $return;
 }
 
-
 /**
  * XML-RPC method system.listMethods maps to this function.
  */
@@ -257,20 +261,20 @@ function xmlrpc_server_get_capabilities(
   return array(
     'xmlrpc' => array(
       'specUrl' => 'http://www.xmlrpc.com/spec',
-      'specVersion' => 1
+      'specVersion' => 1,
     ),
     'faults_interop' => array(
       'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
-      'specVersion' => 20010516
+      'specVersion' => 20010516,
     ),
     'system.multicall' => array(
       'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
-      'specVersion' => 1
+      'specVersion' => 1,
     ),
     'introspection' => array(
-    'specUrl' => 'http://scripts.incutio.com/xmlrpc/introspection.html',
-    'specVersion' => 1
-    )
+      'specUrl' => 'http://scripts.incutio.com/xmlrpc/introspection.html',
+      'specVersion' => 1,
+    ),
   );
 }
 
@@ -279,6 +283,7 @@ function xmlrpc_server_get_capabilities(
  *
  * @param $methodname
  *   Name of method for which we return a method signature.
+ *
  * @return array
  *   An array of types representing the method signature of the
  *   function that the methodname maps to. The methodSignature of
@@ -311,3 +316,4 @@ function xmlrpc_server_method_help($meth
   $xmlrpc_server = xmlrpc_server_get();
   return $xmlrpc_server->help[$method];
 }
+
Index: modules/aggregator/aggregator-feed-source.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-feed-source.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 aggregator-feed-source.tpl.php
--- modules/aggregator/aggregator-feed-source.tpl.php	13 Sep 2007 08:02:38 -0000	1.1
+++ modules/aggregator/aggregator-feed-source.tpl.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator-feed-source.tpl.php,v 1.1 2007/09/13 08:02:38 goba Exp $
 
+
 /**
  * @file aggregator-feed-source.tpl.php
  * Default theme implementation to present the source of the feed.
@@ -22,7 +23,8 @@
 ?>
 <div class="feed-source">
   <?php print $source_icon; ?>
-  <?php print $source_image; ?>
+
+<?php print $source_image; ?>
   <div class="feed-description">
     <?php print $source_description; ?>
   </div>
@@ -33,3 +35,4 @@
     <em><?php print t('Updated:'); ?></em> <?php print $last_checked; ?>
   </div>
 </div>
+
Index: modules/aggregator/aggregator-item.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-item.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 aggregator-item.tpl.php
--- modules/aggregator/aggregator-item.tpl.php	13 Sep 2007 08:02:38 -0000	1.1
+++ modules/aggregator/aggregator-item.tpl.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator-item.tpl.php,v 1.1 2007/09/13 08:02:38 goba Exp $
 
+
 /**
  * @file aggregator-item.tpl.php
  * Default theme implementation to format an individual feed item for display
@@ -25,22 +26,27 @@
   </h3>
 
   <div class="feed-item-meta">
-  <?php if ($source_url) : ?>
+  <?php if ($source_url):
+?>
     <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
   <?php endif; ?>
     <span class="feed-item-date"><?php print $source_date; ?></span>
   </div>
 
-<?php if ($content) : ?>
+<?php if ($content):
+?>
   <div class="feed-item-body">
     <?php print $content; ?>
   </div>
 <?php endif; ?>
 
-<?php if ($categories) : ?>
+
+<?php if ($categories):
+?>
   <div class="feed-item-categories">
     <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
   </div>
-<?php endif ;?>
+<?php endif; ?>
 
 </div>
+
Index: modules/aggregator/aggregator-summary-item.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-summary-item.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 aggregator-summary-item.tpl.php
--- modules/aggregator/aggregator-summary-item.tpl.php	13 Sep 2007 08:02:38 -0000	1.1
+++ modules/aggregator/aggregator-summary-item.tpl.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator-summary-item.tpl.php,v 1.1 2007/09/13 08:02:38 goba Exp $
 
+
 /**
  * @file aggregator-summary-item.tpl.php
  * Default theme implementation to present a linked feed item for summaries.
@@ -16,4 +17,6 @@
  * @see template_preprocess_aggregator_summary_item()
  */
 ?>
-<a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a> <span class="age"><?php print $feed_age; ?></span><?php if ($source_url) : ?>, <span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span><?php endif; ?>
+<a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a> <span class="age"><?php print $feed_age; ?></span><?php if ($source_url):
+?>, <span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span><?php endif; 
+
Index: modules/aggregator/aggregator-summary-items.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-summary-items.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 aggregator-summary-items.tpl.php
--- modules/aggregator/aggregator-summary-items.tpl.php	13 Sep 2007 08:02:38 -0000	1.1
+++ modules/aggregator/aggregator-summary-items.tpl.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator-summary-items.tpl.php,v 1.1 2007/09/13 08:02:38 goba Exp $
 
+
 /**
  * @file aggregator-summary-items.tpl.php
  * Default theme implementation to present feeds as list items.
@@ -22,3 +23,4 @@
 <div class="links">
   <a href="<?php print $source_url; ?>"><?php print t('More'); ?></a>
 </div>
+
Index: modules/aggregator/aggregator-wrapper.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-wrapper.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 aggregator-wrapper.tpl.php
--- modules/aggregator/aggregator-wrapper.tpl.php	13 Sep 2007 08:02:38 -0000	1.1
+++ modules/aggregator/aggregator-wrapper.tpl.php	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator-wrapper.tpl.php,v 1.1 2007/09/13 08:02:38 goba Exp $
 
+
 /**
  * @file comment-wrapper.tpl.php
  * Default theme implementation to wrap aggregator content.
@@ -15,5 +16,7 @@
 ?>
 <div id="aggregator">
   <?php print $content; ?>
-  <?php print $pager; ?>
+
+<?php print $pager; ?>
 </div>
+
Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.7
diff -u -p -r1.7 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	10 Jan 2008 22:47:17 -0000	1.7
+++ modules/aggregator/aggregator.admin.inc	21 Jan 2008 21:58:49 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator.admin.inc,v 1.7 2008/01/10 22:47:17 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the aggregator module.
@@ -81,8 +82,8 @@ function aggregator_form_feed(&$form_sta
   );
 
   // Handling of categories:
-  $options = array();
-  $values = array();
+  $options    = array();
+  $values     = array();
   $categories = db_query('SELECT c.cid, c.title, f.fid FROM {aggregator_category} c LEFT JOIN {aggregator_category_feed} f ON c.cid = f.cid AND f.fid = %d ORDER BY title', $edit['fid']);
   while ($category = db_fetch_object($categories)) {
     $options[$category->cid] = check_plain($category->title);
@@ -227,25 +228,25 @@ function aggregator_admin_settings() {
   $form['aggregator_allowed_html_tags'] = array(
     '#type' => 'textfield', '#title' => t('Allowed HTML tags'), '#size' => 80, '#maxlength' => 255,
     '#default_value' => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
-    '#description' => t('A space-separated list of HTML tags allowed in the content of feed items. (Tags in this list are not removed by Drupal.)')
+    '#description' => t('A space-separated list of HTML tags allowed in the content of feed items. (Tags in this list are not removed by Drupal.)'),
   );
 
   $form['aggregator_summary_items'] = array(
-    '#type' => 'select', '#title' => t('Items shown in sources and categories pages') ,
+    '#type' => 'select', '#title' => t('Items shown in sources and categories pages'),
     '#default_value' => variable_get('aggregator_summary_items', 3), '#options' => $items,
-    '#description' => t('Number of feed items displayed in feed and category summary pages.')
+    '#description' => t('Number of feed items displayed in feed and category summary pages.'),
   );
 
   $form['aggregator_clear'] = array(
     '#type' => 'select', '#title' => t('Discard items older than'),
     '#default_value' => variable_get('aggregator_clear', 9676800), '#options' => $period,
-    '#description' => t('The length of time to retain feed items before discarding. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status')))
+    '#description' => t('The length of time to retain feed items before discarding. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))),
   );
 
   $form['aggregator_category_selector'] = array(
     '#type' => 'radios', '#title' => t('Category selection type'), '#default_value' => variable_get('aggregator_category_selector', 'checkboxes'),
     '#options' => array('checkboxes' => t('checkboxes'), 'select' => t('multiple selector')),
-    '#description' => t('The type of category selection widget displayed on categorization pages. (For a small number of categories, checkboxes are easier to use, while a multiple selector work well with large numbers of categories.)')
+    '#description' => t('The type of category selection widget displayed on categorization pages. (For a small number of categories, checkboxes are easier to use, while a multiple selector work well with large numbers of categories.)'),
   );
 
   return system_settings_form($form);
@@ -339,3 +340,4 @@ function aggregator_form_category_submit
     drupal_set_message(t('The category %category has been added.', array('%category' => $form_state['values']['title'])));
   }
 }
+
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.14
diff -u -p -r1.14 aggregator.install
--- modules/aggregator/aggregator.install	18 Dec 2007 12:59:20 -0000	1.14
+++ modules/aggregator/aggregator.install	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator.install,v 1.14 2007/12/18 12:59:20 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -29,7 +30,7 @@ function aggregator_schema() {
   $schema['aggregator_category'] = array(
     'description' => t('Stores categories for aggregator feeds and feed items.'),
     'fields' => array(
-      'cid'  => array(
+      'cid' => array(
         'type' => 'serial',
         'not null' => TRUE,
         'description' => t('Primary Key: Unique aggregator category ID.'),
@@ -53,7 +54,7 @@ function aggregator_schema() {
         'default' => 0,
         'size' => 'tiny',
         'description' => t('The number of recent items to show within the category block.'),
-      )
+      ),
     ),
     'primary key' => array('cid'),
     'unique keys' => array('title' => array('title')),
@@ -73,7 +74,7 @@ function aggregator_schema() {
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The {aggregator_category}.cid to which the feed is being assigned.'),
-      )
+      ),
     ),
     'primary key' => array('cid', 'fid'),
     'indexes' => array('fid' => array('fid')),
@@ -93,7 +94,7 @@ function aggregator_schema() {
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The {aggregator_category}.cid to which the feed item is being assigned.'),
-      )
+      ),
     ),
     'primary key' => array('cid', 'iid'),
     'indexes' => array('iid' => array('iid')),
@@ -171,11 +172,11 @@ function aggregator_schema() {
         'default' => 0,
         'size' => 'tiny',
         'description' => t("Number of items to display in the feed's block."),
-      )
+      ),
     ),
     'primary key' => array('fid'),
     'unique keys' => array(
-      'url'  => array('url'),
+      'url' => array('url'),
       'title' => array('title'),
     ),
   );
@@ -183,7 +184,7 @@ function aggregator_schema() {
   $schema['aggregator_item'] = array(
     'description' => t('Stores the individual items imported from feeds.'),
     'fields' => array(
-      'iid'  => array(
+      'iid' => array(
         'type' => 'serial',
         'not null' => TRUE,
         'description' => t('Primary Key: Unique ID for feed item.'),
@@ -231,7 +232,7 @@ function aggregator_schema() {
         'length' => 255,
         'not null' => FALSE,
         'description' => t('Unique identifier for the feed item.'),
-      )
+      ),
     ),
     'primary key' => array('iid'),
     'indexes' => array('fid' => array('fid')),
@@ -239,3 +240,4 @@ function aggregator_schema() {
 
   return $schema;
 }
+
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.374
diff -u -p -r1.374 aggregator.module
--- modules/aggregator/aggregator.module	15 Jan 2008 08:06:32 -0000	1.374
+++ modules/aggregator/aggregator.module	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator.module,v 1.374 2008/01/15 08:06:32 dries Exp $
 
+
 /**
  * @file
  * Used to aggregate syndicated content (RSS, RDF, and Atom).
@@ -16,12 +17,15 @@ function aggregator_help($path, $arg) {
       $output .= '<p>'. t('Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the <a href="@aggregator">main aggregator display</a> or by <a href="@aggregator-sources">their source</a>. Administrators can <a href="@feededit">add, edit and delete feeds</a> and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the <a href="@admin-block">blocks administration page</a>. A <a href="@aggregator-opml">machine-readable OPML file</a> of all feeds is available. A correctly configured <a href="@cron">cron maintenance task</a> is required to update feeds automatically.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@feededit' => url('admin/content/aggregator'), '@admin-block' => url('admin/build/block'), '@aggregator-opml' => url('aggregator/opml'), '@cron' => url('admin/reports/status'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@aggregator">Aggregator module</a>.', array('@aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) .'</p>';
       return $output;
+
     case 'admin/content/aggregator':
       $output = '<p>'. t('Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include <a href="@rss">RSS</a>, <a href="@rdf">RDF</a>, and <a href="@atom">Atom</a>.', array('@rss' => 'http://cyber.law.harvard.edu/rss/', '@rdf' => 'hsttp://www.w3.org/RDF/', '@atom' => 'http://www.atomenabled.org')) .'</p>';
       $output .= '<p>'. t('Current feeds are listed below, and <a href="@addfeed">new feeds may be added</a>. For each feed or feed category, the <em>latest items</em> block may be enabled at the <a href="@block">blocks administration page</a>.', array('@addfeed' => url('admin/content/aggregator/add/feed'), '@block' => url('admin/build/block'))) .'</p>';
       return $output;
+
     case 'admin/content/aggregator/add/feed':
       return '<p>'. t('Add a feed in RSS, RDF or Atom format. A feed may only have one entry.') .'</p>';
+
     case 'admin/content/aggregator/add/category':
       return '<p>'. t('Categories allow feed items from different feeds to be grouped together. For example, several sport-related feeds may belong to a category named <em>Sports</em>. Feed items may be grouped automatically (by selecting a category when creating or editing a feed) or manually (via the <em>Categorize</em> page available from feed item listings). Each category provides its own feed page and block.') .'</p>';
   }
@@ -335,16 +339,16 @@ function aggregator_block($op = 'list', 
         case 'feed':
           if ($feed = db_fetch_object(db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE fid = %d', $id))) {
             $block['subject'] = check_plain($feed->title);
-            $result = db_query_range('SELECT * FROM {aggregator_item} WHERE fid = %d ORDER BY timestamp DESC, iid DESC', $feed->fid, 0, $feed->block);
-            $read_more = theme('more_link', url('aggregator/sources/'. $feed->fid), t("View this feed's recent news."));
+            $result           = db_query_range('SELECT * FROM {aggregator_item} WHERE fid = %d ORDER BY timestamp DESC, iid DESC', $feed->fid, 0, $feed->block);
+            $read_more        = theme('more_link', url('aggregator/sources/'. $feed->fid), t("View this feed's recent news."));
           }
           break;
 
         case 'category':
           if ($category = db_fetch_object(db_query('SELECT cid, title, block FROM {aggregator_category} WHERE cid = %d', $id))) {
             $block['subject'] = check_plain($category->title);
-            $result = db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = %d ORDER BY i.timestamp DESC, i.iid DESC', $category->cid, 0, $category->block);
-            $read_more = theme('more_link', url('aggregator/categories/'. $category->cid), t("View this category's recent news."));
+            $result           = db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = %d ORDER BY i.timestamp DESC, i.iid DESC', $category->cid, 0, $category->block);
+            $read_more        = theme('more_link', url('aggregator/categories/'. $category->cid), t("View this category's recent news."));
           }
           break;
       }
@@ -474,6 +478,7 @@ function aggregator_element_start($parse
     case 'INFO':
       $element = $name;
       break;
+
     case 'ID':
       if ($element != 'ITEM') {
         $element = $name;
@@ -488,10 +493,12 @@ function aggregator_element_start($parse
         }
       }
       break;
+
     case 'ITEM':
       $element = $name;
       $item += 1;
       break;
+
     case 'ENTRY':
       $element = 'ITEM';
       $item += 1;
@@ -516,6 +523,7 @@ function aggregator_element_end($parser,
     case 'INFO':
       $element = '';
       break;
+
     case 'ID':
       if ($element == 'ID') {
         $element = '';
@@ -534,36 +542,43 @@ function aggregator_element_data($parser
       $items[$item] += array($tag => '');
       $items[$item][$tag] .= $data;
       break;
+
     case 'IMAGE':
     case 'LOGO':
       $image += array($tag => '');
       $image[$tag] .= $data;
       break;
+
     case 'LINK':
       if ($data) {
         $items[$item] += array($tag => '');
         $items[$item][$tag] .= $data;
       }
       break;
+
     case 'CONTENT':
       $items[$item] += array('CONTENT' => '');
       $items[$item]['CONTENT'] .= $data;
       break;
+
     case 'SUMMARY':
       $items[$item] += array('SUMMARY' => '');
       $items[$item]['SUMMARY'] .= $data;
       break;
+
     case 'TAGLINE':
     case 'SUBTITLE':
       $channel += array('DESCRIPTION' => '');
       $channel['DESCRIPTION'] .= $data;
       break;
+
     case 'INFO':
     case 'ID':
     case 'TEXTINPUT':
       // The sub-element is not supported. However, we must recognize
       // it or its contents will end up in the item array.
       break;
+
     default:
       $channel += array($tag => '');
       $channel[$tag] .= $data;
@@ -597,6 +612,7 @@ function aggregator_refresh($feed) {
       db_query('UPDATE {aggregator_feed} SET checked = %d WHERE fid = %d', time(), $feed['fid']);
       drupal_set_message(t('There is no new syndicated content from %site.', array('%site' => $feed['title'])));
       break;
+
     case 301:
       $feed['url'] = $result->redirect_url;
       watchdog('aggregator', 'Updated URL for feed %title to %url.', array('%title' => $feed['title'], '%url' => $feed['url']));
@@ -654,6 +670,7 @@ function aggregator_refresh($feed) {
  *
  * @param $date_str
  *   A string with a potentially W3C DTF date.
+ *
  * @return
  *   A timestamp if parsed successfully or FALSE if not.
  */
@@ -662,7 +679,8 @@ function aggregator_parse_w3cdtf($date_s
     list($year, $month, $day, $hours, $minutes, $seconds) = array($match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
     // calc epoch for current date assuming GMT
     $epoch = gmmktime($hours, $minutes, $seconds, $month, $day, $year);
-    if ($match[10] != 'Z') { // Z is zulu time, aka GMT
+    // Z is zulu time, aka GMT
+    if ($match[10] != 'Z') {
       list($tz_mod, $tz_hour, $tz_min) = array($match[8], $match[9], $match[10]);
       // zero out the variables
       if (!$tz_hour) {
@@ -692,6 +710,7 @@ function aggregator_parse_w3cdtf($date_s
  *   The feed data.
  * @param $feed
  *   An associative array describing the feed to be parsed.
+ *
  * @return
  *   0 on error, 1 otherwise.
  */
@@ -700,8 +719,8 @@ function aggregator_parse_feed(&$data, $
 
   // Unset the global variables before we use them:
   unset($GLOBALS['element'], $GLOBALS['item'], $GLOBALS['tag']);
-  $items = array();
-  $image = array();
+  $items   = array();
+  $image   = array();
   $channel = array();
 
   // parse the data:
@@ -773,11 +792,14 @@ function aggregator_parse_feed(&$data, $
       }
     }
 
-    $timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.
+    // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.
+    $timestamp = strtotime($date);
     if ($timestamp <= 0) {
-      $timestamp = aggregator_parse_w3cdtf($date); // Returns FALSE on failure
+      // Returns FALSE on failure
+      $timestamp = aggregator_parse_w3cdtf($date);
       if (!$timestamp) {
-        $timestamp = time(); // better than nothing
+        // better than nothing
+        $timestamp = time();
       }
     }
 
@@ -794,7 +816,7 @@ function aggregator_parse_feed(&$data, $
       $entry = db_fetch_object(db_query("SELECT iid FROM {aggregator_item} WHERE fid = %d AND title = '%s'", $feed['fid'], $title));
     }
     $item += array('AUTHOR' => '', 'DESCRIPTION' => '');
-    aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid:  ''), 'fid' => $feed['fid'], 'timestamp' => $timestamp, 'title' => $title, 'link' => $link, 'author' => $item['AUTHOR'], 'description' => $item['DESCRIPTION'], 'guid' => $guid));
+    aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid : ''), 'fid' => $feed['fid'], 'timestamp' => $timestamp, 'title' => $title, 'link' => $link, 'author' => $item['AUTHOR'], 'description' => $item['DESCRIPTION'], 'guid' => $guid));
   }
 
   // Remove all items that are older than flush item timer.
@@ -845,6 +867,7 @@ function aggregator_save_item($edit) {
  *
  * @param $fid
  *   The feed id.
+ *
  * @return
  *   An associative array describing the feed.
  */
@@ -861,6 +884,7 @@ function aggregator_feed_load($fid) {
  *
  * @param $cid
  *   The category id.
+ *
  * @return
  *   An associative array describing the category.
  */
@@ -879,6 +903,7 @@ function aggregator_category_load($cid) 
  *   The item to be displayed.
  * @param $feed
  *   Not used.
+ *
  * @return
  *   The item HTML.
  * @ingroup themeable
@@ -904,6 +929,7 @@ function theme_aggregator_block_item($it
  *
  * @param $value
  *   The content to be filtered.
+ *
  * @return
  *   The filtered content.
  */
@@ -916,9 +942,11 @@ function aggregator_filter_xss($value) {
  *
  * @param $count
  *   Items count.
+ *
  * @return
  *   Plural-formatted "@count items"
  */
 function _aggregator_items($count) {
   return format_plural($count, '1 item', '@count items');
 }
+
Index: modules/aggregator/aggregator.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v
retrieving revision 1.12
diff -u -p -r1.12 aggregator.pages.inc
--- modules/aggregator/aggregator.pages.inc	8 Jan 2008 10:35:40 -0000	1.12
+++ modules/aggregator/aggregator.pages.inc	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: aggregator.pages.inc,v 1.12 2008/01/08 10:35:40 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the aggregator module.
@@ -29,6 +30,7 @@ function aggregator_page_last() {
  *   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.
  */
@@ -56,6 +58,7 @@ function aggregator_page_source($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.
  */
@@ -79,6 +82,7 @@ function aggregator_page_category($arg1,
  *
  * @param $sql
  *   The query to be executed.
+ *
  * @return
  *   An array of the feed items.
  */
@@ -109,6 +113,7 @@ function aggregator_feed_items_load($sql
  *   Which form should be added to the items. Only 'categorize' is now recognized.
  * @param $feed_source
  *   The feed source URL.
+ *
  * @return
  *   The items HTML.
  */
@@ -135,6 +140,7 @@ function _aggregator_page_list($items, $
  *   An array of the feed items.
  * @param $feed_source
  *   The feed source URL.
+ *
  * @return
  *   The form structure.
  * @ingroup forms
@@ -142,14 +148,14 @@ function _aggregator_page_list($items, $
  * @see aggregator_categorize_items_submit()
  */
 function aggregator_categorize_items($items, $feed_source = '') {
-  $form['#submit'][] = 'aggregator_categorize_items_submit';
+  $form['#submit'][]   = 'aggregator_categorize_items_submit';
   $form['#validate'][] = 'aggregator_categorize_items_validate';
-  $form['#theme'] = 'aggregator_categorize_items';
+  $form['#theme']      = 'aggregator_categorize_items';
   $form['feed_source'] = array('#value' => $feed_source);
-  $categories = array();
-  $done = FALSE;
-  $form['items'] = array();
-  $form['categories'] = array('#tree' => TRUE);
+  $categories          = array();
+  $done                = FALSE;
+  $form['items']       = array();
+  $form['categories']  = array('#tree' => TRUE);
   foreach ($items as $item) {
     $form['items'][$item->iid] = array('#value' => theme('aggregator_item', $item));
     $form['categories'][$item->iid] = array();
@@ -169,7 +175,7 @@ function aggregator_categorize_items($it
       '#default_value' => $selected,
       '#options' => $categories,
       '#size' => 10,
-      '#multiple' => TRUE
+      '#multiple' => TRUE,
     );
   }
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save categories'));
@@ -208,6 +214,7 @@ function aggregator_categorize_items_sub
  *
  * @param $form
  *   An associative array containing the structure of the form.
+ *
  * @return
  *   The output HTML.
  * @ingroup themeable
@@ -325,14 +332,14 @@ function aggregator_page_rss() {
   // arg(2) is the passed cid, only select for that category
   if (arg(2)) {
     $category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2)));
-    $sql = 'SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = %d ORDER BY timestamp DESC, i.iid DESC';
-    $result = db_query_range($sql, $category->cid, 0, variable_get('feed_default_items', 10));
+    $sql      = 'SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = %d ORDER BY timestamp DESC, i.iid DESC';
+    $result   = db_query_range($sql, $category->cid, 0, variable_get('feed_default_items', 10));
   }
   // or, get the default aggregator items
   else {
     $category = NULL;
-    $sql = 'SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC';
-    $result = db_query_range($sql, 0, variable_get('feed_default_items', 10));
+    $sql      = 'SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC';
+    $result   = db_query_range($sql, 0, variable_get('feed_default_items', 10));
   }
 
   $feeds = array();
@@ -365,6 +372,7 @@ function theme_aggregator_page_rss($feed
         }
         $feed->description = $teaser;
         break;
+
       case 'title':
         $feed->description = '';
         break;
@@ -372,8 +380,8 @@ function theme_aggregator_page_rss($feed
     $items .= format_rss_item($feed->ftitle .': '. $feed->title, $feed->link, $feed->description, array('pubDate' => date('r', $feed->timestamp)));
   }
 
-  $site_name = variable_get('site_name', 'Drupal');
-  $url = url((isset($category) ? 'aggregator/categories/'. $category->cid : 'aggregator'), array('absolute' => TRUE));
+  $site_name   = variable_get('site_name', 'Drupal');
+  $url         = url((isset($category) ? 'aggregator/categories/'. $category->cid : 'aggregator'), array('absolute' => TRUE));
   $description = isset($category) ? t('@site_name - aggregated feeds in category @title', array('@site_name' => $site_name, '@title' => $category->title)) : t('@site_name - aggregated feeds', array('@site_name' => $site_name));
 
   $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
@@ -389,6 +397,7 @@ function theme_aggregator_page_rss($feed
  *
  * @param $cid
  *   If set, feeds are exported only from a category with this ID. Otherwise, all feeds are exported.
+ *
  * @return
  *   The output XML.
  */
@@ -490,3 +499,4 @@ function template_preprocess_aggregator_
     $variables['last_checked'] = l($variables['last_checked'], 'admin/content/aggregator');
   }
 }
+
Index: modules/block/block-admin-display-form.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block-admin-display-form.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 block-admin-display-form.tpl.php
--- modules/block/block-admin-display-form.tpl.php	16 Jan 2008 22:57:26 -0000	1.3
+++ modules/block/block-admin-display-form.tpl.php	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: block-admin-display-form.tpl.php,v 1.3 2008/01/16 22:57:26 goba Exp $
 
+
 /**
  * @file block-admin-display-form.tpl.php
  * Default theme implementation to configure blocks.
@@ -26,14 +27,14 @@
  * @see theme_block_admin_display()
  */
 ?>
+
 <?php
-  // Add table javascript.
-  drupal_add_js('misc/tableheader.js');
-  drupal_add_js(drupal_get_path('module', 'block') .'/block.js');
-  foreach ($block_regions as $region => $title) {
-    drupal_add_tabledrag('blocks', 'match', 'sibling', 'block-region-select', 'block-region-'. $region, NULL, FALSE);
-    drupal_add_tabledrag('blocks', 'order', 'sibling', 'block-weight', 'block-weight-'. $region);
-  }
+// Add table javascript.
+drupal_add_js('misc/tableheader.js'); drupal_add_js(drupal_get_path('module', 'block') .'/block.js');
+foreach ($block_regions as $region => $title) {
+  drupal_add_tabledrag('blocks', 'match', 'sibling', 'block-region-select', 'block-region-'. $region, NULL, FALSE);
+  drupal_add_tabledrag('blocks', 'order', 'sibling', 'block-weight', 'block-weight-'. $region);
+}
 ?>
 <table id="blocks" class="sticky-enabled">
   <thead>
@@ -41,7 +42,8 @@
       <th><?php print t('Block'); ?></th>
       <th><?php print t('Region'); ?></th>
       <th><?php print t('Weight'); ?></th>
-      <?php if ($throttle): ?>
+      <?php if ($throttle):
+?>
         <th><?php print t('Throttle'); ?></th>
       <?php endif; ?>
       <th colspan="2"><?php print t('Operations'); ?></th>
@@ -49,28 +51,36 @@
   </thead>
   <tbody>
     <?php $row = 0; ?>
-    <?php foreach ($block_regions as $region => $title): ?>
+
+<?php foreach ($block_regions as $region => $title):
+?>
       <tr class="region region-<?php print $region?>">
         <td colspan="<?php print $throttle ? '6' : '5'; ?>" class="region"><?php print $title; ?></td>
       </tr>
       <tr class="region-message region-<?php print $region?>-message <?php print empty($block_listing[$region]) ? 'region-empty' : 'region-populated'; ?>">
         <td colspan="<?php print $throttle ? '6' : '5'; ?>"><em><?php print t('No blocks in this region'); ?></em></td>
       </tr>
-      <?php foreach ($block_listing[$region] as $delta => $data): ?>
-      <tr class="draggable <?php print $row % 2 == 0 ? 'odd' : 'even'; ?><?php print $data->row_class ? ' '. $data->row_class : ''; ?>">
+      <?php foreach ($block_listing[$region] as $delta => $data):
+?>
+      <tr class="draggable <?php print $row % 2 == 0 ? 'odd' : 'even'; ?>
+<?php print $data->row_class ? ' '. $data->row_class : ''; ?>">
         <td class="block"><?php print $data->block_title; ?></td>
         <td><?php print $data->region_select; ?></td>
         <td><?php print $data->weight_select; ?></td>
-        <?php if ($throttle): ?>
+        <?php if ($throttle):
+?>
           <td><?php print $data->throttle_check; ?></td>
         <?php endif; ?>
         <td><?php print $data->configure_link; ?></td>
         <td><?php print $data->delete_link; ?></td>
       </tr>
       <?php $row++; ?>
-      <?php endforeach; ?>
-    <?php endforeach; ?>
+
+<?php endforeach; ?>
+
+<?php endforeach; ?>
   </tbody>
 </table>
 
-<?php print $form_submit; ?>
+<?php print $form_submit; 
+
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.14
diff -u -p -r1.14 block.admin.inc
--- modules/block/block.admin.inc	22 Dec 2007 23:24:24 -0000	1.14
+++ modules/block/block.admin.inc	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: block.admin.inc,v 1.14 2007/12/22 23:24:24 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the block module.
@@ -55,11 +56,11 @@ function block_admin_display_form(&$form
       '#value' => $block['delta'],
     );
     $form[$key]['info'] = array(
-      '#value' => check_plain($block['info'])
+      '#value' => check_plain($block['info']),
     );
     $form[$key]['theme'] = array(
       '#type' => 'hidden',
-      '#value' => $theme_key
+      '#value' => $theme_key,
     );
     $form[$key]['weight'] = array(
       '#type' => 'weight',
@@ -186,7 +187,7 @@ function block_admin_configure(&$form_st
     '#options' => array(
       t('Users cannot control whether or not they see this block.'),
       t('Show this block by default, but let individual users hide it.'),
-      t('Hide this block by default but let individual users show it.')
+      t('Hide this block by default but let individual users show it.'),
     ),
     '#description' => t('Allow individual users to customize the visibility of this block in their account settings.'),
     '#default_value' => $edit['custom'],
@@ -322,9 +323,9 @@ function block_add_block_form_submit($fo
  * Menu callback; confirm deletion of custom blocks.
  */
 function block_box_delete(&$form_state, $bid = 0) {
-  $box = block_box_get($bid);
+  $box          = block_box_get($bid);
   $form['info'] = array('#type' => 'hidden', '#value' => $box['info'] ? $box['info'] : $box['title']);
-  $form['bid'] = array('#type' => 'hidden', '#value' => $bid);
+  $form['bid']  = array('#type' => 'hidden', '#value' => $bid);
 
   return confirm_form($form, t('Are you sure you want to delete the block %name?', array('%name' => $box['info'])), 'admin/build/block', '', t('Delete'), t('Cancel'));
 }
@@ -383,7 +384,7 @@ function template_preprocess_block_admin
 
       $variables['block_listing'][$region][$i]->row_class = isset($block['#attributes']['class']) ? $block['#attributes']['class'] : '';
       $variables['block_listing'][$region][$i]->block_modified = isset($block['#attributes']['class']) && strpos($block['#attributes']['class'], 'block-modified') !== FALSE ? TRUE : FALSE;
-      $variables['block_listing'][$region][$i]->block_title =  drupal_render($block['info']);
+      $variables['block_listing'][$region][$i]->block_title = drupal_render($block['info']);
       $variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']);
       $variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']);
       $variables['block_listing'][$region][$i]->throttle_check = $variables['throttle'] ? drupal_render($block['throttle']) : '';
@@ -397,3 +398,4 @@ function template_preprocess_block_admin
 
   $variables['form_submit'] = drupal_render($variables['form']);
 }
+
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.8
diff -u -p -r1.8 block.install
--- modules/block/block.install	18 Dec 2007 12:59:20 -0000	1.8
+++ modules/block/block.install	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: block.install,v 1.8 2007/12/18 12:59:20 dries Exp $
 
+
 /**
  * Implementation of hook_schema().
  */
@@ -114,7 +115,7 @@ function block_schema() {
         'not null' => TRUE,
         'description' => t("The block's origin module, from {blocks}.module."),
       ),
-      'delta'  => array(
+      'delta' => array(
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
@@ -130,7 +131,7 @@ function block_schema() {
     'primary key' => array(
       'module',
       'delta',
-      'rid'
+      'rid',
     ),
     'indexes' => array(
       'rid' => array('rid'),
@@ -142,7 +143,7 @@ function block_schema() {
     'fields' => array(
       'bid' => array(
         'type' => 'serial',
-  'unsigned' => TRUE,
+        'unsigned' => TRUE,
         'not null' => TRUE,
         'description' => t("The block's {blocks}.bid."),
       ),
@@ -165,7 +166,7 @@ function block_schema() {
         'not null' => TRUE,
         'default' => 0,
         'description' => t("Block body's {filter_formats}.format; for example, 1 = Filtered HTML."),
-      )
+      ),
     ),
     'unique keys' => array('info' => array('info')),
     'primary key' => array('bid'),
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.297
diff -u -p -r1.297 block.module
--- modules/block/block.module	24 Dec 2007 10:33:39 -0000	1.297
+++ modules/block/block.module	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: block.module,v 1.297 2007/12/24 10:33:39 goba Exp $
 
+
 /**
  * @file
  * Controls the boxes that are displayed around the main content.
@@ -80,6 +81,7 @@ function block_help($path, $arg) {
       $output .= '<li>'. t('some dynamic blocks, such as those generated by modules, will be displayed only on certain pages.') .'</li></ul>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@block">Block module</a>.', array('@block' => 'http://drupal.org/handbook/modules/block/')) .'</p>';
       return $output;
+
     case 'admin/build/block':
       $throttle = module_exists('throttle');
       $output = '<p>'. t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. To change the region or order of a block, grab a drag-and-drop handle under the <em>Block</em> column and drag the block to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page.') .'</p>';
@@ -88,6 +90,7 @@ function block_help($path, $arg) {
       }
       $output .= '<p>'. t('Click the <em>configure</em> link next to each block to configure its specific title and visibility settings. Use the <a href="@add-block">add block page</a> to create a custom block.', array('@add-block' => url('admin/build/block/add'))) .'</p>';
       return $output;
+
     case 'admin/build/block/add':
       return '<p>'. t('Use this page to create a new custom block. New blocks are disabled by default, and must be moved to a region on the <a href="@blocks">blocks administration page</a> to be visible.', array('@blocks' => url('admin/build/block'))) .'</p>';
   }
@@ -249,7 +252,7 @@ function _block_rehash() {
             // {block}.pages is type 'text', so it cannot have a
             // default value, and not null, so we need to provide
             // value if the module did not.
-            $block['pages']  = '';
+            $block['pages'] = '';
           }
           // Add defaults and save it into the database.
           drupal_write_record('blocks', $block);
@@ -344,8 +347,8 @@ function block_user($type, $edit, &$user
   switch ($type) {
     case 'form':
       if ($category == 'account') {
-        $rids = array_keys($user->roles);
-        $result = db_query("SELECT DISTINCT b.* FROM {blocks} b LEFT JOIN {blocks_roles} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom != 0 AND (r.rid IN (". db_placeholders($rids) .") OR r.rid IS NULL) ORDER BY b.weight, b.module", $rids);
+        $rids          = array_keys($user->roles);
+        $result        = db_query("SELECT DISTINCT b.* FROM {blocks} b LEFT JOIN {blocks_roles} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom != 0 AND (r.rid IN (". db_placeholders($rids) .") OR r.rid IS NULL) ORDER BY b.weight, b.module", $rids);
         $form['block'] = array('#type' => 'fieldset', '#title' => t('Block configuration'), '#weight' => 3, '#collapsible' => TRUE, '#tree' => TRUE);
         while ($block = db_fetch_object($result)) {
           $data = module_invoke($block->module, 'block', 'list');
@@ -359,8 +362,8 @@ function block_user($type, $edit, &$user
           return $form;
         }
       }
-
       break;
+
     case 'validate':
       if (empty($edit['block'])) {
         $edit['block'] = array();
@@ -488,6 +491,7 @@ function block_list($region) {
  * Theme and language contexts are automatically differenciated.
  *
  * @param $block
+ *
  * @return
  *   The string used as cache_id for the block.
  */
@@ -527,3 +531,4 @@ function _block_get_cache_id($block) {
     return implode(':', $cid_parts);
   }
 }
+
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.297
diff -u -p -r1.297 blog.module
--- modules/blog/blog.module	9 Jan 2008 09:51:34 -0000	1.297
+++ modules/blog/blog.module	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: blog.module,v 1.297 2008/01/09 09:51:34 goba Exp $
 
+
 /**
  * @file
  * Enables keeping an easily and regularly updated web page or a blog.
@@ -15,7 +16,7 @@ function blog_node_info() {
       'name' => t('Blog entry'),
       'module' => 'blog',
       'description' => t('A <em>blog entry</em> is a single post to an online journal, or <em>blog</em>.'),
-    )
+    ),
   );
 }
 
@@ -32,10 +33,12 @@ function blog_perm() {
 function blog_access($op, $node, $account) {
   switch ($op) {
     case 'create':
-      // Anonymous users cannot post even if they have the permission. 
+      // Anonymous users cannot post even if they have the permission.
       return user_access('create blog entries', $account) && $account->uid;
+
     case 'update':
       return user_access('edit any blog entry', $account) || (user_access('edit own blog entries', $account) && ($node->uid == $account->uid));
+
     case 'delete':
       return user_access('delete any blog entry', $account) || (user_access('delete own blog entries', $account) && ($node->uid == $account->uid));
   }
@@ -46,7 +49,7 @@ function blog_access($op, $node, $accoun
  */
 function blog_user($type, &$edit, &$user) {
   if ($type == 'view' && user_access('create blog entries', $user)) {
-    $user->content['summary']['blog'] =  array(
+    $user->content['summary']['blog'] = array(
       '#type' => 'user_profile_item',
       '#title' => t('Blog'),
       '#value' => l(t('View recent blog entries'), "blog/$user->uid", array('title' => t("Read @username's latest blog entries.", array('@username' => $user->name)))),
@@ -91,7 +94,6 @@ function blog_form(&$node) {
       // Note: $item->description has been validated on aggregation.
       $node->body = '<a href="'. check_url($item->link) .'">'. check_plain($item->title) .'</a> - <em>'. $item->description .'</em> [<a href="'. check_url($item->flink) .'">'. check_plain($item->ftitle) ."</a>]\n";
     }
-
   }
 
   $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => !empty($node->title) ? $node->title : NULL, '#weight' => -5);
@@ -121,7 +123,7 @@ function blog_link($type, $node = NULL, 
       $links['blog_usernames_blog'] = array(
         'title' => t("@username's blog", array('@username' => $node->name)),
         'href' => "blog/$node->uid",
-        'attributes' => array('title' => t("Read @username's latest blog entries.", array('@username' => $node->name)))
+        'attributes' => array('title' => t("Read @username's latest blog entries.", array('@username' => $node->name))),
       );
     }
   }
Index: modules/blog/blog.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v
retrieving revision 1.6
diff -u -p -r1.6 blog.pages.inc
--- modules/blog/blog.pages.inc	21 Jan 2008 12:05:36 -0000	1.6
+++ modules/blog/blog.pages.inc	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: blog.pages.inc,v 1.6 2008/01/21 12:05:36 goba Exp $
 
+
 /**
  * @file
  * Page callback file for the blog module.
@@ -58,9 +59,9 @@ function blog_page_last() {
  * Menu callback; displays an RSS feed containing recent blog entries of a given user.
  */
 function blog_feed_user($account) {
-  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10));
+  $result           = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10));
   $channel['title'] = $account->name ."'s blog";
-  $channel['link'] = url('blog/'. $account->uid, array('absolute' => TRUE));
+  $channel['link']  = url('blog/'. $account->uid, array('absolute' => TRUE));
 
   $items = array();
   while ($row = db_fetch_object($result)) {
@@ -73,9 +74,9 @@ function blog_feed_user($account) {
  * Menu callback; displays an RSS feed containing recent blog entries of all users.
  */
 function blog_feed_last() {
-  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
+  $result           = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
   $channel['title'] = variable_get('site_name', 'Drupal') .' blogs';
-  $channel['link'] = url('blog', array('absolute' => TRUE));
+  $channel['link']  = url('blog', array('absolute' => TRUE));
 
   $items = array();
   while ($row = db_fetch_object($result)) {
@@ -84,3 +85,4 @@ function blog_feed_last() {
 
   node_feed($items, $channel);
 }
+
Index: modules/blogapi/blogapi.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.install,v
retrieving revision 1.1
diff -u -p -r1.1 blogapi.install
--- modules/blogapi/blogapi.install	9 Jan 2008 09:51:34 -0000	1.1
+++ modules/blogapi/blogapi.install	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: blogapi.install,v 1.1 2008/01/09 09:51:34 goba Exp $
 
+
 /**
  * @defgroup updates-5.x-to-6.x Blog API updates from 5.x to 6.x
  * @{
@@ -18,3 +19,4 @@ function blogapi_update_6000() {
  * @} End of "defgroup updates-5.x-to-6.x"
  * The next series of updates should start at 7000.
  */
+
Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.115
diff -u -p -r1.115 blogapi.module
--- modules/blogapi/blogapi.module	18 Jan 2008 19:03:15 -0000	1.115
+++ modules/blogapi/blogapi.module	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: blogapi.module,v 1.115 2008/01/18 19:03:15 goba Exp $
 
+
 /**
  * @file
  * Enable users to post using applications that support XML-RPC blog APIs.
@@ -36,108 +37,128 @@ function blogapi_xmlrpc() {
       'blogger.getUsersBlogs',
       'blogapi_blogger_get_users_blogs',
       array('array', 'string', 'string', 'string'),
-      t('Returns a list of blogs to which an author has posting privileges.')),
+      t('Returns a list of blogs to which an author has posting privileges.'),
+    ),
     array(
       'blogger.getUserInfo',
       'blogapi_blogger_get_user_info',
       array('struct', 'string', 'string', 'string'),
-      t('Returns information about an author in the system.')),
+      t('Returns information about an author in the system.'),
+    ),
     array(
       'blogger.newPost',
       'blogapi_blogger_new_post',
       array('string', 'string', 'string', 'string', 'string', 'string', 'boolean'),
-      t('Creates a new post, and optionally publishes it.')),
+      t('Creates a new post, and optionally publishes it.'),
+    ),
     array(
       'blogger.editPost',
       'blogapi_blogger_edit_post',
       array('boolean', 'string', 'string', 'string', 'string', 'string', 'boolean'),
-      t('Updates the information about an existing post.')),
+      t('Updates the information about an existing post.'),
+    ),
     array(
       'blogger.getPost',
       'blogapi_blogger_get_post',
       array('struct', 'string', 'string', 'string', 'string'),
-      t('Returns information about a specific post.')),
+      t('Returns information about a specific post.'),
+    ),
     array(
       'blogger.deletePost',
       'blogapi_blogger_delete_post',
       array('boolean', 'string', 'string', 'string', 'string', 'boolean'),
-      t('Deletes a post.')),
+      t('Deletes a post.'),
+    ),
     array(
       'blogger.getRecentPosts',
       'blogapi_blogger_get_recent_posts',
       array('array', 'string', 'string', 'string', 'string', 'int'),
-      t('Returns a list of the most recent posts in the system.')),
+      t('Returns a list of the most recent posts in the system.'),
+    ),
     array(
       'metaWeblog.newPost',
       'blogapi_metaweblog_new_post',
       array('string', 'string', 'string', 'string', 'struct', 'boolean'),
-      t('Creates a new post, and optionally publishes it.')),
+      t('Creates a new post, and optionally publishes it.'),
+    ),
     array(
       'metaWeblog.editPost',
       'blogapi_metaweblog_edit_post',
       array('boolean', 'string', 'string', 'string', 'struct', 'boolean'),
-      t('Updates information about an existing post.')),
+      t('Updates information about an existing post.'),
+    ),
     array(
       'metaWeblog.getPost',
       'blogapi_metaweblog_get_post',
       array('struct', 'string', 'string', 'string'),
-      t('Returns information about a specific post.')),
+      t('Returns information about a specific post.'),
+    ),
     array(
       'metaWeblog.newMediaObject',
       'blogapi_metaweblog_new_media_object',
       array('string', 'string', 'string', 'string', 'struct'),
-      t('Uploads a file to your webserver.')),
+      t('Uploads a file to your webserver.'),
+    ),
     array(
       'metaWeblog.getCategories',
       'blogapi_metaweblog_get_category_list',
       array('struct', 'string', 'string', 'string'),
-      t('Returns a list of all categories to which the post is assigned.')),
+      t('Returns a list of all categories to which the post is assigned.'),
+    ),
     array(
       'metaWeblog.getRecentPosts',
       'blogapi_metaweblog_get_recent_posts',
       array('array', 'string', 'string', 'string', 'int'),
-      t('Returns a list of the most recent posts in the system.')),
+      t('Returns a list of the most recent posts in the system.'),
+    ),
     array(
       'mt.getRecentPostTitles',
       'blogapi_mt_get_recent_post_titles',
       array('array', 'string', 'string', 'string', 'int'),
-      t('Returns a bandwidth-friendly list of the most recent posts in the system.')),
+      t('Returns a bandwidth-friendly list of the most recent posts in the system.'),
+    ),
     array(
       'mt.getCategoryList',
       'blogapi_mt_get_category_list',
       array('array', 'string', 'string', 'string'),
-      t('Returns a list of all categories defined in the blog.')),
+      t('Returns a list of all categories defined in the blog.'),
+    ),
     array(
       'mt.getPostCategories',
       'blogapi_mt_get_post_categories',
       array('array', 'string', 'string', 'string'),
-      t('Returns a list of all categories to which the post is assigned.')),
+      t('Returns a list of all categories to which the post is assigned.'),
+    ),
     array(
       'mt.setPostCategories',
       'blogapi_mt_set_post_categories',
       array('boolean', 'string', 'string', 'string', 'array'),
-      t('Sets the categories for a post.')),
+      t('Sets the categories for a post.'),
+    ),
     array(
       'mt.supportedMethods',
       'xmlrpc_server_list_methods',
       array('array'),
-      t('Retrieve information about the XML-RPC methods supported by the server.')),
+      t('Retrieve information about the XML-RPC methods supported by the server.'),
+    ),
     array(
       'mt.supportedTextFilters',
       'blogapi_mt_supported_text_filters',
       array('array'),
-      t('Retrieve information about the text formatting plugins supported by the server.')),
+      t('Retrieve information about the text formatting plugins supported by the server.'),
+    ),
     array(
       'mt.publishPost',
       'blogap_mti_publish_post',
       array('boolean', 'string', 'string', 'string'),
-      t('Publish (rebuild) all of the static files related to an entry from your blog. Equivalent to saving an entry in the system (but without the ping).')));
+      t('Publish (rebuild) all of the static files related to an entry from your blog. Equivalent to saving an entry in the system (but without the ping).'),
+    ),
+  );
 }
 
 /**
  * Blogging API callback. Finds the URL of a user's blog.
  */
-
 function blogapi_blogger_get_users_blogs($appid, $username, $password) {
 
   $user = blogapi_validate_user($username, $password);
@@ -168,7 +189,8 @@ function blogapi_blogger_get_user_info($
       'firstname' => $name[0],
       'nickname' => $user->name,
       'email' => $user->mail,
-      'url' => url('blog/'. $user->uid, array('absolute' => TRUE)));
+      'url' => url('blog/'. $user->uid, array('absolute' => TRUE)),
+    );
   }
   else {
     return blogapi_error($user);
@@ -188,13 +210,13 @@ function blogapi_blogger_new_post($appke
   $edit['type'] = _blogapi_blogid($blogid);
   // get the node type defaults
   $node_type_default = variable_get('node_options_'. $edit['type'], array('status', 'promote'));
-  $edit['uid'] = $user->uid;
-  $edit['name'] = $user->name;
-  $edit['promote'] = in_array('promote', $node_type_default);
-  $edit['comment'] = variable_get('comment_'. $edit['type'], 2);
-  $edit['revision'] = in_array('revision', $node_type_default);
-  $edit['format'] = FILTER_FORMAT_DEFAULT;
-  $edit['status'] = $publish;
+  $edit['uid']       = $user->uid;
+  $edit['name']      = $user->name;
+  $edit['promote']   = in_array('promote', $node_type_default);
+  $edit['comment']   = variable_get('comment_'. $edit['type'], 2);
+  $edit['revision']  = in_array('revision', $node_type_default);
+  $edit['format']    = FILTER_FORMAT_DEFAULT;
+  $edit['status']    = $publish;
 
   // check for bloggerAPI vs. metaWeblogAPI
   if (is_array($content)) {
@@ -329,7 +351,7 @@ function blogapi_blogger_get_recent_post
 
   $type = _blogapi_blogid($blogid);
   if ($bodies) {
-    $result = db_query_range("SELECT n.nid, n.title, r.body, r.format, n.comment, n.created, u.name FROM {node} n, {node_revisions} r, {users} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC",  $type, $user->uid, 0, $number_of_posts);
+    $result = db_query_range("SELECT n.nid, n.title, r.body, r.format, n.comment, n.created, u.name FROM {node} n, {node_revisions} r, {users} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
   }
   else {
     $result = db_query_range("SELECT n.nid, n.title, n.created, u.name FROM {node} n, {users} u WHERE n.uid = u.uid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
@@ -376,14 +398,15 @@ function blogapi_metaweblog_new_media_ob
   // Return the successful result.
   return array('url' => file_create_url($file), 'struct');
 }
+
 /**
  * Blogging API callback. Returns a list of the taxonomy terms that can be
  * associated with a blog node.
  */
 function blogapi_metaweblog_get_category_list($blogid, $username, $password) {
-  $type = _blogapi_blogid($blogid);
+  $type         = _blogapi_blogid($blogid);
   $vocabularies = module_invoke('taxonomy', 'get_vocabularies', $type, 'vid');
-  $categories = array();
+  $categories   = array();
   if ($vocabularies) {
     foreach ($vocabularies as $vocabulary) {
       $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, -1);
@@ -421,8 +444,8 @@ function blogapi_mt_get_post_categories(
     return blogapi_error($user);
   }
 
-  $node = node_load($postid);
-  $terms = module_invoke('taxonomy', 'node_get_terms', $node, 'tid');
+  $node       = node_load($postid);
+  $terms      = module_invoke('taxonomy', 'node_get_terms', $node, 'tid');
   $categories = array();
   foreach ($terms as $term) {
     $term_name = $term->name;
@@ -463,9 +486,9 @@ function blogapi_mt_supported_text_filte
 
   $filters = array();
   foreach ($formats as $format) {
-    $filter['key'] = $format->format;
+    $filter['key']   = $format->format;
     $filter['label'] = $format->name;
-    $filters[] = $filter;
+    $filters[]       = $filter;
   }
 
   return $filters;
@@ -552,7 +575,7 @@ function blogapi_admin_settings() {
     '#required' => TRUE,
     '#default_value' => variable_get('blogapi_node_types', $defaults),
     '#options' => $node_types,
-    '#description' => t('Select the content types available to external blogging clients via Blog API. If supported, each enabled content type will be displayed as a separate "blog" by the external client.')
+    '#description' => t('Select the content types available to external blogging clients via Blog API. If supported, each enabled content type will be displayed as a separate "blog" by the external client.'),
   );
 
   return system_settings_form($form);
@@ -580,9 +603,10 @@ function blogapi_menu() {
 function blogapi_init() {
   if (drupal_is_front_page()) {
     drupal_add_link(array('rel' => 'EditURI',
-                          'type' => 'application/rsd+xml',
-                          'title' => t('RSD'),
-                          'href' => url('blogapi/rsd', array('absolute' => TRUE))));
+        'type' => 'application/rsd+xml',
+        'title' => t('RSD'),
+        'href' => url('blogapi/rsd', array('absolute' => TRUE)),
+      ));
   }
 }
 
@@ -591,8 +615,8 @@ function blogapi_rsd() {
 
   $xmlrpc = $base_url .'/xmlrpc.php';
   $base = url('', array('absolute' => TRUE));
-  $blogid = 1; # until we figure out how to handle multiple bloggers
-
+  # until we figure out how to handle multiple bloggers
+  $blogid = 1;
   drupal_set_header('Content-Type: application/rsd+xml; charset=utf-8');
   print <<<__RSD__
 <?xml version="1.0"?>
@@ -626,9 +650,11 @@ function _blogapi_mt_extra(&$node, $stru
       case 0:
         $node->comment = COMMENT_NODE_DISABLED;
         break;
+
       case 1:
         $node->comment = COMMENT_NODE_READ_WRITE;
         break;
+
       case 2:
         $node->comment = COMMENT_NODE_READ_ONLY;
         break;
@@ -706,4 +732,3 @@ function _blogapi_get_node_types() {
   return $types;
 }
 
-
Index: modules/book/book-all-books-block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book-all-books-block.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 book-all-books-block.tpl.php
--- modules/book/book-all-books-block.tpl.php	4 Nov 2007 14:29:09 -0000	1.1
+++ modules/book/book-all-books-block.tpl.php	21 Jan 2008 21:58:50 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book-all-books-block.tpl.php,v 1.1 2007/11/04 14:29:09 goba Exp $
 
+
 /**
  * @file book-all-books-block.tpl.php
  * Default theme implementation for rendering book outlines within a block.
@@ -15,8 +16,11 @@
  * @see template_preprocess_book_all_books_block()
  */
 ?>
-<?php foreach ($book_menus as $book_id => $menu) : ?>
+
+<?php foreach ($book_menus as $book_id => $menu):
+?>
 <div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
   <?php print $menu; ?>
 </div>
-<?php endforeach; ?>
+<?php endforeach; 
+
Index: modules/book/book-export-html.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book-export-html.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 book-export-html.tpl.php
--- modules/book/book-export-html.tpl.php	4 Nov 2007 14:29:09 -0000	1.1
+++ modules/book/book-export-html.tpl.php	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book-export-html.tpl.php,v 1.1 2007/11/04 14:29:09 goba Exp $
 
+
 /**
  * @file book-export-html.tpl.php
  * Default theme implementation for printed version of book outline.
@@ -24,30 +25,38 @@
     <?php print $head; ?>
     <base href="<?php print $base_url; ?>" />
     <link type="text/css" rel="stylesheet" href="misc/print.css" />
-    <?php if ($language_rtl): ?>
+    <?php if ($language_rtl):
+?>
       <link type="text/css" rel="stylesheet" href="misc/print-rtl.css" />
     <?php endif; ?>
   </head>
   <body>
     <?php
-    /**
-     * The given node is /embedded to its absolute depth in a top level
-     * section/. For example, a child node with depth 2 in the hierarchy is
-     * contained in (otherwise empty) &lt;div&gt; elements corresponding to
-     * depth 0 and depth 1. This is intended to support WYSIWYG output - e.g.,
-     * level 3 sections always look like level 3 sections, no matter their
-     * depth relative to the node selected to be exported as printer-friendly
-     * HTML.
-     */
-    $div_close = '';
-    ?>
-    <?php for ($i = 1; $i < $depth; $i++) : ?>
+
+/**
+ * The given node is /embedded to its absolute depth in a top level
+ * section/. For example, a child node with depth 2 in the hierarchy is
+ * contained in (otherwise empty) &lt;div&gt; elements corresponding to
+ * depth 0 and depth 1. This is intended to support WYSIWYG output - e.g.,
+ * level 3 sections always look like level 3 sections, no matter their
+ * depth relative to the node selected to be exported as printer-friendly
+ * HTML.
+ */
+$div_close = '';
+?>
+
+<?php for ($i = 1; $i < $depth; $i++):
+?>
       <div class="section-<?php print $i; ?>">
       <?php $div_close .= '</div>'; ?>
-    <?php endfor; ?>
 
-    <?php print $contents; ?>
-    <?php print $div_close; ?>
+<?php endfor; ?>
+
+
+<?php print $contents; ?>
+
+<?php print $div_close; ?>
 
   </body>
 </html>
+
Index: modules/book/book-navigation.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book-navigation.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 book-navigation.tpl.php
--- modules/book/book-navigation.tpl.php	4 Nov 2007 14:29:09 -0000	1.1
+++ modules/book/book-navigation.tpl.php	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book-navigation.tpl.php,v 1.1 2007/11/04 14:29:09 goba Exp $
 
+
 /**
  * @file book-navigation.tpl.php
  * Default theme implementation to navigate books. Presented under nodes that
@@ -30,23 +31,33 @@
  * @see template_preprocess_book_navigation()
  */
 ?>
-<?php if ($tree || $has_links): ?>
+
+<?php if ($tree || $has_links):
+?>
   <div id="book-navigation-<?php print $book_id; ?>" class="book-navigation">
     <?php print $tree; ?>
 
-    <?php if ($has_links): ?>
+
+<?php if ($has_links):
+?>
     <div class="page-links clear-block">
-      <?php if ($prev_url) : ?>
+      <?php if ($prev_url):
+?>
         <a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a>
       <?php endif; ?>
-      <?php if ($parent_url) : ?>
+
+<?php if ($parent_url):
+?>
         <a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
       <?php endif; ?>
-      <?php if ($next_url) : ?>
+
+<?php if ($next_url):
+?>
         <a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a>
       <?php endif; ?>
     </div>
     <?php endif; ?>
 
   </div>
-<?php endif; ?>
+<?php endif; 
+
Index: modules/book/book-node-export-html.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book-node-export-html.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 book-node-export-html.tpl.php
--- modules/book/book-node-export-html.tpl.php	4 Nov 2007 14:29:09 -0000	1.1
+++ modules/book/book-node-export-html.tpl.php	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book-node-export-html.tpl.php,v 1.1 2007/11/04 14:29:09 goba Exp $
 
+
 /**
  * @file book-node-export-html.tpl.php
  * Default theme implementation for rendering a single node in a printer
@@ -21,5 +22,7 @@
 <div id="node-<?php print $node->nid; ?>" class="section-<?php print $depth; ?>">
   <h1 class="book-heading"><?php print $title; ?></h1>
   <?php print $content; ?>
-  <?php print $children; ?>
+
+<?php print $children; ?>
 </div>
+
Index: modules/book/book.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v
retrieving revision 1.8
diff -u -p -r1.8 book.admin.inc
--- modules/book/book.admin.inc	8 Jan 2008 10:35:41 -0000	1.8
+++ modules/book/book.admin.inc	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book.admin.inc,v 1.8 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the book module.
@@ -33,7 +34,7 @@ function book_admin_settings() {
     '#title' => t('Allowed book outline types'),
     '#default_value' => variable_get('book_allowed_types', array('book')),
     '#options' => $types,
-    '#description' => t('Select content types which users with the %add-perm permission will be allowed to add to the book hierarchy. Users with the %outline-perm permission can add all content types.', array('%add-perm' => t('add content to books'),  '%outline-perm' => t('administer book outlines'))),
+    '#description' => t('Select content types which users with the %add-perm permission will be allowed to add to the book hierarchy. Users with the %outline-perm permission can add all content types.', array('%add-perm' => t('add content to books'), '%outline-perm' => t('administer book outlines'))),
     '#required' => TRUE,
   );
   $form['book_child_type'] = array(
@@ -70,10 +71,10 @@ function book_admin_settings_validate($f
  */
 function book_admin_edit($form_state, $node) {
   drupal_set_title(check_plain($node->title));
-  $form = array();
+  $form          = array();
   $form['#node'] = $node;
   $form['table'] = _book_admin_table($node);
-  $form['save'] = array(
+  $form['save']  = array(
     '#type' => 'submit',
     '#value' => t('Save book pages'),
   );
@@ -135,7 +136,8 @@ function _book_admin_table($node) {
   );
 
   $tree = book_menu_subtree_data($node->book);
-  $tree = array_shift($tree); // Do not include the book item itself.
+  // Do not include the book item itself.
+  $tree = array_shift($tree);
   if ($tree['below']) {
     _book_admin_table_tree($tree['below'], $form);
   }
@@ -195,9 +197,9 @@ function theme_book_admin_table($form) {
 
   $header = array(t('Title'), t('Weight'), t('Parent'), array('data' => t('Operations'), 'colspan' => '3'));
 
-  $rows = array();
+  $rows        = array();
   $destination = drupal_get_destination();
-  $access = user_access('administer nodes');
+  $access      = user_access('administer nodes');
   foreach (element_children($form) as $key) {
     $nid = $form[$key]['nid']['#value'];
     $href = $form[$key]['href']['#value'];
@@ -213,7 +215,7 @@ function theme_book_admin_table($form) {
       drupal_render($form[$key]['plid']) . drupal_render($form[$key]['mlid']),
       l(t('view'), $href),
       $access ? l(t('edit'), 'node/'. $nid .'/edit', array('query' => $destination)) : '&nbsp',
-      $access ? l(t('delete'), 'node/'. $nid .'/delete', array('query' => $destination) )  : '&nbsp',
+      $access ? l(t('delete'), 'node/'. $nid .'/delete', array('query' => $destination)) : '&nbsp',
     );
     $row = array('data' => $data);
     if (isset($form[$key]['#attributes'])) {
@@ -248,3 +250,4 @@ function _book_admin_compare($a, $b) {
   }
   return strncmp($a['link']['title'], $b['link']['title']);
 }
+
Index: modules/book/book.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.install,v
retrieving revision 1.20
diff -u -p -r1.20 book.install
--- modules/book/book.install	10 Jan 2008 18:13:42 -0000	1.20
+++ modules/book/book.install	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book.install,v 1.20 2008/01/10 18:13:42 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -64,8 +65,8 @@ function book_update_6000() {
 
     $schema['book'] = array(
       'fields' => array(
-        'mlid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-        'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+        'mlid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+        'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
         'bid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
       ),
       'primary key' => array('mlid'),
@@ -111,12 +112,12 @@ function book_update_6000() {
       // Temporary table for the old book hierarchy; we'll discard revision info.
       $schema['book_temp'] = array(
         'fields' => array(
-          'nid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+          'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
           'parent' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-          'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+          'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
         ),
         'indexes' => array(
-          'parent' => array('parent')
+          'parent' => array('parent'),
         ),
         'primary key' => array('nid'),
       );
@@ -149,7 +150,8 @@ function book_update_6000() {
   }
   elseif ($_SESSION['book_update_6000_orphans']) {
     // Do the first batched part of the update - collect orphans.
-    $update_count = 400; // Update this many at a time
+    // Update this many at a time
+    $update_count = 400;
 
     $result = db_query_range("SELECT * FROM {book_temp}", $_SESSION['book_update_6000_orphans']['from'], $update_count);
     $has_rows = FALSE;
@@ -187,7 +189,8 @@ function book_update_6000() {
   }
   else {
     // Do the next batched part of the update
-    $update_count = 100; // Update this many at a time
+    // Update this many at a time
+    $update_count = 100;
 
     while ($update_count && $_SESSION['book_update_6000']) {
       // Get the last node off the stack.
@@ -237,8 +240,8 @@ function book_update_6000() {
 
   if (empty($_SESSION['book_update_6000'])) {
     $ret['#finished'] = TRUE;
-    $ret[] = array('success' => TRUE, 'query' => 'Relocated existing book pages.');
-    $ret[] = update_sql("DROP TABLE {book_temp}");
+    $ret[]            = array('success' => TRUE, 'query' => 'Relocated existing book pages.');
+    $ret[]            = update_sql("DROP TABLE {book_temp}");
     unset($_SESSION['book_update_6000']);
     unset($_SESSION['book_update_6000_orphans']);
   }
@@ -251,7 +254,7 @@ function book_update_6000() {
  */
 function book_schema() {
   $schema['book'] = array(
-  'description' => t('Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}'),
+    'description' => t('Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}'),
     'fields' => array(
       'mlid' => array(
         'type' => 'int',
@@ -287,4 +290,3 @@ function book_schema() {
   return $schema;
 }
 
-
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.454
diff -u -p -r1.454 book.module
--- modules/book/book.module	8 Jan 2008 10:35:41 -0000	1.454
+++ modules/book/book.module	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book.module,v 1.454 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Allows users to structure the pages of a site in a hierarchy or outline.
@@ -63,7 +64,7 @@ function book_link($type, $node = NULL, 
         $links['book_printer'] = array(
           'title' => t('Printer-friendly version'),
           'href' => 'book/export/html/'. $node->nid,
-          'attributes' => array('title' => t('Show a printer-friendly version of this book page and its sub-pages.'))
+          'attributes' => array('title' => t('Show a printer-friendly version of this book page and its sub-pages.')),
         );
       }
     }
@@ -180,6 +181,7 @@ function book_block($op = 'list', $delta
       $block[0]['info'] = t('Book navigation');
       $block[0]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
       return $block;
+
     case 'view':
       $current_bid = 0;
       if ($node = menu_get_object()) {
@@ -187,8 +189,8 @@ function book_block($op = 'list', $delta
       }
       if (variable_get('book_block_mode', 'all pages') == 'all pages') {
         $block['subject'] = t('Book navigation');
-        $book_menus = array();
-        $pseudo_tree = array(0 => array('below' => FALSE));
+        $book_menus       = array();
+        $pseudo_tree      = array(0 => array('below' => FALSE));
         foreach (book_get_books() as $book_id => $book) {
           if ($book['bid'] == $current_bid) {
             // If the current page is a node associated with a book, the menu
@@ -212,12 +214,13 @@ function book_block($op = 'list', $delta
         if ($title) {
           $tree = menu_tree_all_data($node->book['menu_name'], $node->book);
           // There should only be one element at the top level.
-          $data = array_shift($tree);
+          $data             = array_shift($tree);
           $block['subject'] = theme('book_title_link', $data['link']);
           $block['content'] = ($data['below']) ? menu_tree_output($data['below']) : '';
         }
       }
       return $block;
+
     case 'configure':
       $options = array(
         'all pages' => t('Show block on all pages'),
@@ -229,8 +232,9 @@ function book_block($op = 'list', $delta
         '#options' => $options,
         '#default_value' => variable_get('book_block_mode', 'all pages'),
         '#description' => t("If <em>Show block on all pages</em> is selected, the block will contain the automatically generated menus for all of the site's books. If <em>Show block only on book pages</em> is selected, the block will contain only the one menu corresponding to the current page's book. In this case, if the current page is not in a book, no block will be displayed. The <em>Page specific visibility settings</em> or other visibility settings can be used in addition to selectively display this block."),
-        );
+      );
       return $form;
+
     case 'save':
       variable_set('book_block_mode', $edit['book_block_mode']);
       break;
@@ -243,7 +247,7 @@ function book_block($op = 'list', $delta
  * @ingroup themeable
  */
 function theme_book_title_link($link) {
-  $link['options']['attributes']['class'] =  'book-title';
+  $link['options']['attributes']['class'] = 'book-title';
   return l($link['title'], $link['href'], $link['options']);
 }
 
@@ -258,8 +262,8 @@ function book_get_books() {
 
   if (!isset($all_books)) {
     $all_books = array();
-    $result = db_query("SELECT DISTINCT(bid) FROM {book}");
-    $nids = array();
+    $result    = db_query("SELECT DISTINCT(bid) FROM {book}");
+    $nids      = array();
     while ($book = db_fetch_array($result)) {
       $nids[] = $book['bid'];
     }
@@ -300,11 +304,11 @@ function book_form_alter(&$form, $form_s
       $form['book']['pick-book'] = array(
         '#type' => 'submit',
         '#value' => t('Change book (update list of parents)'),
-         // Submit the node form so the parent select options get updated.
-         // This is typically only used when JS is disabled.  Since the parent options
-         // won't be changed via AJAX, a button is provided in the node form to submit
-         // the form and generate options in the parent select corresponding to the
-         // selected book.  This is similar to what happens during a node preview.
+        // Submit the node form so the parent select options get updated.
+        // This is typically only used when JS is disabled.  Since the parent options
+        // won't be changed via AJAX, a button is provided in the node form to submit
+        // the form and generate options in the parent select corresponding to the
+        // selected book.  This is similar to what happens during a node preview.
         '#submit' => array('node_form_submit_build_node'),
         '#weight' => 20,
       );
@@ -362,718 +366,734 @@ function _book_parent_select($book_link)
 function _book_add_form_elements(&$form, $node) {
   // Need this for AJAX.
   $form['#cache'] = TRUE;
-  drupal_add_js("if (Drupal.jsEnabled) { $(document).ready(function() { $('#edit-book-pick-book').css('display', 'none'); }); }", 'inline');
-
-  $form['book'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Book outline'),
-    '#weight' => 10,
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#tree' => TRUE,
-    '#attributes' => array('class' => 'book-outline-form'),
-  );
-  foreach (array('menu_name', 'mlid', 'nid', 'router_path', 'has_children', 'options', 'module', 'original_bid', 'parent_depth_limit') as $key) {
-    $form['book'][$key] = array(
-      '#type' => 'value',
-      '#value' => $node->book[$key],
-    );
-  }
-
-  $form['book']['plid'] = _book_parent_select($node->book);
-
-  $form['book']['weight'] = array(
-    '#type' => 'weight',
-    '#title' => t('Weight'),
-    '#default_value' => $node->book['weight'],
-    '#delta' => 15,
-    '#weight' => 5,
-    '#description' => t('Pages at a given level are ordered first by weight and then by title.'),
-  );
-  $options = array();
-  $nid = isset($node->nid) ? $node->nid : 'new';
-
-  if (isset($node->nid) && ($nid == $node->book['original_bid']) && ($node->book['parent_depth_limit'] == 0)) {
-    // This is the top level node in a maximum depth book and thus cannot be moved.
-    $options[$node->nid] = $node->title;
-  }
-  else {
-    foreach (book_get_books() as $book) {
-      $options[$book['nid']] = $book['title'];
-    }
-  }
-
-  if (user_access('create new books') && ($nid == 'new' || ($nid != $node->book['original_bid']))) {
-    // The node can become a new book, if it is not one already.
-    $options = array($nid => '<'. t('create a new book') .'>') + $options;
-  }
-  if (!$node->book['mlid']) {
-    // The node is not currently in a the hierarchy.
-    $options = array(0 => '<'. t('none') .'>') + $options;
-  }
-
-  // Add a drop-down to select the destination book.
-  $form['book']['bid'] = array(
-    '#type' => 'select',
-    '#title' => t('Book'),
-    '#default_value' => $node->book['bid'],
-    '#options' => $options,
-    '#access' => (bool)$options,
-    '#description' => t('Your page will be a part of the selected book.'),
-    '#weight' => -5,
-    '#attributes' => array('class' => 'book-title-select'),
-    '#ahah' => array(
-      'path' => 'book/js/form',
-      'wrapper' => 'edit-book-plid-wrapper',
-      'effect' => 'slide',
-    ),
-  );
-}
-
-/**
- * Common helper function to handles additions and updates to the book outline.
- *
- * Performs all additions and updates to the book outline through node addition,
- * node editing, node deletion, or the outline tab.
- */
-function _book_update_outline(&$node) {
-  if (empty($node->book['bid'])) {
-    return FALSE;
-  }
-  $new = empty($node->book['mlid']);
-
-  $node->book['link_path'] = 'node/'. $node->nid;
-  $node->book['link_title'] = $node->title;
-  $node->book['parent_mismatch'] = FALSE; // The normal case.
-
-  if ($node->book['bid'] == $node->nid) {
-    $node->book['plid'] = 0;
-    $node->book['menu_name'] = book_menu_name($node->nid);
-  }
-  else {
-    // Check in case the parent is not is this book; the book takes precedence.
-    if (!empty($node->book['plid'])) {
-      $parent = db_fetch_array(db_query("SELECT * FROM {book} WHERE mlid = %d", $node->book['plid']));
-    }
-    if (empty($node->book['plid']) || !$parent || $parent['bid'] != $node->book['bid']) {
-      $node->book['plid'] = db_result(db_query("SELECT mlid FROM {book} WHERE nid = %d", $node->book['bid']));
-      $node->book['parent_mismatch'] = TRUE; // Likely when JS is disabled.
-    }
-  }
-  if (menu_link_save($node->book)) {
-    if ($new) {
-      // Insert new.
-      db_query("INSERT INTO {book} (nid, mlid, bid) VALUES (%d, %d, %d)", $node->nid, $node->book['mlid'], $node->book['bid']);
-    }
-    else {
-      if ($node->book['bid'] != db_result(db_query("SELECT bid FROM {book} WHERE nid = %d", $node->nid))) {
-        // Update the bid for this page and all children.
-        book_update_bid($node->book);
+  drupal_add_js("if (Drupal.jsEnabled) {
+     $(document).ready(function() {
+       $('#edit-book-pick-book').css('display', 'none'); }); }", 'inline');
+
+      $form['book'] = array(
+        '#type' => 'fieldset',
+        '#title' => t('Book outline'),
+        '#weight' => 10,
+        '#collapsible' => TRUE,
+        '#collapsed' => TRUE,
+        '#tree' => TRUE,
+        '#attributes' => array('class' => 'book-outline-form'),
+      );
+      foreach (array('menu_name', 'mlid', 'nid', 'router_path', 'has_children', 'options', 'module', 'original_bid', 'parent_depth_limit') as $key) {
+        $form['book'][$key] = array(
+          '#type' => 'value',
+          '#value' => $node->book[$key],
+        );
       }
-    }
-    return TRUE;
-  }
-  // Failed to save the menu link
-  return FALSE;
-}
-
-/**
- * Update the bid for a page and its children when it is moved to a new book.
- *
- * @param $book_link
- *   A fully loaded menu link that is part of the book hierarchy.
- */
-function book_update_bid($book_link) {
-
-  for ($i = 1; $i <= MENU_MAX_DEPTH && $book_link["p$i"]; $i++) {
-    $match[] = "p$i = %d";
-    $args[] = $book_link["p$i"];
-  }
-  $result = db_query("SELECT mlid FROM {menu_links} WHERE ". implode(' AND ', $match), $args);
-
-  $mlids = array();
-  while ($a = db_fetch_array($result)) {
-    $mlids[] = $a['mlid'];
-  }
-  if ($mlids) {
-    db_query("UPDATE {book} SET bid = %d WHERE mlid IN (". implode(',', $mlids) .")", $book_link['bid']);
-  }
-}
 
-/**
- * Get the book menu tree for a page, and return it as a linear array.
- *
- * @param $book_link
- *   A fully loaded menu link that is part of the book hierarchy.
- * @return
- *   A linear array of menu links in the order that the links are shown in the
- *   menu, so the previous and next pages are the elements before and after the
- *   element corresponding to $node.  The children of $node (if any) will come
- *   immediately after it in the array.
- */
-function book_get_flat_menu($book_link) {
-  static $flat = array();
+      $form['book']['plid'] = _book_parent_select($node->book);
 
-  if (!isset($flat[$book_link['mlid']])) {
-    // Call menu_tree_full_data() to take advantage of the menu system's caching.
-    $tree = menu_tree_all_data($book_link['menu_name'], $book_link);
-    $flat[$book_link['mlid']] = array();
-    _book_flatten_menu($tree, $flat[$book_link['mlid']]);
-  }
-  return $flat[$book_link['mlid']];
-}
+      $form['book']['weight'] = array(
+        '#type' => 'weight',
+        '#title' => t('Weight'),
+        '#default_value' => $node->book['weight'],
+        '#delta' => 15,
+        '#weight' => 5,
+        '#description' => t('Pages at a given level are ordered first by weight and then by title.'),
+      );
+      $options = array();
+      $nid = isset($node->nid) ? $node->nid : 'new';
 
-/**
- * Recursive helper function for book_get_flat_menu().
- */
-function _book_flatten_menu($tree, &$flat) {
-  foreach ($tree as $data) {
-    if (!$data['link']['hidden']) {
-      $flat[$data['link']['mlid']] = $data['link'];
-      if ($data['below']) {
-        _book_flatten_menu($data['below'], $flat);
+      if (isset($node->nid) && ($nid == $node->book['original_bid']) && ($node->book['parent_depth_limit'] == 0)) {
+        // This is the top level node in a maximum depth book and thus cannot be moved.
+        $options[$node->nid] = $node->title;
       }
-    }
-  }
-}
-
-/**
- * Fetches the menu link for the previous page of the book.
- */
-function book_prev($book_link) {
-  // If the parent is zero, we are at the start of a book.
-  if ($book_link['plid'] == 0) {
-    return NULL;
-  }
-  $flat = book_get_flat_menu($book_link);
-  // Assigning the array to $flat resets the array pointer for use with each().
-  $curr = NULL;
-  do {
-    $prev = $curr;
-    list($key, $curr) = each($flat);
-  } while ($key && $key != $book_link['mlid']);
-
-  if ($key == $book_link['mlid']) {
-    // The previous page in the book may be a child of the previous visible link.
-    if ($prev['depth'] == $book_link['depth'] && $prev['has_children']) {
-      // The subtree will have only one link at the top level - get its data.
-      $data = array_shift(book_menu_subtree_data($prev));
-      // The link of interest is the last child - iterate to find the deepest one.
-      while ($data['below']) {
-        $data = end($data['below']);
+      else {
+        foreach (book_get_books() as $book) {
+          $options[$book['nid']] = $book['title'];
+        }
       }
-      return $data['link'];
-    }
-    else {
-      return $prev;
-    }
-  }
-}
 
-/**
- * Fetches the menu link for the next page of the book.
- */
-function book_next($book_link) {
-  $flat = book_get_flat_menu($book_link);
-  // Assigning the array to $flat resets the array pointer for use with each().
-  do {
-    list($key, $curr) = each($flat);
-  } while ($key && $key != $book_link['mlid']);
-  if ($key == $book_link['mlid']) {
-    return current($flat);
-  }
-}
-
-/**
- * Format the menu links for the child pages of the current page.
- */
-function book_children($book_link) {
-  $flat = book_get_flat_menu($book_link);
-
-  $children = array();
+      if (user_access('create new books') && ($nid == 'new' || ($nid != $node->book['original_bid']))) {
+        // The node can become a new book, if it is not one already.
+        $options = array($nid => '<'. t('create a new book') .'>') + $options;
+      }
+      if (!$node->book['mlid']) {
+        // The node is not currently in a the hierarchy.
+        $options = array(0 => '<'. t('none') .'>') + $options;
+      }
 
-  if ($book_link['has_children']) {
-    // Walk through the array until we find the current page.
-    do {
-      $link = array_shift($flat);
-    } while ($link && ($link['mlid'] != $book_link['mlid']));
-    // Continue though the array and collect the links whose parent is this page.
-    while (($link = array_shift($flat)) && $link['plid'] == $book_link['mlid']) {
-      $data['link'] = $link;
-      $data['below'] = '';
-      $children[] = $data;
+      // Add a drop-down to select the destination book.
+      $form['book']['bid'] = array(
+        '#type' => 'select',
+        '#title' => t('Book'),
+        '#default_value' => $node->book['bid'],
+        '#options' => $options,
+        '#access' => (bool)$options,
+        '#description' => t('Your page will be a part of the selected book.'),
+        '#weight' => -5,
+        '#attributes' => array('class' => 'book-title-select'),
+        '#ahah' => array(
+          'path' => 'book/js/form',
+          'wrapper' => 'edit-book-plid-wrapper',
+          'effect' => 'slide',
+        ),
+      );
     }
-  }
-  return $children ? menu_tree_output($children) : '';
-}
-
-/**
- * Generate the corresponding menu name from a book ID.
- */
-function book_menu_name($bid) {
-  return 'book-toc-'. $bid;
-}
 
-/**
- * Build an active trail to show in the breadcrumb.
- */
-function book_build_active_trail($book_link) {
-  static $trail;
-
-  if (!isset($trail)) {
-    $trail = array();
-    $trail[] = array('title' => t('Home'), 'href' => '<front>', 'options' => array());
-
-    $tree = menu_tree_all_data($book_link['menu_name'], $book_link);
-    $curr = array_shift($tree);
-
-    while ($curr) {
-      if ($curr['link']['href'] == $book_link['href']) {
-        $trail[] = $curr['link'];
-        $curr = FALSE;
+    /**
+     * Common helper function to handles additions and updates to the book outline.
+     *
+     * Performs all additions and updates to the book outline through node addition,
+     * node editing, node deletion, or the outline tab.
+     */
+    function _book_update_outline(&$node) {
+      if (empty($node->book['bid'])) {
+        return FALSE;
+      }
+      $new = empty($node->book['mlid']);
+
+      $node->book['link_path'] = 'node/'. $node->nid;
+      $node->book['link_title'] = $node->title;
+      // The normal case.
+      $node->book['parent_mismatch'] = FALSE;
+
+      if ($node->book['bid'] == $node->nid) {
+        $node->book['plid'] = 0;
+        $node->book['menu_name'] = book_menu_name($node->nid);
       }
       else {
-        if ($curr['below'] && $curr['link']['in_active_trail']) {
-          $trail[] = $curr['link'];
-          $tree = $curr['below'];
+        // Check in case the parent is not is this book; the book takes precedence.
+        if (!empty($node->book['plid'])) {
+          $parent = db_fetch_array(db_query("SELECT * FROM {book} WHERE mlid = %d", $node->book['plid']));
+        }
+        if (empty($node->book['plid']) || !$parent || $parent['bid'] != $node->book['bid']) {
+          $node->book['plid'] = db_result(db_query("SELECT mlid FROM {book} WHERE nid = %d", $node->book['bid']));
+          // Likely when JS is disabled.
+          $node->book['parent_mismatch'] = TRUE;
         }
-        $curr = array_shift($tree);
-      }
-    }
-  }
-  return $trail;
-}
-
-/**
- * Implementation of hook_nodeapi().
- *
- * Appends book navigation to all nodes in the book, and handles book outline
- * insertions and updates via the node form.
- */
-function book_nodeapi(&$node, $op, $teaser, $page) {
-  switch ($op) {
-    case 'load':
-      // Note - we cannot use book_link_load() because it will call node_load()
-      $info['book'] = db_fetch_array(db_query('SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $node->nid));
-      if ($info['book']) {
-        $info['book']['href'] = $info['book']['link_path'];
-        $info['book']['title'] = $info['book']['link_title'];
-        $info['book']['options'] = unserialize($info['book']['options']);
-        return $info;
       }
-      break;
-    case 'view':
-    if (!$teaser) {
-        if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) {
-
-          $node->content['book_navigation'] = array(
-            '#value' => theme('book_navigation', $node->book),
-            '#weight' => 100,
-          );
-
-          if ($page) {
-            menu_set_active_trail(book_build_active_trail($node->book));
-            menu_set_active_menu_name($node->book['menu_name']);
+      if (menu_link_save($node->book)) {
+        if ($new) {
+          // Insert new.
+          db_query("INSERT INTO {book} (nid, mlid, bid) VALUES (%d, %d, %d)", $node->nid, $node->book['mlid'], $node->book['bid']);
+        }
+        else {
+          if ($node->book['bid'] != db_result(db_query("SELECT bid FROM {book} WHERE nid = %d", $node->nid))) {
+            // Update the bid for this page and all children.
+            book_update_bid($node->book);
           }
         }
+        return TRUE;
       }
-      break;
-    case 'presave':
-      // Always save a revision for non-administrators.
-      if (!empty($node->book['bid']) && !user_access('administer nodes')) {
-        $node->revision = 1;
+      // Failed to save the menu link
+      return FALSE;
+    }
+
+    /**
+     * Update the bid for a page and its children when it is moved to a new book.
+     *
+     * @param $book_link
+     *   A fully loaded menu link that is part of the book hierarchy.
+     */
+    function book_update_bid($book_link) {
+
+      for ($i = 1; $i <= MENU_MAX_DEPTH && $book_link["p$i"]; $i++) {
+        $match[] = "p$i = %d";
+        $args[] = $book_link["p$i"];
       }
-      break;
-    case 'insert':
-    case 'update':
-      if (!empty($node->book['bid'])) {
-        if ($node->book['bid'] == 'new') {
-          // New nodes that are their own book.
-          $node->book['bid'] = $node->nid;
-        }
-        $node->book['nid'] = $node->nid;
-        $node->book['menu_name'] = book_menu_name($node->book['bid']);
-        _book_update_outline($node);
+      $result = db_query("SELECT mlid FROM {menu_links} WHERE ". implode(' AND ', $match), $args);
+
+      $mlids = array();
+      while ($a = db_fetch_array($result)) {
+        $mlids[] = $a['mlid'];
+      }
+      if ($mlids) {
+        db_query("UPDATE {book} SET bid = %d WHERE mlid IN (". implode(',', $mlids) .")", $book_link['bid']);
       }
-      break;
-    case 'delete':
-      if (!empty($node->book['bid'])) {
-        if ($node->nid == $node->book['bid']) {
-          // Handle deletion of a top-level post.
-          $result = db_query("SELECT b.nid FROM {menu_links} ml INNER JOIN {book} b on b.mlid = ml.mlid WHERE ml.plid = %d", $node->book['mlid']);
-          while ($child = db_fetch_array($result)) {
-            $child_node = node_load($child['nid']);
-            $child_node->book['bid'] = $child_node->nid;
-            _book_update_outline($child_node);
+    }
+
+    /**
+     * Get the book menu tree for a page, and return it as a linear array.
+     *
+     * @param $book_link
+     *   A fully loaded menu link that is part of the book hierarchy.
+     *
+     * @return
+     *   A linear array of menu links in the order that the links are shown in the
+     *   menu, so the previous and next pages are the elements before and after the
+     *   element corresponding to $node.  The children of $node (if any) will come
+     *   immediately after it in the array.
+     */
+    function book_get_flat_menu($book_link) {
+      static $flat = array();
+
+      if (!isset($flat[$book_link['mlid']])) {
+        // Call menu_tree_full_data() to take advantage of the menu system's caching.
+        $tree = menu_tree_all_data($book_link['menu_name'], $book_link);
+        $flat[$book_link['mlid']] = array();
+        _book_flatten_menu($tree, $flat[$book_link['mlid']]);
+      }
+      return $flat[$book_link['mlid']];
+    }
+
+    /**
+     * Recursive helper function for book_get_flat_menu().
+     */
+    function _book_flatten_menu($tree, &$flat) {
+      foreach ($tree as $data) {
+        if (!$data['link']['hidden']) {
+          $flat[$data['link']['mlid']] = $data['link'];
+          if ($data['below']) {
+            _book_flatten_menu($data['below'], $flat);
           }
         }
-        menu_link_delete($node->book['mlid']);
-        db_query('DELETE FROM {book} WHERE mlid = %d', $node->book['mlid']);
       }
-      break;
-    case 'prepare':
-      // Prepare defaults for the add/edit form.
-      if (empty($node->book) && (user_access('add content to books') || user_access('administer book outlines'))) {
-        $node->book = array();
-        if (empty($node->nid) && isset($_GET['parent']) && is_numeric($_GET['parent'])) {
-          // Handle "Add child page" links:
-          $parent = book_link_load($_GET['parent']);
-          if ($parent && $parent['access']) {
-            $node->book['bid'] = $parent['bid'];
-            $node->book['plid'] = $parent['mlid'];
-            $node->book['menu_name'] = $parent['menu_name'];
+    }
+
+    /**
+     * Fetches the menu link for the previous page of the book.
+     */
+    function book_prev($book_link) {
+      // If the parent is zero, we are at the start of a book.
+      if ($book_link['plid'] == 0) {
+        return NULL;
+      }
+      $flat = book_get_flat_menu($book_link);
+      // Assigning the array to $flat resets the array pointer for use with each().
+      $curr = NULL;
+      do {
+        $prev = $curr;
+        list($key, $curr) = each($flat);
+      } while ($key && $key != $book_link['mlid']);
+
+      if ($key == $book_link['mlid']) {
+        // The previous page in the book may be a child of the previous visible link.
+        if ($prev['depth'] == $book_link['depth'] && $prev['has_children']) {
+          // The subtree will have only one link at the top level - get its data.
+          $data = array_shift(book_menu_subtree_data($prev));
+          // The link of interest is the last child - iterate to find the deepest one.
+          while ($data['below']) {
+            $data = end($data['below']);
           }
+          return $data['link'];
         }
-        // Set defaults.
-        $node->book += _book_link_defaults(!empty($node->nid) ? $node->nid : 'new');
-      }
-      else {
-        if (isset($node->book['bid']) && !isset($node->book['original_bid'])) {
-          $node->book['original_bid'] = $node->book['bid'];
+        else {
+          return $prev;
         }
       }
-      // Find the depth limit for the parent select.
-      if (isset($node->book['bid']) && !isset($node->book['parent_depth_limit'])) {
-        $node->book['parent_depth_limit'] = _book_parent_depth_limit($node->book);
-      }
-      break;
-  }
-}
-
-/**
- * Find the depth limit for items in the parent select.
- */
-function _book_parent_depth_limit($book_link) {
-  return MENU_MAX_DEPTH - 1 - (($book_link['mlid'] && $book_link['has_children']) ? menu_link_children_relative_depth($book_link) : 0);
-}
-
-/**
- * Form altering function for the confirm form for a single node deletion.
- */
-function book_form_node_delete_confirm_alter(&$form, $form_state) {
+    }
 
-  $node = node_load($form['nid']['#value']);
+    /**
+     * Fetches the menu link for the next page of the book.
+     */
+    function book_next($book_link) {
+      $flat = book_get_flat_menu($book_link);
+      // Assigning the array to $flat resets the array pointer for use with each().
+      do {
+        list($key, $curr) = each($flat);
+      } while ($key && $key != $book_link['mlid']);
+      if ($key == $book_link['mlid']) {
+        return current($flat);
+      }
+    }
 
-  if (isset($node->book) && $node->book['has_children']) {
-    $form['book_warning'] = array(
-      '#value' => '<p>'. t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) .'</p>',
-      '#weight' => -10,
-    );
-  }
-}
+    /**
+     * Format the menu links for the child pages of the current page.
+     */
+    function book_children($book_link) {
+      $flat = book_get_flat_menu($book_link);
+
+      $children = array();
+
+      if ($book_link['has_children']) {
+        // Walk through the array until we find the current page.
+        do {
+          $link = array_shift($flat);
+        } while ($link && ($link['mlid'] != $book_link['mlid']));
+        // Continue though the array and collect the links whose parent is this page.
+        while (($link = array_shift($flat)) && $link['plid'] == $book_link['mlid']) {
+          $data['link']  = $link;
+          $data['below'] = '';
+          $children[]    = $data;
+        }
+      }
+      return $children ? menu_tree_output($children) : '';
+    }
 
-/**
- * Return an array with default values for a book link.
- */
-function _book_link_defaults($nid) {
-  return array('original_bid' => 0, 'menu_name' => '', 'nid' => $nid, 'bid' => 0, 'router_path' => 'node/%', 'plid' => 0, 'mlid' => 0, 'has_children' => 0, 'weight' => 0, 'module' => 'book', 'options' => array());
-}
+    /**
+     * Generate the corresponding menu name from a book ID.
+     */
+    function book_menu_name($bid) {
+      return 'book-toc-'. $bid;
+    }
 
-/**
- * Process variables for book-navigation.tpl.php.
- *
- * The $variables array contains the following arguments:
- * - $book_link
- *
- * @see book-navigation.tpl.php
- */
-function template_preprocess_book_navigation(&$variables) {
-  $book_link = $variables['book_link'];
+    /**
+     * Build an active trail to show in the breadcrumb.
+     */
+    function book_build_active_trail($book_link) {
+      static $trail;
 
-  // Provide extra variables for themers. Not needed by default.
-  $variables['book_id'] = $book_link['bid'];
-  $variables['book_title'] = check_plain($book_link['link_title']);
-  $variables['book_url'] = 'node/'. $book_link['bid'];
-  $variables['current_depth'] = $book_link['depth'];
-
-  $variables['tree'] = '';
-  if ($book_link['mlid']) {
-    $variables['tree'] = book_children($book_link);
-
-    if ($prev = book_prev($book_link)) {
-      $prev_href = url($prev['href']);
-      drupal_add_link(array('rel' => 'prev', 'href' => $prev_href));
-      $variables['prev_url'] = $prev_href;
-      $variables['prev_title'] = check_plain($prev['title']);
-    }
-    if ($book_link['plid'] && $parent = book_link_load($book_link['plid'])) {
-      $parent_href = url($parent['href']);
-      drupal_add_link(array('rel' => 'up', 'href' => $parent_href));
-      $variables['parent_url'] = $parent_href;
-      $variables['parent_title'] = check_plain($parent['title']);
-    }
-    if ($next = book_next($book_link)) {
-      $next_href = url($next['href']);
-      drupal_add_link(array('rel' => 'next', 'href' => $next_href));
-      $variables['next_url'] = $next_href;
-      $variables['next_title'] = check_plain($next['title']);
-    }
-  }
+      if (!isset($trail)) {
+        $trail = array();
+        $trail[] = array('title' => t('Home'), 'href' => '<front>', 'options' => array());
 
-  $variables['has_links'] = FALSE;
-  // Link variables to filter for values and set state of the flag variable.
-  $links = array('prev_url', 'prev_title', 'parent_url', 'parent_title', 'next_url', 'next_title');
-  foreach ($links as $link) {
-    if (isset($variables[$link])) {
-      // Flag when there is a value.
-      $variables['has_links'] = TRUE;
-    }
-    else {
-      // Set empty to prevent notices.
-      $variables[$link] = '';
-    }
-  }
-}
+        $tree = menu_tree_all_data($book_link['menu_name'], $book_link);
+        $curr = array_shift($tree);
 
-/**
- * A recursive helper function for book_toc().
- */
-function _book_toc_recurse($tree, $indent, &$toc, $exclude, $depth_limit) {
-  foreach ($tree as $data) {
-    if ($data['link']['depth'] > $depth_limit) {
-      // Don't iterate through any links on this level.
-      break;
-    }
-    if (!in_array($data['link']['mlid'], $exclude)) {
-      $toc[$data['link']['mlid']] = $indent .' '. truncate_utf8($data['link']['title'], 30, TRUE, TRUE);
-      if ($data['below']) {
-        _book_toc_recurse($data['below'], $indent .'--', $toc, $exclude, $depth_limit);
+        while ($curr) {
+          if ($curr['link']['href'] == $book_link['href']) {
+            $trail[] = $curr['link'];
+            $curr = FALSE;
+          }
+          else {
+            if ($curr['below'] && $curr['link']['in_active_trail']) {
+              $trail[] = $curr['link'];
+              $tree = $curr['below'];
+            }
+            $curr = array_shift($tree);
+          }
+        }
       }
+      return $trail;
     }
-  }
-}
 
-/**
- * Returns an array of book pages in table of contents order.
- *
- * @param $bid
- *   The ID of the book whose pages are to be listed.
- * @param $exclude
- *   Optional array of mlid values.  Any link whose mlid is in this array
- *   will be excluded (along with its children).
- * @param $depth_limit
- *   Any link deeper than this value will be excluded (along with its children).
- * @return
- *   An array of mlid, title pairs for use as options for selecting a book page.
- */
-function book_toc($bid, $exclude = array(), $depth_limit) {
-
-  $tree = menu_tree_all_data(book_menu_name($bid));
-  $toc = array();
-  _book_toc_recurse($tree, '', $toc, $exclude, $depth_limit);
-
-  return $toc;
-}
+    /**
+     * Implementation of hook_nodeapi().
+     *
+     * Appends book navigation to all nodes in the book, and handles book outline
+     * insertions and updates via the node form.
+     */
+    function book_nodeapi(&$node, $op, $teaser, $page) {
+      switch ($op) {
+        case 'load':
+          // Note - we cannot use book_link_load() because it will call node_load()
+          $info['book'] = db_fetch_array(db_query('SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $node->nid));
+          if ($info['book']) {
+            $info['book']['href'] = $info['book']['link_path'];
+            $info['book']['title'] = $info['book']['link_title'];
+            $info['book']['options'] = unserialize($info['book']['options']);
+            return $info;
+          }
+          break;
 
-/**
- * Process variables for book-export-html.tpl.php.
- *
- * The $variables array contains the following arguments:
- * - $title
- * - $contents
- * - $depth
- *
- * @see book-export-html.tpl.php
- */
-function template_preprocess_book_export_html(&$variables) {
-  global $base_url, $language;
+        case 'view':
+          if (!$teaser) {
+            if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) {
+
+              $node->content['book_navigation'] = array(
+                '#value' => theme('book_navigation', $node->book),
+                '#weight' => 100,
+              );
+
+              if ($page) {
+                menu_set_active_trail(book_build_active_trail($node->book));
+                menu_set_active_menu_name($node->book['menu_name']);
+              }
+            }
+          }
+          break;
 
-  $variables['title'] = check_plain($variables['title']);
-  $variables['base_url'] = $base_url;
-  $variables['language'] = $language;
-  $variables['language_rtl'] = (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) ? TRUE : FALSE;
-  $variables['head'] = drupal_get_html_head();
-}
+        case 'presave':
+          // Always save a revision for non-administrators.
+          if (!empty($node->book['bid']) && !user_access('administer nodes')) {
+            $node->revision = 1;
+          }
+          break;
 
-/**
- * Traverse the book tree to build printable or exportable output.
- *
- * During the traversal, the $visit_func() callback is applied to each
- * node, and is called recursively for each child of the node (in weight,
- * title order).
- *
- * @param $tree
- *   A subtree of the book menu hierarchy, rooted at the current page.
- * @param $visit_func
- *   A function callback to be called upon visiting a node in the tree.
- * @return
- *   The output generated in visiting each node.
- */
-function book_export_traverse($tree, $visit_func) {
-  $output = '';
+        case 'insert':
+        case 'update':
+          if (!empty($node->book['bid'])) {
+            if ($node->book['bid'] == 'new') {
+              // New nodes that are their own book.
+              $node->book['bid'] = $node->nid;
+            }
+            $node->book['nid'] = $node->nid;
+            $node->book['menu_name'] = book_menu_name($node->book['bid']);
+            _book_update_outline($node);
+          }
+          break;
 
-  foreach ($tree as $data) {
-    // Note- access checking is already performed when building the tree.
-    if ($node = node_load($data['link']['nid'], FALSE)) {
-      $children = '';
-      if ($data['below']) {
-        $children = book_export_traverse($data['below'], $visit_func);
-      }
+        case 'delete':
+          if (!empty($node->book['bid'])) {
+            if ($node->nid == $node->book['bid']) {
+              // Handle deletion of a top-level post.
+              $result = db_query("SELECT b.nid FROM {menu_links} ml INNER JOIN {book} b on b.mlid = ml.mlid WHERE ml.plid = %d", $node->book['mlid']);
+              while ($child = db_fetch_array($result)) {
+                $child_node = node_load($child['nid']);
+                $child_node->book['bid'] = $child_node->nid;
+                _book_update_outline($child_node);
+              }
+            }
+            menu_link_delete($node->book['mlid']);
+            db_query('DELETE FROM {book} WHERE mlid = %d', $node->book['mlid']);
+          }
+          break;
 
-      if (function_exists($visit_func)) {
-        $output .= call_user_func($visit_func, $node, $children);
-      }
-      else {
-        // Use the default function.
-        $output .= book_node_export($node, $children);
+        case 'prepare':
+          // Prepare defaults for the add/edit form.
+          if (empty($node->book) && (user_access('add content to books') || user_access('administer book outlines'))) {
+            $node->book = array();
+            if (empty($node->nid) && isset($_GET['parent']) && is_numeric($_GET['parent'])) {
+              // Handle "Add child page" links:
+              $parent = book_link_load($_GET['parent']);
+              if ($parent && $parent['access']) {
+                $node->book['bid'] = $parent['bid'];
+                $node->book['plid'] = $parent['mlid'];
+                $node->book['menu_name'] = $parent['menu_name'];
+              }
+            }
+            // Set defaults.
+            $node->book += _book_link_defaults(!empty($node->nid) ? $node->nid : 'new');
+          }
+          else {
+            if (isset($node->book['bid']) && !isset($node->book['original_bid'])) {
+              $node->book['original_bid'] = $node->book['bid'];
+            }
+          }
+          // Find the depth limit for the parent select.
+          if (isset($node->book['bid']) && !isset($node->book['parent_depth_limit'])) {
+            $node->book['parent_depth_limit'] = _book_parent_depth_limit($node->book);
+          }
+          break;
       }
     }
-  }
-  return $output;
-}
-
-/**
- * Generates printer-friendly HTML for a node.
- *
- * @see book_export_traverse()
- *
- * @param $node
- *   The node to generate output for.
- * @param $children
- *   All the rendered child nodes within the current node.
- * @return
- *   The HTML generated for the given node.
- */
-function book_node_export($node, $children = '') {
 
-  $node->build_mode = NODE_BUILD_PRINT;
-  $node = node_build_content($node, FALSE, FALSE);
-  $node->body = drupal_render($node->content);
+    /**
+     * Find the depth limit for items in the parent select.
+     */
+    function _book_parent_depth_limit($book_link) {
+      return MENU_MAX_DEPTH - 1 - (($book_link['mlid'] && $book_link['has_children']) ? menu_link_children_relative_depth($book_link) : 0);
+    }
 
-  return theme('book_node_export_html', $node, $children);
-}
+    /**
+     * Form altering function for the confirm form for a single node deletion.
+     */
+    function book_form_node_delete_confirm_alter(&$form, $form_state) {
 
-/**
- * Process variables for book-node-export-html.tpl.php.
- *
- * The $variables array contains the following arguments:
- * - $node
- * - $children
- *
- * @see book-node-export-html.tpl.php
- */
-function template_preprocess_book_node_export_html(&$variables) {
-  $variables['depth'] = $variables['node']->book['depth'];
-  $variables['title'] = check_plain($variables['node']->title);
-  $variables['content'] = $variables['node']->body;
-}
+      $node = node_load($form['nid']['#value']);
 
-/**
- * Determine if a given node type is in the list of types allowed for books.
- */
-function book_type_is_allowed($type) {
-  return in_array($type, variable_get('book_allowed_types', array('book')));
-}
-
-/**
- * Implementation of hook_node_type().
- *
- * Update book module's persistent variables if the machine-readable name of a
- * node type is changed.
- */
-function book_node_type($op, $type) {
+      if (isset($node->book) && $node->book['has_children']) {
+        $form['book_warning'] = array(
+          '#value' => '<p>'. t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) .'</p>',
+          '#weight' => -10,
+        );
+      }
+    }
 
-  switch ($op) {
-    case 'update':
-      if (!empty($type->old_type) && $type->old_type != $type->type) {
-        // Update the list of node types that are allowed to be added to books.
-        $allowed_types = variable_get('book_allowed_types', array('book'));
-        $key = array_search($type->old_type, $allowed_types);
-        if ($key !== FALSE) {
-          $allowed_types[$type->type] = $allowed_types[$key] ? $type->type : 0;
-          unset($allowed_types[$key]);
-          variable_set('book_allowed_types', $allowed_types);
-        }
-        // Update the setting for the "Add child page" link.
-        if (variable_get('book_child_type', 'book') == $type->old_type) {
-          variable_set('book_child_type', $type->type);
+    /**
+     * Return an array with default values for a book link.
+     */
+    function _book_link_defaults($nid) {
+      return array('original_bid' => 0, 'menu_name' => '', 'nid' => $nid, 'bid' => 0, 'router_path' => 'node/%', 'plid' => 0, 'mlid' => 0, 'has_children' => 0, 'weight' => 0, 'module' => 'book', 'options' => array());
+    }
+
+    /**
+     * Process variables for book-navigation.tpl.php.
+     *
+     * The $variables array contains the following arguments:
+     * - $book_link
+     *
+     * @see book-navigation.tpl.php
+     */
+    function template_preprocess_book_navigation(&$variables) {
+      $book_link = $variables['book_link'];
+
+      // Provide extra variables for themers. Not needed by default.
+      $variables['book_id'] = $book_link['bid'];
+      $variables['book_title'] = check_plain($book_link['link_title']);
+      $variables['book_url'] = 'node/'. $book_link['bid'];
+      $variables['current_depth'] = $book_link['depth'];
+
+      $variables['tree'] = '';
+      if ($book_link['mlid']) {
+        $variables['tree'] = book_children($book_link);
+
+        if ($prev = book_prev($book_link)) {
+          $prev_href = url($prev['href']);
+          drupal_add_link(array('rel' => 'prev', 'href' => $prev_href));
+          $variables['prev_url'] = $prev_href;
+          $variables['prev_title'] = check_plain($prev['title']);
+        }
+        if ($book_link['plid'] && $parent = book_link_load($book_link['plid'])) {
+          $parent_href = url($parent['href']);
+          drupal_add_link(array('rel' => 'up', 'href' => $parent_href));
+          $variables['parent_url'] = $parent_href;
+          $variables['parent_title'] = check_plain($parent['title']);
+        }
+        if ($next = book_next($book_link)) {
+          $next_href = url($next['href']);
+          drupal_add_link(array('rel' => 'next', 'href' => $next_href));
+          $variables['next_url'] = $next_href;
+          $variables['next_title'] = check_plain($next['title']);
         }
       }
-      break;
-  }
-}
 
-/**
- * Implementation of hook_help().
- */
-function book_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#book':
-      $output = '<p>'. t('The book module is suited for creating structured, multi-page hypertexts such as site resource guides, manuals, and Frequently Asked Questions (FAQs). It permits a document to have chapters, sections, subsections, etc. Authors with suitable permissions can add pages to a collaborative book, placing them into the existing document by adding them to a table of contents menu.') .'</p>';
-      $output .= '<p>'. t('Pages in the book hierarchy have navigation elements at the bottom of the page for moving through the text. These links lead to the previous and next pages in the book, and to the level above the current page in the book\'s structure. More comprehensive navigation may be provided by enabling the <em>book navigation block</em> on the <a href="@admin-block">blocks administration page</a>.', array('@admin-block' => url('admin/build/block'))) .'</p>';
-      $output .= '<p>'. t('Users can select the <em>printer-friendly version</em> link visible at the bottom of a book page to generate a printer-friendly display of the page and all of its subsections. ') .'</p>';
-      $output .= '<p>'. t("Users with the <em>administer book outlines</em> permission can add a post of any content type to a book, by selecting the appropriate book while editing the post or by using the interface available on the post's <em>outline</em> tab.") .'</p>';
-      $output .= '<p>'. t('Administrators can view a list of all books on the <a href="@admin-node-book">book administration page</a>. The <em>Outline</em> page for each book allows section titles to be edited or rearranged.', array('@admin-node-book' => url('admin/content/book'))) .'</p>';
-      $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@book">Book module</a>.', array('@book' => 'http://drupal.org/handbook/modules/book/')) .'</p>';
-      return $output;
-    case 'admin/content/book':
-      return '<p>'. t('The book module offers a means to organize a collection of related posts, collectively known as a book. When viewed, these posts automatically display links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.') .'</p>';
-    case 'node/%/outline':
-      return '<p>'. t('The outline feature allows you to include posts in the <a href="@book">book hierarchy</a>, as well as move them within the hierarchy or to <a href="@book-admin">reorder an entire book</a>.', array('@book' => url('book'), '@book-admin' => url('admin/content/book'))) .'</p>';
-  }
-}
+      $variables['has_links'] = FALSE;
+      // Link variables to filter for values and set state of the flag variable.
+      $links = array('prev_url', 'prev_title', 'parent_url', 'parent_title', 'next_url', 'next_title');
+      foreach ($links as $link) {
+        if (isset($variables[$link])) {
+          // Flag when there is a value.
+          $variables['has_links'] = TRUE;
+        }
+        else {
+          // Set empty to prevent notices.
+          $variables[$link] = '';
+        }
+      }
+    }
 
-/**
- * Like menu_link_load(), but adds additional data from the {book} table.
- *
- * Do not call when loading a node, since this function may call node_load().
- */
-function book_link_load($mlid) {
-  if ($item = db_fetch_array(db_query("SELECT * FROM {menu_links} ml INNER JOIN {book} b ON b.mlid = ml.mlid LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.mlid = %d", $mlid))) {
-    _menu_link_translate($item);
-    return $item;
-  }
-  return FALSE;
-}
+    /**
+     * A recursive helper function for book_toc().
+     */
+    function _book_toc_recurse($tree, $indent, &$toc, $exclude, $depth_limit) {
+      foreach ($tree as $data) {
+        if ($data['link']['depth'] > $depth_limit) {
+          // Don't iterate through any links on this level.
+          break;
+        }
+        if (!in_array($data['link']['mlid'], $exclude)) {
+          $toc[$data['link']['mlid']] = $indent .' '. truncate_utf8($data['link']['title'], 30, TRUE, TRUE);
+          if ($data['below']) {
+            _book_toc_recurse($data['below'], $indent .'--', $toc, $exclude, $depth_limit);
+          }
+        }
+      }
+    }
 
-/**
- * Get the data representing a subtree of the book hierarchy.
- *
- * The root of the subtree will be the link passed as a parameter, so the
- * returned tree will contain this item and all its descendents in the menu tree.
- *
- * @param $item
- *   A fully loaded menu link.
- * @return
- *   An subtree of menu links in an array, in the order they should be rendered.
- */
-function book_menu_subtree_data($item) {
-  static $tree = array();
+    /**
+     * Returns an array of book pages in table of contents order.
+     *
+     * @param $bid
+     *   The ID of the book whose pages are to be listed.
+     * @param $exclude
+     *   Optional array of mlid values.  Any link whose mlid is in this array
+     *   will be excluded (along with its children).
+     * @param $depth_limit
+     *   Any link deeper than this value will be excluded (along with its children).
+     *
+     * @return
+     *   An array of mlid, title pairs for use as options for selecting a book page.
+     */
+    function book_toc($bid, $exclude = array(), $depth_limit) {
+
+      $tree = menu_tree_all_data(book_menu_name($bid));
+      $toc = array();
+      _book_toc_recurse($tree, '', $toc, $exclude, $depth_limit);
+
+      return $toc;
+    }
+
+    /**
+     * Process variables for book-export-html.tpl.php.
+     *
+     * The $variables array contains the following arguments:
+     * - $title
+     * - $contents
+     * - $depth
+     *
+     * @see book-export-html.tpl.php
+     */
+    function template_preprocess_book_export_html(&$variables) {
+      global $base_url, $language;
+
+      $variables['title'] = check_plain($variables['title']);
+      $variables['base_url'] = $base_url;
+      $variables['language'] = $language;
+      $variables['language_rtl'] = (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) ? TRUE : FALSE;
+      $variables['head'] = drupal_get_html_head();
+    }
+
+    /**
+     * Traverse the book tree to build printable or exportable output.
+     *
+     * During the traversal, the $visit_func() callback is applied to each
+     * node, and is called recursively for each child of the node (in weight,
+     * title order).
+     *
+     * @param $tree
+     *   A subtree of the book menu hierarchy, rooted at the current page.
+     * @param $visit_func
+     *   A function callback to be called upon visiting a node in the tree.
+     *
+     * @return
+     *   The output generated in visiting each node.
+     */
+    function book_export_traverse($tree, $visit_func) {
+      $output = '';
+
+      foreach ($tree as $data) {
+        // Note- access checking is already performed when building the tree.
+        if ($node = node_load($data['link']['nid'], FALSE)) {
+          $children = '';
+          if ($data['below']) {
+            $children = book_export_traverse($data['below'], $visit_func);
+          }
 
-  $cid = 'links:'. $item['menu_name'] .':subtree:'. $item['mlid'];
+          if (function_exists($visit_func)) {
+            $output .= call_user_func($visit_func, $node, $children);
+          }
+          else {
+            // Use the default function.
+            $output .= book_node_export($node, $children);
+          }
+        }
+      }
+      return $output;
+    }
 
-  if (!isset($tree[$cid])) {
-    $cache = cache_get($cid, 'cache_menu');
-    if ($cache && isset($cache->data)) {
-      $data = $cache->data;
+    /**
+     * Generates printer-friendly HTML for a node.
+     *
+     * @see book_export_traverse()
+     *
+     * @param $node
+     *   The node to generate output for.
+     * @param $children
+     *   All the rendered child nodes within the current node.
+     *
+     * @return
+     *   The HTML generated for the given node.
+     */
+    function book_node_export($node, $children = '') {
+
+      $node->build_mode = NODE_BUILD_PRINT;
+      $node             = node_build_content($node, FALSE, FALSE);
+      $node->body       = drupal_render($node->content);
+
+      return theme('book_node_export_html', $node, $children);
+    }
+
+    /**
+     * Process variables for book-node-export-html.tpl.php.
+     *
+     * The $variables array contains the following arguments:
+     * - $node
+     * - $children
+     *
+     * @see book-node-export-html.tpl.php
+     */
+    function template_preprocess_book_node_export_html(&$variables) {
+      $variables['depth'] = $variables['node']->book['depth'];
+      $variables['title'] = check_plain($variables['node']->title);
+      $variables['content'] = $variables['node']->body;
+    }
+
+    /**
+     * Determine if a given node type is in the list of types allowed for books.
+     */
+    function book_type_is_allowed($type) {
+      return in_array($type, variable_get('book_allowed_types', array('book')));
+    }
+
+    /**
+     * Implementation of hook_node_type().
+     *
+     * Update book module's persistent variables if the machine-readable name of a
+     * node type is changed.
+     */
+    function book_node_type($op, $type) {
+
+      switch ($op) {
+        case 'update':
+          if (!empty($type->old_type) && $type->old_type != $type->type) {
+            // Update the list of node types that are allowed to be added to books.
+            $allowed_types = variable_get('book_allowed_types', array('book'));
+            $key = array_search($type->old_type, $allowed_types);
+            if ($key !== FALSE) {
+              $allowed_types[$type->type] = $allowed_types[$key] ? $type->type : 0;
+              unset($allowed_types[$key]);
+              variable_set('book_allowed_types', $allowed_types);
+            }
+            // Update the setting for the "Add child page" link.
+            if (variable_get('book_child_type', 'book') == $type->old_type) {
+              variable_set('book_child_type', $type->type);
+            }
+          }
+          break;
+      }
     }
-    else {
-      $match = array("menu_name = '%s'");
-      $args = array($item['menu_name']);
-      $i = 1;
-      while ($i <= MENU_MAX_DEPTH && $item["p$i"]) {
-        $match[] = "p$i = %d";
-        $args[] = $item["p$i"];
-        $i++;
+
+    /**
+     * Implementation of hook_help().
+     */
+    function book_help($path, $arg) {
+      switch ($path) {
+        case 'admin/help#book':
+          $output = '<p>'. t('The book module is suited for creating structured, multi-page hypertexts such as site resource guides, manuals, and Frequently Asked Questions (FAQs). It permits a document to have chapters, sections, subsections, etc. Authors with suitable permissions can add pages to a collaborative book, placing them into the existing document by adding them to a table of contents menu.') .'</p>';
+          $output .= '<p>'. t('Pages in the book hierarchy have navigation elements at the bottom of the page for moving through the text. These links lead to the previous and next pages in the book, and to the level above the current page in the book\'s structure. More comprehensive navigation may be provided by enabling the <em>book navigation block</em> on the <a href="@admin-block">blocks administration page</a>.', array('@admin-block' => url('admin/build/block'))) .'</p>';
+          $output .= '<p>'. t('Users can select the <em>printer-friendly version</em> link visible at the bottom of a book page to generate a printer-friendly display of the page and all of its subsections. ') .'</p>';
+          $output .= '<p>'. t("Users with the <em>administer book outlines</em> permission can add a post of any content type to a book, by selecting the appropriate book while editing the post or by using the interface available on the post's <em>outline</em> tab.") .'</p>';
+          $output .= '<p>'. t('Administrators can view a list of all books on the <a href="@admin-node-book">book administration page</a>. The <em>Outline</em> page for each book allows section titles to be edited or rearranged.', array('@admin-node-book' => url('admin/content/book'))) .'</p>';
+          $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@book">Book module</a>.', array('@book' => 'http://drupal.org/handbook/modules/book/')) .'</p>';
+          return $output;
+
+        case 'admin/content/book':
+          return '<p>'. t('The book module offers a means to organize a collection of related posts, collectively known as a book. When viewed, these posts automatically display links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.') .'</p>';
+
+        case 'node/%/outline':
+          return '<p>'. t('The outline feature allows you to include posts in the <a href="@book">book hierarchy</a>, as well as move them within the hierarchy or to <a href="@book-admin">reorder an entire book</a>.', array('@book' => url('book'), '@book-admin' => url('admin/content/book'))) .'</p>';
       }
-      $sql = "
+    }
+
+    /**
+     * Like menu_link_load(), but adds additional data from the {book} table.
+     *
+     * Do not call when loading a node, since this function may call node_load().
+     */
+    function book_link_load($mlid) {
+      if ($item = db_fetch_array(db_query("SELECT * FROM {menu_links} ml INNER JOIN {book} b ON b.mlid = ml.mlid LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.mlid = %d", $mlid))) {
+        _menu_link_translate($item);
+        return $item;
+      }
+      return FALSE;
+    }
+
+    /**
+     * Get the data representing a subtree of the book hierarchy.
+     *
+     * The root of the subtree will be the link passed as a parameter, so the
+     * returned tree will contain this item and all its descendents in the menu tree.
+     *
+     * @param $item
+     *   A fully loaded menu link.
+     *
+     * @return
+     *   An subtree of menu links in an array, in the order they should be rendered.
+     */
+    function book_menu_subtree_data($item) {
+      static $tree = array();
+
+      $cid = 'links:'. $item['menu_name'] .':subtree:'. $item['mlid'];
+
+      if (!isset($tree[$cid])) {
+        $cache = cache_get($cid, 'cache_menu');
+        if ($cache && isset($cache->data)) {
+          $data = $cache->data;
+        }
+        else {
+          $match = array("menu_name = '%s'");
+          $args  = array($item['menu_name']);
+          $i     = 1;
+          while ($i <= MENU_MAX_DEPTH && $item["p$i"]) {
+            $match[] = "p$i = %d";
+            $args[] = $item["p$i"];
+            $i++;
+          }
+          $sql = "
         SELECT b.*, m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, ml.*
         FROM {menu_links} ml INNER JOIN {menu_router} m ON m.path = ml.router_path
         INNER JOIN {book} b ON ml.mlid = b.mlid
         WHERE ". implode(' AND ', $match) ."
         ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC";
 
-      $data['tree'] = menu_tree_data(db_query($sql, $args), array(), $item['depth']);
-      $data['node_links'] = array();
-      menu_tree_collect_node_links($data['tree'], $data['node_links']);
-      // Cache the data.
-      cache_set($cid, $data, 'cache_menu');
-    }
-    // Check access for the current user to each item in the tree.
-    menu_tree_check_access($data['tree'], $data['node_links']);
-    $tree[$cid] = $data['tree'];
-  }
+          $data['tree'] = menu_tree_data(db_query($sql, $args), array(), $item['depth']);
+          $data['node_links'] = array();
+          menu_tree_collect_node_links($data['tree'], $data['node_links']);
+          // Cache the data.
+          cache_set($cid, $data, 'cache_menu');
+        }
+        // Check access for the current user to each item in the tree.
+        menu_tree_check_access($data['tree'], $data['node_links']);
+        $tree[$cid] = $data['tree'];
+      }
 
-  return $tree[$cid];
-}
+      return $tree[$cid];
+    }
 
Index: modules/book/book.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.pages.inc,v
retrieving revision 1.5
diff -u -p -r1.5 book.pages.inc
--- modules/book/book.pages.inc	22 Dec 2007 23:24:24 -0000	1.5
+++ modules/book/book.pages.inc	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: book.pages.inc,v 1.5 2007/12/22 23:24:24 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the book module.
@@ -35,6 +36,7 @@ function book_render() {
  *   Other types may be supported in contributed modules.
  * @param $nid
  *   An integer representing the node id (nid) of the node to export
+ *
  * @return
  *   A string representing the node and its children in the book hierarchy
  *   in a format determined by the $type parameter.
@@ -67,6 +69,7 @@ function book_export($type, $nid) {
  *
  * @param $nid
  *   An integer representing the node id (nid) of the node to export.
+ *
  * @return
  *   A string containing HTML representing the node and its children in
  *   the book hierarchy.
@@ -227,12 +230,13 @@ function book_remove_form_submit($form, 
  *   The form's build_id.
  * @param $bid
  *   A bid from from among those in the form's book select.
+ *
  * @return
  *   Prints the replacement HTML in JSON format.
  */
 function book_form_update() {
-  $cid = 'form_'. $_POST['form_build_id'];
-  $bid = $_POST['book']['bid'];
+  $cid   = 'form_'. $_POST['form_build_id'];
+  $bid   = $_POST['book']['bid'];
   $cache = cache_get($cid, 'cache_form');
   if ($cache) {
     $form = $cache->data;
@@ -246,10 +250,10 @@ function book_form_update() {
       cache_set($cid, $form, 'cache_form', $cache->expire);
 
       // Build and render the new select element, then return it in JSON format.
-      $form_state = array();
+      $form_state    = array();
       $form['#post'] = array();
-      $form = form_builder($form['form_id']['#value'] , $form, $form_state);
-      $output = drupal_render($form['book']['plid']);
+      $form          = form_builder($form['form_id']['#value'], $form, $form_state);
+      $output        = drupal_render($form['book']['plid']);
       drupal_json(array('status' => TRUE, 'data' => $output));
     }
     else {
@@ -261,3 +265,4 @@ function book_form_update() {
   }
   exit();
 }
+
Index: modules/color/color.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.install,v
retrieving revision 1.2
diff -u -p -r1.2 color.install
--- modules/color/color.install	5 Dec 2006 05:49:50 -0000	1.2
+++ modules/color/color.install	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,5 @@
 <?php
 /* $Id: color.install,v 1.2 2006/12/05 05:49:50 dries Exp $ */
-
 function color_requirements($phase) {
   $requirements = array();
 
@@ -33,3 +32,4 @@ function color_requirements($phase) {
 
   return $requirements;
 }
+
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.38
diff -u -p -r1.38 color.module
--- modules/color/color.module	11 Jan 2008 12:33:09 -0000	1.38
+++ modules/color/color.module	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: color.module,v 1.38 2008/01/11 12:33:09 goba Exp $
 
+
 /**
  * Implementation of hook_help().
  */
@@ -134,8 +135,8 @@ function color_get_info($theme) {
 function color_get_palette($theme, $default = false) {
   // Fetch and expand default palette
   $fields = array('base', 'link', 'top', 'bottom', 'text');
-  $info = color_get_info($theme);
-  $keys = array_keys($info['schemes']);
+  $info   = color_get_info($theme);
+  $keys   = array_keys($info['schemes']);
   foreach (explode(',', array_shift($keys)) as $k => $scheme) {
     $palette[$fields[$k]] = $scheme;
   }
@@ -159,8 +160,8 @@ function color_scheme_form(&$form_state,
   drupal_add_css($base .'/color.css', 'module', 'all', FALSE);
   drupal_add_js($base .'/color.js');
   drupal_add_js(array('color' => array(
-    'reference' => color_get_palette($theme, true)
-  )), 'setting');
+        'reference' => color_get_palette($theme, true),
+      )), 'setting');
 
   // See if we're using a predefined scheme
   $current = implode(',', variable_get('color_'. $theme .'_palette', array()));
@@ -183,7 +184,7 @@ function color_scheme_form(&$form_state,
     'link' => t('Link color'),
     'top' => t('Header top'),
     'bottom' => t('Header bottom'),
-    'text' => t('Text color')
+    'text' => t('Text color'),
   );
   $form['palette']['#tree'] = true;
   foreach ($palette as $name => $value) {
@@ -208,8 +209,8 @@ function color_scheme_form(&$form_state,
 function theme_color_scheme_form($form) {
   // Include stylesheet
   $theme = $form['theme']['#value'];
-  $info = $form['info']['#value'];
-  $path = drupal_get_path('theme', $theme) .'/';
+  $info  = $form['info']['#value'];
+  $path  = drupal_get_path('theme', $theme) .'/';
   drupal_add_css($path . $info['preview_css']);
   $output = '';
   // Wrapper
@@ -265,8 +266,8 @@ function color_scheme_form_submit($form,
     // We need at least a copy of the source and a target buffer of the same
     // size (both at 32bpp).
     $required = $width * $height * 8;
-    $usage = memory_get_usage();
-    $limit = parse_size(ini_get('memory_limit'));
+    $usage    = memory_get_usage();
+    $limit    = parse_size(ini_get('memory_limit'));
     if ($usage + $required > $limit) {
       drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the <a href="@url">PHP documentation</a> for more information.', array('%size' => format_size($usage + $required - $limit), '@url' => 'http://www.php.net/manual/en/ini.core.php#ini.sect.resource-limits')), 'error');
       return;
@@ -283,7 +284,8 @@ function color_scheme_form_submit($form,
 
   // Don't render the default colorscheme, use the standard theme instead.
   if (implode(',', color_get_palette($theme, true)) == implode(',', $palette)
-    || $form_state['values']['op'] == t('Reset to defaults')) {
+    || $form_state['values']['op'] == t('Reset to defaults')
+  ) {
     variable_del('color_'. $theme .'_palette');
     variable_del('color_'. $theme .'_stylesheets');
     variable_del('color_'. $theme .'_logo');
@@ -293,16 +295,16 @@ function color_scheme_form_submit($form,
   }
 
   // Prepare target locations for generated files.
-  $id = $theme .'-'. substr(md5(serialize($palette) . microtime()), 0, 8);
-  $paths['color'] = file_directory_path() .'/color';
+  $id              = $theme .'-'. substr(md5(serialize($palette) . microtime()), 0, 8);
+  $paths['color']  = file_directory_path() .'/color';
   $paths['target'] = $paths['color'] .'/'. $id;
   foreach ($paths as $path) {
     file_check_directory($path, FILE_CREATE_DIRECTORY);
   }
   $paths['target'] = $paths['target'] .'/';
-  $paths['id'] = $id;
+  $paths['id']     = $id;
   $paths['source'] = drupal_get_path('theme', $theme) .'/';
-  $paths['files'] = $paths['map'] = array();
+  $paths['files']  = $paths['map'] = array();
 
   // Save palette and logo location.
   variable_set('color_'. $theme .'_palette', $palette);
@@ -349,9 +351,9 @@ function color_scheme_form_submit($form,
       $style = preg_replace_callback('/url\([\'"]?(?![a-z]+:|\/+)([^\'")]+)[\'"]?\)/i', '_drupal_build_css_path', $style);
 
       // Rewrite stylesheet with new colors.
-      $style = _color_rewrite_stylesheet($theme, $info, $paths, $palette, $style);
+      $style     = _color_rewrite_stylesheet($theme, $info, $paths, $palette, $style);
       $base_file = basename($file);
-      $css[] = $paths['target'] . $base_file;
+      $css[]     = $paths['target'] . $base_file;
       _color_save_stylesheet($paths['target'] . $base_file, $style, $paths);
     }
   }
@@ -382,10 +384,10 @@ function _color_rewrite_stylesheet($them
   }
 
   // Find all colors in the stylesheet and the chunks in between.
-  $style = preg_split('/(#[0-9a-f]{6}|#[0-9a-f]{3})/i', $style, -1, PREG_SPLIT_DELIM_CAPTURE);
+  $style    = preg_split('/(#[0-9a-f]{6}|#[0-9a-f]{3})/i', $style, -1, PREG_SPLIT_DELIM_CAPTURE);
   $is_color = false;
-  $output = '';
-  $base = 'base';
+  $output   = '';
+  $base     = 'base';
 
   // Iterate over all parts.
   foreach ($style as $chunk) {
@@ -455,7 +457,7 @@ function _color_render_images($theme, &$
   // Prepare template image.
   $source = $paths['source'] .'/'. $info['base_image'];
   $source = imagecreatefrompng($source);
-  $width = imagesx($source);
+  $width  = imagesx($source);
   $height = imagesy($source);
 
   // Prepare target buffer.
@@ -530,10 +532,10 @@ function _color_shift($given, $ref1, $re
   // delta based on the length of the difference vectors:
 
   // delta = 1 - |ref2 - ref1| / |white - ref1|
-  $target = _color_unpack($target, true);
-  $ref1 = _color_unpack($ref1, true);
-  $ref2 = _color_unpack($ref2, true);
-  $numerator = 0;
+  $target      = _color_unpack($target, true);
+  $ref1        = _color_unpack($ref1, true);
+  $ref2        = _color_unpack($ref2, true);
+  $numerator   = 0;
   $denominator = 0;
   for ($i = 0; $i < 3; ++$i) {
     $numerator += ($ref2[$i] - $ref1[$i]) * ($ref2[$i] - $ref1[$i]);
@@ -622,10 +624,10 @@ function _color_pack($rgb, $normalize = 
  * Convert a HSL triplet into RGB
  */
 function _color_hsl2rgb($hsl) {
-  $h = $hsl[0];
-  $s = $hsl[1];
-  $l = $hsl[2];
-  $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l*$s;
+  $h  = $hsl[0];
+  $s  = $hsl[1];
+  $l  = $hsl[2];
+  $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l * $s;
   $m1 = $l * 2 - $m2;
   return array(
     _color_hue2rgb($m1, $m2, $h + 0.33333),
@@ -649,14 +651,14 @@ function _color_hue2rgb($m1, $m2, $h) {
  * Convert an RGB triplet to HSL.
  */
 function _color_rgb2hsl($rgb) {
-  $r = $rgb[0];
-  $g = $rgb[1];
-  $b = $rgb[2];
-  $min = min($r, min($g, $b));
-  $max = max($r, max($g, $b));
+  $r     = $rgb[0];
+  $g     = $rgb[1];
+  $b     = $rgb[2];
+  $min   = min($r, min($g, $b));
+  $max   = max($r, max($g, $b));
   $delta = $max - $min;
-  $l = ($min + $max) / 2;
-  $s = 0;
+  $l     = ($min + $max) / 2;
+  $s     = 0;
   if ($l > 0 && $l < 1) {
     $s = $delta / ($l < 0.5 ? (2 * $l) : (2 - 2 * $l));
   }
@@ -669,3 +671,4 @@ function _color_rgb2hsl($rgb) {
   }
   return array($h, $s, $l);
 }
+
Index: modules/comment/comment-folded.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment-folded.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 comment-folded.tpl.php
--- modules/comment/comment-folded.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/comment/comment-folded.tpl.php	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment-folded.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file comment-folded.tpl.php
  * Default theme implementation for folded comments.
@@ -19,3 +20,4 @@
 <div class="comment-folded">
   <span class="subject"><?php print $title .' '. $new; ?></span><span class="credit"><?php print t('by') .' '. $author; ?></span>
 </div>
+
Index: modules/comment/comment-wrapper.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment-wrapper.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 comment-wrapper.tpl.php
--- modules/comment/comment-wrapper.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/comment/comment-wrapper.tpl.php	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment-wrapper.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file comment-wrapper.tpl.php
  * Default theme implementation to wrap comments.
@@ -34,3 +35,4 @@
 <div id="comments">
   <?php print $content; ?>
 </div>
+
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.4
diff -u -p -r1.4 comment.admin.inc
--- modules/comment/comment.admin.inc	8 Jan 2008 10:35:41 -0000	1.4
+++ modules/comment/comment.admin.inc	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment.admin.inc,v 1.4 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the comment module.
@@ -27,6 +28,7 @@ function comment_admin($type = 'new') {
  *   Not used.
  * @param $arg
  *   Current path's fourth component deciding the form type (Published comments/Approval queue)
+ *
  * @return
  *   The form structure.
  * @ingroup forms
@@ -38,7 +40,7 @@ function comment_admin_overview($type = 
   // build an 'Update options' form
   $form['options'] = array(
     '#type' => 'fieldset', '#title' => t('Update options'),
-    '#prefix' => '<div class="container-inline">', '#suffix' => '</div>'
+    '#prefix' => '<div class="container-inline">', '#suffix' => '</div>',
   );
   $options = array();
   foreach (comment_operations($arg == 'approval' ? 'publish' : 'unpublish') as $key => $value) {
@@ -50,13 +52,13 @@ function comment_admin_overview($type = 
   // load the comments that we want to display
   $status = ($arg == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
   $form['header'] = array('#type' => 'value', '#value' => array(
-    theme('table_select_header_cell'),
-    array('data' => t('Subject'), 'field' => 'subject'),
-    array('data' => t('Author'), 'field' => 'name'),
-    array('data' => t('Posted in'), 'field' => 'node_title'),
-    array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
-    array('data' => t('Operations'))
-  ));
+      theme('table_select_header_cell'),
+      array('data' => t('Subject'), 'field' => 'subject'),
+      array('data' => t('Author'), 'field' => 'name'),
+      array('data' => t('Posted in'), 'field' => 'node_title'),
+      array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
+      array('data' => t('Operations')),
+    ));
   $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d'. tablesort_sql($form['header']['#value']), 50, 0, NULL, $status);
 
   // build a table listing the appropriate comments
@@ -70,7 +72,7 @@ function comment_admin_overview($type = 
     $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
     $form['operations'][$comment->cid] = array('#value' => l(t('edit'), 'comment/edit/'. $comment->cid, array('query' => $destination)));
   }
-  $form['comments'] = array('#type' => 'checkboxes', '#options' => isset($comments) ? $comments: array());
+  $form['comments'] = array('#type' => 'checkboxes', '#options' => isset($comments) ? $comments : array());
   $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
   return $form;
 }
@@ -128,13 +130,13 @@ function theme_comment_admin_overview($f
   $output = drupal_render($form['options']);
   if (isset($form['subject']) && is_array($form['subject'])) {
     foreach (element_children($form['subject']) as $key) {
-      $row = array();
-      $row[] = drupal_render($form['comments'][$key]);
-      $row[] = drupal_render($form['subject'][$key]);
-      $row[] = drupal_render($form['username'][$key]);
-      $row[] = drupal_render($form['node_title'][$key]);
-      $row[] = drupal_render($form['timestamp'][$key]);
-      $row[] = drupal_render($form['operations'][$key]);
+      $row    = array();
+      $row[]  = drupal_render($form['comments'][$key]);
+      $row[]  = drupal_render($form['subject'][$key]);
+      $row[]  = drupal_render($form['username'][$key]);
+      $row[]  = drupal_render($form['node_title'][$key]);
+      $row[]  = drupal_render($form['timestamp'][$key]);
+      $row[]  = drupal_render($form['operations'][$key]);
       $rows[] = $row;
     }
   }
@@ -158,6 +160,7 @@ function theme_comment_admin_overview($f
  *
  * @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
@@ -185,9 +188,10 @@ function comment_multiple_delete_confirm
   }
   else {
     return confirm_form($form,
-                        t('Are you sure you want to delete these comments and all their children?'),
-                        'admin/content/comment', t('This action cannot be undone.'),
-                        t('Delete comments'), t('Cancel'));
+      t('Are you sure you want to delete these comments and all their children?'),
+      'admin/content/comment', t('This action cannot be undone.'),
+      t('Delete comments'), t('Cancel')
+    );
   }
 }
 
@@ -247,7 +251,8 @@ function comment_confirm_delete(&$form_s
     t('Any replies to this comment will be lost. This action cannot be undone.'),
     t('Delete'),
     t('Cancel'),
-    'comment_confirm_delete');
+    'comment_confirm_delete'
+  );
 }
 
 /**
@@ -294,3 +299,4 @@ function _comment_delete_thread($comment
     _comment_delete_thread($comment);
   }
 }
+
Index: modules/comment/comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.19
diff -u -p -r1.19 comment.install
--- modules/comment/comment.install	16 Jan 2008 21:45:30 -0000	1.19
+++ modules/comment/comment.install	21 Jan 2008 21:58:51 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment.install,v 1.19 2008/01/16 21:45:30 goba Exp $
 
+
 /**
  * Implementation of hook_enable().
  */
@@ -67,7 +68,6 @@ function comment_update_6003() {
   return $ret;
 }
 
-
 /**
  * Implementation of hook_schema().
  */
@@ -162,12 +162,13 @@ function comment_schema() {
         'length' => 255,
         'not null' => FALSE,
         'description' => t("The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on."),
-      )
+      ),
     ),
     'indexes' => array(
-      'pid'    => array('pid'),
-      'nid'    => array('nid'),
-      'status' => array('status'), // This index is probably unused
+      'pid' => array('pid'),
+      'nid' => array('nid'),
+      // This index is probably unused
+      'status' => array('status'),
     ),
     'primary key' => array('cid'),
   );
@@ -210,7 +211,7 @@ function comment_schema() {
     ),
     'primary key' => array('nid'),
     'indexes' => array(
-      'node_comment_timestamp' => array('last_comment_timestamp')
+      'node_comment_timestamp' => array('last_comment_timestamp'),
     ),
   );
 
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.616
diff -u -p -r1.616 comment.module
--- modules/comment/comment.module	10 Jan 2008 15:03:53 -0000	1.616
+++ modules/comment/comment.module	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment.module,v 1.616 2008/01/10 15:03:53 goba Exp $
 
+
 /**
  * @file
  * Enables users to comment on published content.
@@ -130,8 +131,10 @@ function comment_help($path, $arg) {
       $output .= '<p>'. t('Comment permissions are assigned to user roles, and are used to determine whether anonymous users (or other roles) are allowed to comment on posts. If anonymous users are allowed to comment, their individual contact information may be retained in cookies stored on their local computer for use in later comment submissions. When a comment has no replies, it may be (optionally) edited by its author. The comment module uses the same input formats and HTML tags available when creating other forms of content.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@comment">Comment module</a>.', array('@comment' => 'http://drupal.org/handbook/modules/comment/')) .'</p>';
       return $output;
+
     case 'admin/content/comment':
       return '<p>'. t("Below is a list of the latest comments posted to your site. Click on a subject to see the comment, the author's name to edit the author's user information, 'edit' to modify the text, and 'delete' to remove their submission.") .'</p>';
+
     case 'admin/content/comment/approval':
       return '<p>'. t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on 'edit' and then change its 'moderation status' to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, 'edit' to modify the text, and 'delete' to remove their submission.") .'</p>';
   }
@@ -301,6 +304,7 @@ function comment_block($op = 'list', $de
  *
  * @param $number
  *   (optional) The maximum number of comments to find.
+ *
  * @return
  *   An array of comment objects each containing a nid,
  *   subject, cid, and timestamp, or an empty array if there are no recent
@@ -339,15 +343,16 @@ function comment_get_recent($number = 10
  *   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);
-  $mode = _comment_get_display_setting('mode', $node);
-  $order = _comment_get_display_setting('sort', $node);
-  $pagenum = NULL;
-  $flat = in_array($mode, array(COMMENT_MODE_FLAT_COLLAPSED, COMMENT_MODE_FLAT_EXPANDED));
+  $mode              = _comment_get_display_setting('mode', $node);
+  $order             = _comment_get_display_setting('sort', $node);
+  $pagenum           = NULL;
+  $flat              = in_array($mode, array(COMMENT_MODE_FLAT_COLLAPSED, COMMENT_MODE_FLAT_EXPANDED));
   if ($num_comments <= $comments_per_page || ($flat && $order == COMMENT_ORDER_NEWEST_FIRST)) {
     // Only one page of comments or flat forum and newest first.
     // First new comment will always be on first page.
@@ -362,19 +367,19 @@ function comment_new_page_count($num_com
       // Threaded comments. See the documentation for comment_render().
       if ($order == COMMENT_ORDER_NEWEST_FIRST) {
         // Newest first: find the last thread with new comment
-        $result = db_query('(SELECT thread FROM {comments} WHERE nid = %d  AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY thread DESC LIMIT 1', $node->nid, $new_replies);
-        $thread = db_result($result);
+        $result       = db_query('(SELECT thread FROM {comments} WHERE nid = %d  AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY thread DESC LIMIT 1', $node->nid, $new_replies);
+        $thread       = db_result($result);
         $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND thread > '". $thread ."'", $node->nid);
       }
       else {
         // Oldest first: find the first thread with new comment
-        $result = db_query('(SELECT thread FROM {comments} WHERE nid = %d  AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY SUBSTRING(thread, 1, (LENGTH(thread) - 1)) LIMIT 1', $node->nid, $new_replies);
-        $thread = substr(db_result($result), 0, -1);
+        $result       = db_query('(SELECT thread FROM {comments} WHERE nid = %d  AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY SUBSTRING(thread, 1, (LENGTH(thread) - 1)) LIMIT 1', $node->nid, $new_replies);
+        $thread       = substr(db_result($result), 0, -1);
         $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < '". $thread ."'", $node->nid);
       }
       $count = db_result($result_count);
     }
-    $pageno =  $count / $comments_per_page;
+    $pageno = $count / $comments_per_page;
   }
   if ($pageno >= 1) {
     $pagenum = "page=". intval($pageno);
@@ -418,7 +423,7 @@ function comment_link($type, $node = NUL
             'title' => format_plural($all, '1 comment', '@count comments'),
             'href' => "node/$node->nid",
             'attributes' => array('title' => t('Jump to the first comment of this posting.')),
-            'fragment' => 'comments'
+            'fragment' => 'comments',
           );
 
           $new = comment_num_new($node->nid);
@@ -429,7 +434,7 @@ function comment_link($type, $node = NUL
               'href' => "node/$node->nid",
               'query' => comment_new_page_count($all, $new, $node),
               'attributes' => array('title' => t('Jump to the first new comment of this posting.')),
-              'fragment' => 'new'
+              'fragment' => 'new',
             );
           }
         }
@@ -440,7 +445,7 @@ function comment_link($type, $node = NUL
                 'title' => t('Add new comment'),
                 'href' => "comment/reply/$node->nid",
                 'attributes' => array('title' => t('Add a new comment to this page.')),
-                'fragment' => 'comment-form'
+                'fragment' => 'comment-form',
               );
             }
             else {
@@ -461,7 +466,7 @@ function comment_link($type, $node = NUL
               'title' => t('Add new comment'),
               'href' => "comment/reply/$node->nid",
               'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')),
-              'fragment' => 'comment-form'
+              'fragment' => 'comment-form',
             );
           }
         }
@@ -529,7 +534,8 @@ function comment_form_alter(&$form, $for
         t('Display above the comments'),
         t('Display below the comments'),
         t('Display above and below the comments'),
-        t('Do not display')),
+        t('Do not display'),
+      ),
       '#description' => t('Position of the comment controls box. The comment controls let the user change the default display mode and display order of comments.'),
     );
     $form['comment']['comment_anonymous'] = array(
@@ -539,7 +545,8 @@ function comment_form_alter(&$form, $for
       '#options' => array(
         COMMENT_ANONYMOUS_MAYNOT_CONTACT => t('Anonymous posters may not enter their contact information'),
         COMMENT_ANONYMOUS_MAY_CONTACT => t('Anonymous posters may leave their contact information'),
-        COMMENT_ANONYMOUS_MUST_CONTACT => t('Anonymous posters must leave their contact information')),
+        COMMENT_ANONYMOUS_MUST_CONTACT => t('Anonymous posters must leave their contact information'),
+      ),
       '#description' => t('This option is enabled when anonymous users have permission to post comments on the <a href="@url">permissions page</a>.', array('@url' => url('admin/user/permissions', array('fragment' => 'module-comment')))),
     );
     if (!user_access('post comments', user_load(array('uid' => 0)))) {
@@ -594,7 +601,7 @@ function comment_nodeapi(&$node, $op, $a
   switch ($op) {
     case 'load':
       return db_fetch_array(db_query("SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = %d", $node->nid));
-      break;
+    break;
 
     case 'prepare':
       if (!isset($node->comment)) {
@@ -655,6 +662,7 @@ function comment_user($type, $edit, &$us
  *   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.
  */
@@ -743,9 +751,9 @@ function comment_save($edit) {
             $max = rtrim($max, '/');
 
             // We need to get the value at the correct depth.
-            $parts = explode('.', $max);
+            $parts        = explode('.', $max);
             $parent_depth = count(explode('.', $parent->thread));
-            $last = $parts[$parent_depth];
+            $last         = $parts[$parent_depth];
 
             // Finally, build the thread field for this new comment.
             $thread = $parent->thread .'.'. int2vancode(vancode2int($last) + 1) .'/';
@@ -754,7 +762,8 @@ function comment_save($edit) {
 
         $edit['timestamp'] = time();
 
-        if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too
+        // '===' because we want to modify anonymous users too
+        if ($edit['uid'] === $user->uid) {
           $edit['name'] = $user->name;
         }
 
@@ -800,6 +809,7 @@ function comment_save($edit) {
  *   The comment to which the links will be related.
  * @param $return
  *   Not used.
+ *
  * @return
  *   An associative array containing the links.
  */
@@ -813,7 +823,7 @@ function comment_links($comment, $return
     $links['comment_parent'] = array(
       'title' => t('parent'),
       'href' => comment_node_url(),
-      'fragment' => "comment-$comment->cid"
+      'fragment' => "comment-$comment->cid",
     );
   }
 
@@ -821,27 +831,27 @@ function comment_links($comment, $return
     if (user_access('administer comments') && user_access('post comments')) {
       $links['comment_delete'] = array(
         'title' => t('delete'),
-        'href' => "comment/delete/$comment->cid"
+        'href' => "comment/delete/$comment->cid",
       );
       $links['comment_edit'] = array(
         'title' => t('edit'),
-        'href' => "comment/edit/$comment->cid"
+        'href' => "comment/edit/$comment->cid",
       );
       $links['comment_reply'] = array(
         'title' => t('reply'),
-        'href' => "comment/reply/$comment->nid/$comment->cid"
+        'href' => "comment/reply/$comment->nid/$comment->cid",
       );
     }
     else if (user_access('post comments')) {
       if (comment_access('edit', $comment)) {
         $links['comment_edit'] = array(
           'title' => t('edit'),
-          'href' => "comment/edit/$comment->cid"
+          'href' => "comment/edit/$comment->cid",
         );
       }
       $links['comment_reply'] = array(
         'title' => t('reply'),
-        'href' => "comment/reply/$comment->nid/$comment->cid"
+        'href' => "comment/reply/$comment->nid/$comment->cid",
       );
     }
     else {
@@ -927,8 +937,8 @@ function comment_render($node, $cid = 0)
       $nid = 0;
     }
 
-    $mode = _comment_get_display_setting('mode', $node);
-    $order = _comment_get_display_setting('sort', $node);
+    $mode              = _comment_get_display_setting('mode', $node);
+    $order             = _comment_get_display_setting('sort', $node);
     $comments_per_page = _comment_get_display_setting('comments_per_page', $node);
 
     if ($cid && is_numeric($cid)) {
@@ -958,7 +968,7 @@ function comment_render($node, $cid = 0)
 
       $query_args = array($nid);
       if (!user_access('administer comments')) {
-        $query .= ' AND c.status = %d';
+        $query       .= ' AND c.status = %d';
         $query_count .= ' AND status = %d';
         $query_args[] = COMMENT_PUBLISHED;
       }
@@ -988,13 +998,13 @@ function comment_render($node, $cid = 0)
       // Start a form, for use with comment control.
       $result = pager_query($query, $comments_per_page, 0, $query_count, $query_args);
 
-      $divs = 0;
+      $divs     = 0;
       $num_rows = FALSE;
       $comments = '';
       drupal_add_css(drupal_get_path('module', 'comment') .'/comment.css');
       while ($comment = db_fetch_object($result)) {
-        $comment = drupal_unpack($comment);
-        $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+        $comment        = drupal_unpack($comment);
+        $comment->name  = $comment->uid ? $comment->registered_name : $comment->name;
         $comment->depth = count(explode('.', $comment->thread)) - 1;
 
         if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) {
@@ -1060,6 +1070,7 @@ function comment_render($node, $cid = 0)
  *
  * @param $action
  *   The comment administration page.
+ *
  * @return
  *   An associative array containing the offered operations.
  */
@@ -1067,20 +1078,20 @@ function comment_operations($action = NU
   if ($action == 'publish') {
     $operations = array(
       'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
-      'delete' => array(t('Delete the selected comments'), '')
+      'delete' => array(t('Delete the selected comments'), ''),
     );
   }
   else if ($action == 'unpublish') {
     $operations = array(
       'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
-      'delete' => array(t('Delete the selected comments'), '')
+      'delete' => array(t('Delete the selected comments'), ''),
     );
   }
   else {
     $operations = array(
       'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'),
       'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'),
-      'delete' => array(t('Delete the selected comments'), '')
+      'delete' => array(t('Delete the selected comments'), ''),
     );
   }
   return $operations;
@@ -1095,6 +1106,7 @@ function comment_operations($action = NU
  *
  * @param $cid
  *   The identifying comment id.
+ *
  * @return
  *   The comment object.
  */
@@ -1107,6 +1119,7 @@ function _comment_load($cid) {
  *
  * @param $nid
  *   The node id.
+ *
  * @return
  *   The comment count.
  */
@@ -1124,6 +1137,7 @@ function comment_num_all($nid) {
  *
  * @param $pid
  *   The comment id.
+ *
  * @return
  *   The replies count.
  */
@@ -1165,7 +1179,6 @@ function comment_num_new($nid, $timestam
   else {
     return 0;
   }
-
 }
 
 /**
@@ -1173,6 +1186,7 @@ function comment_num_new($nid, $timestam
  *
  * @param $edit
  *   An associative array containig the comment data.
+ *
  * @return
  *   The original $edit.
  */
@@ -1202,7 +1216,6 @@ function comment_validate($edit) {
         if ($taken != 0) {
           form_set_error('name', t('The name you used belongs to a registered user.'));
         }
-
       }
       else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MUST_CONTACT) {
         form_set_error('name', t('You have to leave your name.'));
@@ -1327,20 +1340,19 @@ function comment_form(&$form_state, $edi
 
       $form['admin']['date'] = array('#type' => 'textfield', '#parents' => array('date'), '#title' => t('Authored on'), '#size' => 20, '#maxlength' => 25, '#default_value' => $date, '#weight' => -1);
 
-      $form['admin']['status'] = array('#type' => 'radios', '#parents' => array('status'), '#title' => t('Status'), '#default_value' =>  $status, '#options' => array(t('Published'), t('Not published')), '#weight' => -1);
-
+      $form['admin']['status'] = array('#type' => 'radios', '#parents' => array('status'), '#title' => t('Status'), '#default_value' => $status, '#options' => array(t('Published'), t('Not published')), '#weight' => -1);
     }
     else {
-      $form['_author'] = array('#type' => 'item', '#title' => t('Your name'), '#value' => theme('username', $user)
+      $form['_author'] = array('#type' => 'item', '#title' => t('Your name'), '#value' => theme('username', $user),
       );
       $form['author'] = array('#type' => 'value', '#value' => $user->name);
     }
   }
   else if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) == COMMENT_ANONYMOUS_MAY_CONTACT) {
-    $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 60, '#size' => 30, '#default_value' => $edit['name'] ? $edit['name'] : variable_get('anonymous', t('Anonymous'))
+    $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 60, '#size' => 30, '#default_value' => $edit['name'] ? $edit['name'] : variable_get('anonymous', t('Anonymous')),
     );
 
-    $form['mail'] = array('#type' => 'textfield', '#title' => t('E-mail'), '#maxlength' => 64, '#size' => 30, '#default_value' => $edit['mail'], '#description' => t('The content of this field is kept private and will not be shown publicly.')
+    $form['mail'] = array('#type' => 'textfield', '#title' => t('E-mail'), '#maxlength' => 64, '#size' => 30, '#default_value' => $edit['mail'], '#description' => t('The content of this field is kept private and will not be shown publicly.'),
     );
 
     $form['homepage'] = array('#type' => 'textfield', '#title' => t('Homepage'), '#maxlength' => 255, '#size' => 30, '#default_value' => $edit['homepage']);
@@ -1463,15 +1475,15 @@ function comment_form_add_preview($form,
   $output = '';
 
   if ($edit['pid']) {
-    $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $edit['pid'], COMMENT_PUBLISHED));
-    $comment = drupal_unpack($comment);
+    $comment       = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $edit['pid'], COMMENT_PUBLISHED));
+    $comment       = drupal_unpack($comment);
     $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
     $output .= theme('comment_view', $comment, $node);
   }
   else {
-    $suffix = empty($form['#suffix']) ? '' : $form['#suffix'];
+    $suffix          = empty($form['#suffix']) ? '' : $form['#suffix'];
     $form['#suffix'] = $suffix . node_view($node);
-    $edit['pid'] = 0;
+    $edit['pid']     = 0;
   }
 
   $form['comment_preview_below'] = array('#value' => $output, '#weight' => 100);
@@ -1585,7 +1597,6 @@ function theme_comment_view($comment, $n
   return $output;
 }
 
-
 /**
  * Build a comment control form.
  *
@@ -1635,7 +1646,7 @@ function comment_controls($mode = COMMEN
  */
 function theme_comment_controls($form) {
   $output = '<div class="container-inline">';
-  $output .=  drupal_render($form);
+  $output .= drupal_render($form);
   $output .= '</div>';
   $output .= '<div class="description">'. t('Select your preferred way to display the comments and click "Save settings" to activate your changes.') .'</div>';
   return theme('box', t('Comment viewing options'), $output);
@@ -1647,8 +1658,8 @@ function theme_comment_controls($form) {
 function comment_controls_submit($form, &$form_state) {
   global $user;
 
-  $mode = $form_state['values']['mode'];
-  $order = $form_state['values']['order'];
+  $mode              = $form_state['values']['mode'];
+  $order             = $form_state['values']['order'];
   $comments_per_page = $form_state['values']['comments_per_page'];
 
   if ($user->uid) {
@@ -1676,22 +1687,22 @@ function comment_controls_submit($form, 
 function template_preprocess_comment(&$variables) {
   $comment = $variables['comment'];
   $node = $variables['node'];
-  $variables['author']    = theme('username', $comment);
-  $variables['content']   = $comment->comment;
-  $variables['date']      = format_date($comment->timestamp);
-  $variables['links']     = isset($variables['links']) ? theme('links', $variables['links']) : '';
-  $variables['new']       = $comment->new ? t('new') : '';
-  $variables['picture']   = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '';
+  $variables['author'] = theme('username', $comment);
+  $variables['content'] = $comment->comment;
+  $variables['date'] = format_date($comment->timestamp);
+  $variables['links'] = isset($variables['links']) ? theme('links', $variables['links']) : '';
+  $variables['new'] = $comment->new ? t('new') : '';
+  $variables['picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '';
   $variables['signature'] = $comment->signature;
   $variables['submitted'] = theme('comment_submitted', $comment);
-  $variables['title']     = l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid"));
+  $variables['title'] = l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid"));
   $variables['template_files'][] = 'comment-'. $node->type;
   // set status to a string representation of comment->status.
   if (isset($comment->preview)) {
-    $variables['status']  = 'comment-preview';
+    $variables['status'] = 'comment-preview';
   }
   else {
-    $variables['status']  = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
+    $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
   }
 }
 
@@ -1702,7 +1713,7 @@ function template_preprocess_comment(&$v
  * @see theme_comment_folded()
  */
 function template_preprocess_comment_folded(&$variables) {
-  $comment = $variables['comment'];
+  $comment             = $variables['comment'];
   $variables['author'] = theme('username', $comment);
   $variables['date']   = format_date($comment->timestamp);
   $variables['new']    = $comment->new ? t('new') : '';
@@ -1771,14 +1782,14 @@ function theme_comment_thread_expanded($
 function theme_comment_post_forbidden($node) {
   global $user;
   static $authenticated_post_comments;
-  
+
   if (!$user->uid) {
     if (!isset($authenticated_post_comments)) {
       // We only output any link if we are certain, that users get permission
       // to post comments by logging in. We also locally cache this information.
       $authenticated_post_comments = array_key_exists(DRUPAL_AUTHENTICATED_RID, user_roles(TRUE, 'post comments') + user_roles(TRUE, 'post comments without approval'));
     }
-    
+
     if ($authenticated_post_comments) {
       // We cannot use drupal_get_destination() because these links
       // sometimes appear on /node and taxonomy listing pages.
@@ -1809,7 +1820,7 @@ function theme_comment_post_forbidden($n
  */
 function template_preprocess_comment_wrapper(&$variables) {
   // Provide contextual information.
-  $variables['display_mode']  = _comment_get_display_setting('mode', $variables['node']);
+  $variables['display_mode'] = _comment_get_display_setting('mode', $variables['node']);
   $variables['display_order'] = _comment_get_display_setting('sort', $variables['node']);
   $variables['comment_controls_state'] = variable_get('comment_controls_'. $variables['node']->type, COMMENT_CONTROLS_HIDDEN);
   $variables['template_files'][] = 'comment-wrapper-'. $variables['node']->type;
@@ -1826,8 +1837,9 @@ function theme_comment_submitted($commen
   return t('Submitted by !username on @datetime.',
     array(
       '!username' => theme('username', $comment),
-      '@datetime' => format_date($comment->timestamp)
-    ));
+      '@datetime' => format_date($comment->timestamp),
+    )
+  );
 }
 
 /**
@@ -1841,7 +1853,7 @@ function _comment_get_modes() {
     COMMENT_MODE_FLAT_COLLAPSED => t('Flat list - collapsed'),
     COMMENT_MODE_FLAT_EXPANDED => t('Flat list - expanded'),
     COMMENT_MODE_THREADED_COLLAPSED => t('Threaded list - collapsed'),
-    COMMENT_MODE_THREADED_EXPANDED => t('Threaded list - expanded')
+    COMMENT_MODE_THREADED_EXPANDED => t('Threaded list - expanded'),
   );
 }
 
@@ -1854,7 +1866,7 @@ function _comment_get_modes() {
 function _comment_get_orders() {
   return array(
     COMMENT_ORDER_NEWEST_FIRST => t('Date - newest first'),
-    COMMENT_ORDER_OLDEST_FIRST => t('Date - oldest first')
+    COMMENT_ORDER_OLDEST_FIRST => t('Date - oldest first'),
   );
 }
 
@@ -1886,9 +1898,11 @@ function _comment_get_display_setting($s
       case 'mode':
         $default = variable_get('comment_default_mode_'. $node->type, COMMENT_MODE_THREADED_EXPANDED);
         break;
+
       case 'sort':
         $default = variable_get('comment_default_order_'. $node->type, COMMENT_ORDER_NEWEST_FIRST);
         break;
+
       case 'comments_per_page':
         $default = variable_get('comment_default_per_page_'. $node->type, 50);
     }
@@ -1945,6 +1959,7 @@ function _comment_update_node_statistics
  *   A comment object.
  * @param $op
  *   A string containing the name of the comment operation.
+ *
  * @return
  *   The returned value of the invoked hooks.
  */
@@ -2003,10 +2018,10 @@ function comment_hook_info() {
           'runs when' => t('After saving an updated comment'),
         ),
         'delete' => array(
-          'runs when' => t('After deleting a comment')
+          'runs when' => t('After deleting a comment'),
         ),
         'view' => array(
-          'runs when' => t('When a comment is being viewed by an authenticated user')
+          'runs when' => t('When a comment is being viewed by an authenticated user'),
         ),
       ),
     ),
@@ -2024,7 +2039,7 @@ function comment_action_info() {
       'configurable' => FALSE,
       'hooks' => array(
         'comment' => array('insert', 'update'),
-      )
+      ),
     ),
     'comment_unpublish_by_keyword_action' => array(
       'description' => t('Unpublish comment containing keyword(s)'),
@@ -2032,8 +2047,8 @@ function comment_action_info() {
       'configurable' => TRUE,
       'hooks' => array(
         'comment' => array('insert', 'update'),
-      )
-    )
+      ),
+    ),
   );
 }
 
@@ -2100,3 +2115,4 @@ function comment_unpublish_by_keyword_ac
     }
   }
 }
+
Index: modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 comment.pages.inc
--- modules/comment/comment.pages.inc	16 Dec 2007 21:01:44 -0000	1.2
+++ modules/comment/comment.pages.inc	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment.pages.inc,v 1.2 2007/12/16 21:01:44 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the comment module.
@@ -16,8 +17,8 @@
 function comment_edit($cid) {
   global $user;
 
-  $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d', $cid));
-  $comment = drupal_unpack($comment);
+  $comment       = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d', $cid));
+  $comment       = drupal_unpack($comment);
   $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
   if (comment_access('edit', $comment)) {
     return comment_form_box((array)$comment);
@@ -114,3 +115,4 @@ function comment_reply($node, $pid = NUL
 
   return $output;
 }
+
Index: modules/comment/comment.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 comment.tpl.php
--- modules/comment/comment.tpl.php	4 Jan 2008 19:24:23 -0000	1.4
+++ modules/comment/comment.tpl.php	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: comment.tpl.php,v 1.4 2008/01/04 19:24:23 goba Exp $
 
+
 /**
  * @file comment.tpl.php
  * Default theme implementation for comments.
@@ -26,27 +27,32 @@
  * @see theme_comment()
  */
 ?>
-<div class="comment<?php print ($comment->new) ? ' comment-new' : ''; print ' '. $status ?> clear-block">
-  <?php print $picture ?>
+<div class="comment<?php print ($comment->new) ? ' comment-new' : ''; print ' '. $status?> clear-block">
+  <?php print $picture?>
+
 
-  <?php if ($comment->new): ?>
-    <span class="new"><?php print $new ?></span>
+<?php if ($comment->new):
+?>
+    <span class="new"><?php print $new?></span>
   <?php endif; ?>
 
-  <h3><?php print $title ?></h3>
+  <h3><?php print $title?></h3>
 
   <div class="submitted">
-    <?php print $submitted ?>
+    <?php print $submitted?>
   </div>
 
   <div class="content">
-    <?php print $content ?>
-    <?php if ($signature): ?>
+    <?php print $content?>
+
+<?php if ($signature):
+?>
     <div class="user-signature clear-block">
-      <?php print $signature ?>
+      <?php print $signature?>
     </div>
     <?php endif; ?>
   </div>
 
-  <?php print $links ?>
+  <?php print $links?>
 </div>
+
Index: modules/contact/contact.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.admin.inc,v
retrieving revision 1.3
diff -u -p -r1.3 contact.admin.inc
--- modules/contact/contact.admin.inc	9 Nov 2007 07:55:13 -0000	1.3
+++ modules/contact/contact.admin.inc	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: contact.admin.inc,v 1.3 2007/11/09 07:55:13 dries Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the contact module.
@@ -113,7 +114,6 @@ function contact_admin_edit_submit($form
     drupal_write_record('contact', $form_state['values']);
     drupal_set_message(t('Category %category has been added.', array('%category' => $form_state['values']['category'])));
     watchdog('mail', 'Contact form: category %category added.', array('%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact'));
-
   }
   else {
     drupal_write_record('contact', $form_state['values'], 'cid');
@@ -171,3 +171,4 @@ function contact_admin_settings() {
   );
   return system_settings_form($form);
 }
+
Index: modules/contact/contact.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.install,v
retrieving revision 1.10
diff -u -p -r1.10 contact.install
--- modules/contact/contact.install	18 Dec 2007 12:59:21 -0000	1.10
+++ modules/contact/contact.install	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: contact.install,v 1.10 2007/12/18 12:59:21 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -79,3 +80,4 @@ function contact_schema() {
 
   return $schema;
 }
+
Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.103
diff -u -p -r1.103 contact.module
--- modules/contact/contact.module	16 Jan 2008 12:46:52 -0000	1.103
+++ modules/contact/contact.module	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: contact.module,v 1.103 2008/01/16 12:46:52 goba Exp $
 
+
 /**
  * @file
  * Enables the use of personal and site-wide contact forms.
@@ -19,6 +20,7 @@ function contact_help($path, $arg) {
       $output .= '<p>'. t('Customize the <a href="@contact">contact page</a> with additional information (like physical location, mailing address, and telephone number) using the <a href="@contact-settings">contact form settings page</a>. The <a href="@contact-settings">settings page</a> also provides configuration options for the maximum number of contact form submissions a user may perform per hour, and the default status of users\' personal contact forms.', array('@contact-settings' => url('admin/build/contact/settings'), '@contact' => url('contact'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@contact">Contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', array('absolute' => TRUE)))) .'</p>';
       return $output;
+
     case 'admin/build/contact':
       $output = '<p>'. t('This page lets you set up <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/build/contact/settings'), '@form' => url('contact'))) .'</p>';
       if (!module_exists('menu')) {
@@ -38,6 +40,7 @@ function contact_help($path, $arg) {
 function contact_perm() {
   return array('access site-wide contact form', 'administer site-wide contact form');
 }
+
 /**
  * Implementation of hook_menu().
  */
@@ -113,12 +116,10 @@ function _contact_user_tab_access($accou
   if (!isset($account->contact)) {
     $account->contact = FALSE;
   }
-  return
-    $account && $user->uid &&
-    (
-      ($user->uid != $account->uid && $account->contact) ||
-      user_access('administer users')
-    );
+  return $account && $user->uid && (
+    ($user->uid != $account->uid && $account->contact) ||
+    user_access('administer users')
+  );
 }
 
 /**
@@ -169,11 +170,13 @@ function contact_mail($key, &$message, $
       $message['body'][] = t("!name sent a message using the contact form at !form.", array('!name' => $params['name'], '!form' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language))), $language->language);
       $message['body'][] = $params['message'];
       break;
+
     case 'page_autoreply':
       $contact = $params['contact'];
       $message['subject'] .= t('[!category] !subject', array('!category' => $contact['category'], '!subject' => $params['subject']), $language->language);
       $message['body'][] = $contact['reply'];
       break;
+
     case 'user_mail':
     case 'user_copy':
       $user = $params['user'];
@@ -187,3 +190,4 @@ function contact_mail($key, &$message, $
       break;
   }
 }
+
Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.6
diff -u -p -r1.6 contact.pages.inc
--- modules/contact/contact.pages.inc	16 Jan 2008 22:56:21 -0000	1.6
+++ modules/contact/contact.pages.inc	21 Jan 2008 21:58:52 -0000
@@ -1,12 +1,12 @@
 <?php
 // $Id: contact.pages.inc,v 1.6 2008/01/16 22:56:21 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the contact module.
  */
 
-
 /**
  * Site-wide contact page.
  */
@@ -173,9 +173,9 @@ function contact_user_page($account) {
 
 function contact_mail_user(&$form_state, $recipient) {
   global $user;
-  $form['#token'] = $user->name . $user->mail;
+  $form['#token']    = $user->name . $user->mail;
   $form['recipient'] = array('#type' => 'value', '#value' => $recipient);
-  $form['from'] = array('#type' => 'item',
+  $form['from']      = array('#type' => 'item',
     '#title' => t('From'),
     '#value' => check_plain($user->name) .' &lt;'. check_plain($user->mail) .'&gt;',
   );
@@ -215,9 +215,9 @@ function contact_mail_user_submit($form,
   $from = $user->mail;
 
   // Save both users and all form values for email composition.
-  $values = $form_state['values'];
+  $values            = $form_state['values'];
   $values['account'] = $account;
-  $values['user'] = $user;
+  $values['user']    = $user;
 
   // Send the e-mail in the requested user language.
   drupal_mail('contact', 'user_mail', $to, user_preferred_language($account), $values, $from);
@@ -234,3 +234,4 @@ function contact_mail_user_submit($form,
   // Back to the requested users profile page.
   $form_state['redirect'] = "user/$account->uid";
 }
+
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.6
diff -u -p -r1.6 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	8 Jan 2008 10:35:41 -0000	1.6
+++ modules/dblog/dblog.admin.inc	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: dblog.admin.inc,v 1.6 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbacks for the dblog module.
@@ -18,7 +19,7 @@ function dblog_admin_settings() {
     '#title' => t('Discard log entries above the following row limit'),
     '#default_value' => variable_get('dblog_row_limit', 1000),
     '#options' => drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
-    '#description' => t('The maximum number of rows to keep in the database log. Older entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status')))
+    '#description' => t('The maximum number of rows to keep in the database log. Older entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))),
   );
 
   return system_settings_form($form);
@@ -29,11 +30,11 @@ function dblog_admin_settings() {
  */
 function dblog_overview() {
   $filter = dblog_build_filter_query();
-  $rows = array();
-  $icons = array(
-    WATCHDOG_NOTICE  => '',
+  $rows   = array();
+  $icons  = array(
+    WATCHDOG_NOTICE => '',
     WATCHDOG_WARNING => theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning')),
-    WATCHDOG_ERROR   => theme('image', 'misc/watchdog-error.png', t('error'), t('error')),
+    WATCHDOG_ERROR => theme('image', 'misc/watchdog-error.png', t('error'), t('error')),
   );
   $classes = array(
     WATCHDOG_NOTICE => 'dblog-notice',
@@ -73,7 +74,7 @@ function dblog_overview() {
         $dblog->link,
       ),
       // Attributes for tr
-      'class' => "dblog-". preg_replace('/[^a-z]/i', '-', $dblog->type) .' '. $classes[$dblog->severity]
+      'class' => "dblog-". preg_replace('/[^a-z]/i', '-', $dblog->type) .' '. $classes[$dblog->severity],
     );
   }
 
@@ -95,7 +96,7 @@ function dblog_top($type) {
 
   $header = array(
     array('data' => t('Count'), 'field' => 'count', 'sort' => 'desc'),
-    array('data' => t('Message'), 'field' => 'message')
+    array('data' => t('Message'), 'field' => 'message'),
   );
 
   $result = pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY message, variables ". tablesort_sql($header), 30, 0, "SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'", $type);
@@ -109,7 +110,7 @@ function dblog_top($type) {
     $rows[] = array(array('data' => t('No log messages available.'), 'colspan' => 2));
   }
 
-  $output  = theme('table', $header, $rows);
+  $output = theme('table', $header, $rows);
   $output .= theme('pager', NULL, 30, 0);
 
   return $output;
@@ -120,8 +121,8 @@ function dblog_top($type) {
  */
 function dblog_event($id) {
   $severity = watchdog_severity_levels();
-  $output = '';
-  $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
+  $output   = '';
+  $result   = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
   if ($dblog = db_fetch_object($result)) {
     $rows = array(
       array(
@@ -197,7 +198,6 @@ function dblog_build_filter_query() {
   );
 }
 
-
 /**
  * List dblog administration filters that can be applied.
  */
@@ -242,7 +242,6 @@ function _dblog_format_message($dblog) {
   }
 }
 
-
 /**
  * Return form for dblog administration filters.
  *
@@ -282,7 +281,7 @@ function dblog_filter_form() {
   if (!empty($session)) {
     $form['filters']['buttons']['reset'] = array(
       '#type' => 'submit',
-      '#value' => t('Reset')
+      '#value' => t('Reset'),
     );
   }
 
@@ -312,9 +311,11 @@ function dblog_filter_form_submit($form,
         }
       }
       break;
+
     case t('Reset'):
       $_SESSION['dblog_overview_filter'] = array();
       break;
   }
   return 'admin/reports/dblog';
 }
+
Index: modules/dblog/dblog.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v
retrieving revision 1.6
diff -u -p -r1.6 dblog.install
--- modules/dblog/dblog.install	4 Nov 2007 14:33:06 -0000	1.6
+++ modules/dblog/dblog.install	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: dblog.install,v 1.6 2007/11/04 14:33:06 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -69,7 +70,7 @@ function dblog_schema() {
         'default' => '',
         'description' => t('Link to view the result of the event.'),
       ),
-      'location'  => array(
+      'location' => array(
         'type' => 'text',
         'not null' => TRUE,
         'description' => t('URL of the origin of the event.'),
Index: modules/dblog/dblog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v
retrieving revision 1.21
diff -u -p -r1.21 dblog.module
--- modules/dblog/dblog.module	8 Jan 2008 10:35:41 -0000	1.21
+++ modules/dblog/dblog.module	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: dblog.module,v 1.21 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * System monitoring and logging for administrators.
@@ -22,6 +23,7 @@ function dblog_help($path, $arg) {
       $output .= '<p>'. t('The dblog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the dblog report on a regular basis to ensure their site is working properly.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@dblog">Dblog module</a>.', array('@dblog' => 'http://drupal.org/handbook/modules/dblog/')) .'</p>';
       return $output;
+
     case 'admin/reports/dblog':
       return '<p>'. t('The dblog module monitors your website, capturing system events in a log to be reviewed by an authorized individual at a later time. The dblog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the dblog report on a regular basis as it is often the only way to tell what is going on.') .'</p>';
   }
@@ -88,8 +90,6 @@ function dblog_init() {
   }
 }
 
-
-
 /**
  * Implementation of hook_cron().
  *
@@ -136,7 +136,8 @@ function dblog_watchdog($log = array()) 
     $log['request_uri'],
     $log['referer'],
     $log['ip'],
-    $log['timestamp']);
+    $log['timestamp']
+  );
 
   if ($current_db) {
     db_set_active($current_db);
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.8
diff -u -p -r1.8 filter.admin.inc
--- modules/filter/filter.admin.inc	8 Jan 2008 10:35:41 -0000	1.8
+++ modules/filter/filter.admin.inc	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: filter.admin.inc,v 1.8 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the filter module.
@@ -61,7 +62,7 @@ function theme_filter_admin_overview($fo
         check_plain($name),
         drupal_render($element['roles']),
         drupal_render($element['configure']),
-        drupal_render($element['delete'])
+        drupal_render($element['delete']),
       );
       unset($form[$name]);
     }
@@ -142,8 +143,8 @@ function filter_admin_format_form(&$form
     $form['format'] = array('#type' => 'hidden', '#value' => $format->format);
 
     // Composition tips (guidelines)
-    $tips = _filter_tips($format->format, FALSE);
-    $extra = '<p>'. l(t('More information about formatting options'), 'filter/tips') .'</p>';
+    $tips    = _filter_tips($format->format, FALSE);
+    $extra   = '<p>'. l(t('More information about formatting options'), 'filter/tips') .'</p>';
     $tiplist = theme('filter_tips', $tips, FALSE, $extra);
     if (!$tiplist) {
       $tiplist = '<p>'. t('No guidelines available.') .'</p>';
@@ -174,10 +175,10 @@ function filter_admin_format_form_valida
  * Process filter format form submissions.
  */
 function filter_admin_format_form_submit($form, &$form_state) {
-  $format = isset($form_state['values']['format']) ? $form_state['values']['format'] : NULL;
+  $format  = isset($form_state['values']['format']) ? $form_state['values']['format'] : NULL;
   $current = filter_list_format($format);
-  $name = trim($form_state['values']['name']);
-  $cache = TRUE;
+  $name    = trim($form_state['values']['name']);
+  $cache   = TRUE;
 
   // Add a new filter format.
   if (!$format) {
@@ -281,7 +282,6 @@ function filter_admin_delete_submit($for
   return;
 }
 
-
 /**
  * Menu callback; display settings defined by a format's filters.
  */
@@ -392,3 +392,4 @@ function filter_admin_order_submit($form
 
   cache_clear_all($form_state['values']['format'] .':', 'cache_filter', TRUE);
 }
+
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.5
diff -u -p -r1.5 filter.install
--- modules/filter/filter.install	18 Dec 2007 12:59:21 -0000	1.5
+++ modules/filter/filter.install	21 Jan 2008 21:58:52 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: filter.install,v 1.5 2007/12/18 12:59:21 dries Exp $
 
+
 /**
  * Implementation of hook_schema().
  */
@@ -39,7 +40,7 @@ function filter_schema() {
         'default' => 0,
         'size' => 'tiny',
         'description' => t('Weight of filter within format.'),
-      )
+      ),
     ),
     'primary key' => array('fid'),
     'unique keys' => array(
@@ -69,7 +70,8 @@ function filter_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-        'description' => t('A comma-separated string of roles; references {role}.rid.'), // This is bad since you can't use joins, nor index.
+        // This is bad since you can't use joins, nor index.
+        'description' => t('A comma-separated string of roles; references {role}.rid.'),
       ),
       'cache' => array(
         'type' => 'int',
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.204
diff -u -p -r1.204 filter.module
--- modules/filter/filter.module	21 Jan 2008 15:08:24 -0000	1.204
+++ modules/filter/filter.module	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: filter.module,v 1.204 2008/01/21 15:08:24 goba Exp $
 
+
 /**
  * @file
  * Framework for handling filtering of content.
@@ -25,14 +26,18 @@ function filter_help($path, $arg) {
       $output .= '<p>'. t('Users can choose between the available input formats when creating or editing content. Administrators can configure which input formats are available to which user roles, as well as choose a default input format.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@filter">Filter module</a>.', array('@filter' => 'http://drupal.org/handbook/modules/filter/')) .'</p>';
       return $output;
+
     case 'admin/settings/filters':
       $output = '<p>'. t('<em>Input formats</em> define a way of processing user-supplied text in Drupal. Each input format uses filters to manipulate text, and most input formats apply several different filters to text, in a specific order. Each filter is designed to accomplish a specific purpose, and generally either removes elements from or adds elements to text before it is displayed. Users can choose between the available input formats when submitting content.') .'</p>';
       $output .= '<p>'. t('Use the list below to configure which input formats are available to which roles, as well as choose a default input format (used for imported content, for example). The default format is always available to users. All input formats are available to users in a role with the "administer filters" permission.') .'</p>';
       return $output;
+
     case 'admin/settings/filters/%':
       return '<p>'. t('Every <em>filter</em> performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format. If you notice some filters are causing conflicts in the output, you can <a href="@rearrange">rearrange them</a>.', array('@rearrange' => url('admin/settings/filters/'. $arg[3] .'/order'))) .'</p>';
+
     case 'admin/settings/filters/%/configure':
       return '<p>'. t('If you cannot find the settings for a certain filter, make sure you have enabled it on the <a href="@url">view tab</a> first.', array('@url' => url('admin/settings/filters/'. $arg[3]))) .'</p>';
+
     case 'admin/settings/filters/%/order':
       $output = '<p>'. t('Because of the flexible filtering system, you might encounter a situation where one filter prevents another from doing its job. For example: a word in an URL gets converted into a glossary term, before the URL can be converted to a clickable link. When this happens, rearrange the order of the filters.') .'</p>';
       $output .= '<p>'. t("Filters are executed from top-to-bottom. To change the order of the filters, modify the values in the <em>Weight</em> column or grab a drag-and-drop handle under the <em>Name</em> column and drag filters to new locations in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save configuration</em> button at the bottom of the page.") .'</p>';
@@ -172,110 +177,113 @@ function filter_filter_tips($delta, $for
       if (variable_get("filter_html_$format", FILTER_HTML_STRIP) == FILTER_HTML_STRIP) {
         if ($allowed_html = variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>')) {
           switch ($long) {
-            case 0:
-              return t('Allowed HTML tags: @tags', array('@tags' => $allowed_html));
-            case 1:
-              $output = '<p>'. t('Allowed HTML tags: @tags', array('@tags' => $allowed_html)) .'</p>';
-              if (!variable_get("filter_html_help_$format", 1)) {
-                return $output;
-              }
+          case 0:
+            return t('Allowed HTML tags: @tags', array('@tags' => $allowed_html));
+
+          case 1:
+            $output = '<p>'. t('Allowed HTML tags: @tags', array('@tags' => $allowed_html)) .'</p>';
+            if (!variable_get("filter_html_help_$format", 1)) {
+              return $output;
+            }
 
-              $output .= t('
+            $output .= t('
 <p>This site allows HTML content. While learning all of HTML may feel intimidating, learning how to use a very small number of the most basic HTML "tags" is very easy. This table provides examples for each tag that is enabled on this site.</p>
 <p>For more information see W3C\'s <a href="http://www.w3.org/TR/html/">HTML Specifications</a> or use your favorite search engine to find other sites that explain HTML.</p>');
-              $tips = array(
-                'a' => array( t('Anchors are used to make links to other pages.'), '<a href="'. $base_url .'">'. variable_get('site_name', 'Drupal') .'</a>'),
-                'br' => array( t('By default line break tags are automatically added, so use this tag to add additional ones. Use of this tag is different because it is not used with an open/close pair like all the others. Use the extra " /" inside the tag to maintain XHTML 1.0 compatibility'), t('Text with <br />line break')),
-                'p' => array( t('By default paragraph tags are automatically added, so use this tag to add additional ones.'), '<p>'. t('Paragraph one.') .'</p> <p>'. t('Paragraph two.') .'</p>'),
-                'strong' => array( t('Strong'), '<strong>'. t('Strong') .'</strong>'),
-                'em' => array( t('Emphasized'), '<em>'. t('Emphasized') .'</em>'),
-                'cite' => array( t('Cited'), '<cite>'. t('Cited') .'</cite>'),
-                'code' => array( t('Coded text used to show programming source code'), '<code>'. t('Coded') .'</code>'),
-                'b' => array( t('Bolded'), '<b>'. t('Bolded') .'</b>'),
-                'u' => array( t('Underlined'), '<u>'. t('Underlined') .'</u>'),
-                'i' => array( t('Italicized'), '<i>'. t('Italicized') .'</i>'),
-                'sup' => array( t('Superscripted'), t('<sup>Super</sup>scripted')),
-                'sub' => array( t('Subscripted'), t('<sub>Sub</sub>scripted')),
-                'pre' => array( t('Preformatted'), '<pre>'. t('Preformatted') .'</pre>'),
-                'abbr' => array( t('Abbreviation'), t('<abbr title="Abbreviation">Abbrev.</abbr>')),
-                'acronym' => array( t('Acronym'), t('<acronym title="Three-Letter Acronym">TLA</acronym>')),
-                'blockquote' => array( t('Block quoted'), '<blockquote>'. t('Block quoted') .'</blockquote>'),
-                'q' => array( t('Quoted inline'), '<q>'. t('Quoted inline') .'</q>'),
-                // Assumes and describes tr, td, th.
-                'table' => array( t('Table'), '<table> <tr><th>'. t('Table header') .'</th></tr> <tr><td>'. t('Table cell') .'</td></tr> </table>'),
-                'tr' => NULL, 'td' => NULL, 'th' => NULL,
-                'del' => array( t('Deleted'), '<del>'. t('Deleted') .'</del>'),
-                'ins' => array( t('Inserted'), '<ins>'. t('Inserted') .'</ins>'),
-                 // Assumes and describes li.
-                'ol' => array( t('Ordered list - use the &lt;li&gt; to begin each list item'), '<ol> <li>'. t('First item') .'</li> <li>'. t('Second item') .'</li> </ol>'),
-                'ul' => array( t('Unordered list - use the &lt;li&gt; to begin each list item'), '<ul> <li>'. t('First item') .'</li> <li>'. t('Second item') .'</li> </ul>'),
-                'li' => NULL,
-                // Assumes and describes dt and dd.
-                'dl' => array( t('Definition lists are similar to other HTML lists. &lt;dl&gt; begins the definition list, &lt;dt&gt; begins the definition term and &lt;dd&gt; begins the definition description.'), '<dl> <dt>'. t('First term') .'</dt> <dd>'. t('First definition') .'</dd> <dt>'. t('Second term') .'</dt> <dd>'. t('Second definition') .'</dd> </dl>'),
-                'dt' => NULL, 'dd' => NULL,
-                'h1' => array( t('Header'), '<h1>'. t('Title') .'</h1>'),
-                'h2' => array( t('Header'), '<h2>'. t('Subtitle') .'</h2>'),
-                'h3' => array( t('Header'), '<h3>'. t('Subtitle three') .'</h3>'),
-                'h4' => array( t('Header'), '<h4>'. t('Subtitle four') .'</h4>'),
-                'h5' => array( t('Header'), '<h5>'. t('Subtitle five') .'</h5>'),
-                'h6' => array( t('Header'), '<h6>'. t('Subtitle six') .'</h6>')
-              );
-              $header = array(t('Tag Description'), t('You Type'), t('You Get'));
-              preg_match_all('/<([a-z0-9]+)[^a-z0-9]/i', $allowed_html, $out);
-              foreach ($out[1] as $tag) {
-                if (array_key_exists($tag, $tips)) {
-                  if ($tips[$tag]) {
-                    $rows[] = array(
-                      array('data' => $tips[$tag][0], 'class' => 'description'),
-                      array('data' => '<code>'. check_plain($tips[$tag][1]) .'</code>', 'class' => 'type'),
-                      array('data' => $tips[$tag][1], 'class' => 'get')
-                    );
-                  }
-                }
-                else {
+            $tips = array(
+              'a' => array(t('Anchors are used to make links to other pages.'), '<a href="'. $base_url .'">'. variable_get('site_name', 'Drupal') .'</a>'),
+              'br' => array(t('By default line break tags are automatically added, so use this tag to add additional ones. Use of this tag is different because it is not used with an open/close pair like all the others. Use the extra " /" inside the tag to maintain XHTML 1.0 compatibility'), t('Text with <br />line break')),
+              'p' => array(t('By default paragraph tags are automatically added, so use this tag to add additional ones.'), '<p>'. t('Paragraph one.') .'</p> <p>'. t('Paragraph two.') .'</p>'),
+              'strong' => array(t('Strong'), '<strong>'. t('Strong') .'</strong>'),
+              'em' => array(t('Emphasized'), '<em>'. t('Emphasized') .'</em>'),
+              'cite' => array(t('Cited'), '<cite>'. t('Cited') .'</cite>'),
+              'code' => array(t('Coded text used to show programming source code'), '<code>'. t('Coded') .'</code>'),
+              'b' => array(t('Bolded'), '<b>'. t('Bolded') .'</b>'),
+              'u' => array(t('Underlined'), '<u>'. t('Underlined') .'</u>'),
+              'i' => array(t('Italicized'), '<i>'. t('Italicized') .'</i>'),
+              'sup' => array(t('Superscripted'), t('<sup>Super</sup>scripted')),
+              'sub' => array(t('Subscripted'), t('<sub>Sub</sub>scripted')),
+              'pre' => array(t('Preformatted'), '<pre>'. t('Preformatted') .'</pre>'),
+              'abbr' => array(t('Abbreviation'), t('<abbr title="Abbreviation">Abbrev.</abbr>')),
+              'acronym' => array(t('Acronym'), t('<acronym title="Three-Letter Acronym">TLA</acronym>')),
+              'blockquote' => array(t('Block quoted'), '<blockquote>'. t('Block quoted') .'</blockquote>'),
+              'q' => array(t('Quoted inline'), '<q>'. t('Quoted inline') .'</q>'),
+              // Assumes and describes tr, td, th.
+              'table' => array(t('Table'), '<table> <tr><th>'. t('Table header') .'</th></tr> <tr><td>'. t('Table cell') .'</td></tr> </table>'),
+              'tr' => NULL, 'td' => NULL, 'th' => NULL,
+              'del' => array(t('Deleted'), '<del>'. t('Deleted') .'</del>'),
+              'ins' => array(t('Inserted'), '<ins>'. t('Inserted') .'</ins>'),
+              // Assumes and describes li.
+              'ol' => array(t('Ordered list - use the &lt;li&gt; to begin each list item'), '<ol> <li>'. t('First item') .'</li> <li>'. t('Second item') .'</li> </ol>'),
+              'ul' => array(t('Unordered list - use the &lt;li&gt; to begin each list item'), '<ul> <li>'. t('First item') .'</li> <li>'. t('Second item') .'</li> </ul>'),
+              'li' => NULL,
+              // Assumes and describes dt and dd.
+              'dl' => array(t('Definition lists are similar to other HTML lists. &lt;dl&gt; begins the definition list, &lt;dt&gt; begins the definition term and &lt;dd&gt; begins the definition description.'), '<dl> <dt>'. t('First term') .'</dt> <dd>'. t('First definition') .'</dd> <dt>'. t('Second term') .'</dt> <dd>'. t('Second definition') .'</dd> </dl>'),
+              'dt' => NULL, 'dd' => NULL,
+              'h1' => array(t('Header'), '<h1>'. t('Title') .'</h1>'),
+              'h2' => array(t('Header'), '<h2>'. t('Subtitle') .'</h2>'),
+              'h3' => array(t('Header'), '<h3>'. t('Subtitle three') .'</h3>'),
+              'h4' => array(t('Header'), '<h4>'. t('Subtitle four') .'</h4>'),
+              'h5' => array(t('Header'), '<h5>'. t('Subtitle five') .'</h5>'),
+              'h6' => array(t('Header'), '<h6>'. t('Subtitle six') .'</h6>'),
+            );
+            $header = array(t('Tag Description'), t('You Type'), t('You Get'));
+            preg_match_all('/<([a-z0-9]+)[^a-z0-9]/i', $allowed_html, $out);
+            foreach ($out[1] as $tag) {
+              if (array_key_exists($tag, $tips)) {
+                if ($tips[$tag]) {
                   $rows[] = array(
-                    array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3),
+                    array('data' => $tips[$tag][0], 'class' => 'description'),
+                    array('data' => '<code>'. check_plain($tips[$tag][1]) .'</code>', 'class' => 'type'),
+                    array('data' => $tips[$tag][1], 'class' => 'get'),
                   );
                 }
               }
-              $output .= theme('table', $header, $rows);
+              else {
+                $rows[] = array(
+                  array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3),
+                );
+              }
+            }
+            $output .= theme('table', $header, $rows);
 
-              $output .= t('
+            $output .= t('
 <p>Most unusual characters can be directly entered without any problems.</p>
 <p>If you do encounter problems, try using HTML character entities. A common example looks like &amp;amp; for an ampersand &amp; character. For a full list of entities see HTML\'s <a href="http://www.w3.org/TR/html4/sgml/entities.html">entities</a> page. Some of the available characters include:</p>');
-              $entities = array(
-                array( t('Ampersand'), '&amp;'),
-                array( t('Greater than'), '&gt;'),
-                array( t('Less than'), '&lt;'),
-                array( t('Quotation mark'), '&quot;'),
+            $entities = array(
+              array(t('Ampersand'), '&amp;'),
+              array(t('Greater than'), '&gt;'),
+              array(t('Less than'), '&lt;'),
+              array(t('Quotation mark'), '&quot;'),
+            );
+            $header = array(t('Character Description'), t('You Type'), t('You Get'));
+            unset($rows);
+            foreach ($entities as $entity) {
+              $rows[] = array(
+                array('data' => $entity[0], 'class' => 'description'),
+                array('data' => '<code>'. check_plain($entity[1]) .'</code>', 'class' => 'type'),
+                array('data' => $entity[1], 'class' => 'get'),
               );
-              $header = array(t('Character Description'), t('You Type'), t('You Get'));
-              unset($rows);
-              foreach ($entities as $entity) {
-                $rows[] = array(
-                  array('data' => $entity[0], 'class' => 'description'),
-                  array('data' => '<code>'. check_plain($entity[1]) .'</code>', 'class' => 'type'),
-                  array('data' => $entity[1], 'class' => 'get')
-                );
-              }
-              $output .= theme('table', $header, $rows);
-              return $output;
-          }
-        }
-        else {
-          return t('No HTML tags allowed');
+            }
+            $output .= theme('table', $header, $rows);
+            return $output;
         }
       }
-      break;
+      else {
+        return t('No HTML tags allowed');
+      }
+    }
+    break;
 
     case 1:
       switch ($long) {
-        case 0:
-          return t('Lines and paragraphs break automatically.');
-        case 1:
-          return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
-      }
-      break;
+      case 0:
+        return t('Lines and paragraphs break automatically.');
+
+      case 1:
+        return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
+    }
+    break;
+
     case 2:
       return t('Web page addresses and e-mail addresses turn into links automatically.');
   }
@@ -352,6 +360,7 @@ function _filter_list_cmp($a, $b) {
 function filter_resolve_format($format) {
   return $format == FILTER_FORMAT_DEFAULT ? variable_get('filter_default_format', 1) : $format;
 }
+
 /**
  * Check if text in a certain input format is allowed to be cached.
  */
@@ -463,12 +472,14 @@ function check_markup($text, $format = F
  *
  * @ingroup forms
  * @see filter_form_validate()
+ *
  * @param $value
  *   The ID of the format that is currently selected.
  * @param $weight
  *   The weight of the input format.
  * @param $parents
  *   Required when defining multiple input formats on a single node or having a different parent than 'format'.
+ *
  * @return
  *   HTML for the form element.
  */
@@ -545,7 +556,6 @@ function filter_access($format) {
  * @} End of "Filtering functions".
  */
 
-
 /**
  * Helper function for fetching filter tips.
  */
@@ -573,7 +583,6 @@ function _filter_tips($format, $long = F
   return $tips;
 }
 
-
 /**
  * Format a link to the more extensive filter tips.
  *
@@ -605,41 +614,51 @@ function filter_filter($op, $delta = 0, 
 
     case 'description':
       switch ($delta) {
-        case 0:
-          return t('Allows you to restrict whether users can post HTML and which tags to filter out. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.');
-        case 1:
-          return t('Converts line breaks into HTML (i.e. &lt;br&gt; and &lt;p&gt; tags).');
-        case 2:
-          return t('Turns web and e-mail addresses into clickable links.');
-        case 3:
-          return t('Corrects faulty and chopped off HTML in postings.');
-        default:
-          return;
-      }
+      case 0:
+        return t('Allows you to restrict whether users can post HTML and which tags to filter out. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.');
+
+      case 1:
+        return t('Converts line breaks into HTML (i.e. &lt;br&gt; and &lt;p&gt; tags).');
+
+      case 2:
+        return t('Turns web and e-mail addresses into clickable links.');
+
+      case 3:
+        return t('Corrects faulty and chopped off HTML in postings.');
+
+      default:
+        return;
+    }
 
     case 'process':
       switch ($delta) {
-        case 0:
-          return _filter_html($text, $format);
-        case 1:
-          return _filter_autop($text);
-        case 2:
-          return _filter_url($text, $format);
-        case 3:
-          return _filter_htmlcorrector($text);
-        default:
-          return $text;
-      }
+      case 0:
+        return _filter_html($text, $format);
+
+      case 1:
+        return _filter_autop($text);
+
+      case 2:
+        return _filter_url($text, $format);
+
+      case 3:
+        return _filter_htmlcorrector($text);
+
+      default:
+        return $text;
+    }
 
     case 'settings':
       switch ($delta) {
-        case 0:
-          return _filter_html_settings($format);
-        case 2:
-          return _filter_url_settings($format);
-        default:
-          return;
-      }
+      case 0:
+        return _filter_html_settings($format);
+
+      case 2:
+        return _filter_url_settings($format);
+
+      default:
+        return;
+    }
 
     default:
       return $text;
@@ -770,8 +789,9 @@ function _filter_htmlcorrector($text) {
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting $null as required).
 
-  $tag = false; // Odd/even counter. Tag or no tag.
-  $stack = array();
+  // Odd/even counter. Tag or no tag.
+  $tag    = false;
+  $stack  = array();
   $output = '';
   foreach ($split as $value) {
     // Process HTML tags.
@@ -827,7 +847,7 @@ function _filter_htmlcorrector($text) {
  */
 function _filter_url_parse_full_links($match) {
   $match[2] = decode_entities($match[2]);
-  $caption = check_plain(_filter_url_trim($match[2]));
+  $caption  = check_plain(_filter_url_trim($match[2]));
   $match[2] = check_url($match[2]);
   return $match[1] .'<a href="'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[5];
 }
@@ -837,7 +857,7 @@ function _filter_url_parse_full_links($m
  */
 function _filter_url_parse_partial_links($match) {
   $match[2] = decode_entities($match[2]);
-  $caption = check_plain(_filter_url_trim($match[2]));
+  $caption  = check_plain(_filter_url_trim($match[2]));
   $match[2] = check_plain($match[2]);
   return $match[1] .'<a href="http://'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[3];
 }
@@ -874,9 +894,9 @@ function _filter_autop($text) {
   $chunks = preg_split('@(</?(?:pre|script|style|object)[^>]*>)@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting NULL as required).
-  $ignore = FALSE;
+  $ignore    = FALSE;
   $ignoretag = '';
-  $output = '';
+  $output    = '';
   foreach ($chunks as $i => $chunk) {
     if ($i % 2) {
       // Opening or closing tag?
@@ -895,19 +915,27 @@ function _filter_autop($text) {
       }
     }
     else if (!$ignore) {
-      $chunk = preg_replace('|\n*$|', '', $chunk) ."\n\n"; // just to make things a little easier, pad the end
+      // just to make things a little easier, pad the end
+      $chunk = preg_replace('|\n*$|', '', $chunk) ."\n\n";
       $chunk = preg_replace('|<br />\s*<br />|', "\n\n", $chunk);
-      $chunk = preg_replace('!(<'. $block .'[^>]*>)!', "\n$1", $chunk); // Space things out a little
-      $chunk = preg_replace('!(</'. $block .'>)!', "$1\n\n", $chunk); // Space things out a little
-      $chunk = preg_replace("/\n\n+/", "\n\n", $chunk); // take care of duplicates
-      $chunk = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $chunk); // make paragraphs, including one at the end
-      $chunk = preg_replace('|<p>\s*</p>\n|', '', $chunk); // under certain strange conditions it could create a P of entirely whitespace
-      $chunk = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk); // problem with nested lists
+      // Space things out a little
+      $chunk = preg_replace('!(<'. $block .'[^>]*>)!', "\n$1", $chunk);
+      // Space things out a little
+      $chunk = preg_replace('!(</'. $block .'>)!', "$1\n\n", $chunk);
+      // take care of duplicates
+      $chunk = preg_replace("/\n\n+/", "\n\n", $chunk);
+      // make paragraphs, including one at the end
+      $chunk = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $chunk);
+      // under certain strange conditions it could create a P of entirely whitespace
+      $chunk = preg_replace('|<p>\s*</p>\n|', '', $chunk);
+      // problem with nested lists
+      $chunk = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk);
       $chunk = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $chunk);
       $chunk = str_replace('</blockquote></p>', '</p></blockquote>', $chunk);
       $chunk = preg_replace('!<p>\s*(</?'. $block .'[^>]*>)!', "$1", $chunk);
       $chunk = preg_replace('!(</?'. $block .'[^>]*>)\s*</p>!', "$1", $chunk);
-      $chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); // make line breaks
+      // make line breaks
+      $chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk);
       $chunk = preg_replace('!(</?'. $block .'[^>]*>)\s*<br />!', "$1", $chunk);
       $chunk = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $chunk);
       $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&amp;$1', $chunk);
@@ -994,6 +1022,7 @@ function filter_xss($string, $allowed_ta
  *   If $store is FALSE then the array has one element, the HTML tag to process.
  * @param $store
  *   Whether to store $m.
+ *
  * @return
  *   If the element isn't allowed, an empty string. Otherwise, the cleaned up
  *   version of the HTML element.
@@ -1022,8 +1051,8 @@ function _filter_xss_split($m, $store = 
     return '';
   }
 
-  $slash = trim($matches[1]);
-  $elem = &$matches[2];
+  $slash    = trim($matches[1]);
+  $elem     = &$matches[2];
   $attrlist = &$matches[3];
 
   if (!isset($allowed_html[strtolower($elem)])) {
@@ -1055,8 +1084,8 @@ function _filter_xss_split($m, $store = 
  *   Cleaned up version of the HTML attributes.
  */
 function _filter_xss_attributes($attr) {
-  $attrarr = array();
-  $mode = 0;
+  $attrarr  = array();
+  $mode     = 0;
   $attrname = '';
 
   while (strlen($attr) != 0) {
@@ -1068,29 +1097,29 @@ function _filter_xss_attributes($attr) {
         // Attribute name, href for instance
         if (preg_match('/^([-a-zA-Z]+)/', $attr, $match)) {
           $attrname = strtolower($match[1]);
-          $skip = ($attrname == 'style' || substr($attrname, 0, 2) == 'on');
-          $working = $mode = 1;
-          $attr = preg_replace('/^[-a-zA-Z]+/', '', $attr);
+          $skip     = ($attrname == 'style' || substr($attrname, 0, 2) == 'on');
+          $working  = $mode = 1;
+          $attr     = preg_replace('/^[-a-zA-Z]+/', '', $attr);
         }
-
         break;
 
       case 1:
         // Equals sign or valueless ("selected")
         if (preg_match('/^\s*=\s*/', $attr)) {
-          $working = 1; $mode = 2;
-          $attr = preg_replace('/^\s*=\s*/', '', $attr);
+          $working = 1;
+          $mode    = 2;
+          $attr    = preg_replace('/^\s*=\s*/', '', $attr);
           break;
         }
 
         if (preg_match('/^\s+/', $attr)) {
-          $working = 1; $mode = 0;
+          $working = 1;
+          $mode = 0;
           if (!$skip) {
             $attrarr[] = $attrname;
           }
           $attr = preg_replace('/^\s+/', '', $attr);
         }
-
         break;
 
       case 2:
@@ -1102,8 +1131,8 @@ function _filter_xss_attributes($attr) {
             $attrarr[] = "$attrname=\"$thisval\"";
           }
           $working = 1;
-          $mode = 0;
-          $attr = preg_replace('/^"[^"]*"(\s+|$)/', '', $attr);
+          $mode    = 0;
+          $attr    = preg_replace('/^"[^"]*"(\s+|$)/', '', $attr);
           break;
         }
 
@@ -1113,8 +1142,9 @@ function _filter_xss_attributes($attr) {
           if (!$skip) {
             $attrarr[] = "$attrname='$thisval'";;
           }
-          $working = 1; $mode = 0;
-          $attr = preg_replace("/^'[^']*'(\s+|$)/", '', $attr);
+          $working = 1;
+          $mode    = 0;
+          $attr    = preg_replace("/^'[^']*'(\s+|$)/", '', $attr);
           break;
         }
 
@@ -1124,10 +1154,10 @@ function _filter_xss_attributes($attr) {
           if (!$skip) {
             $attrarr[] = "$attrname=\"$thisval\"";
           }
-          $working = 1; $mode = 0;
-          $attr = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attr);
+          $working = 1;
+          $mode    = 0;
+          $attr    = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attr);
         }
-
         break;
     }
 
@@ -1164,6 +1194,7 @@ function _filter_xss_attributes($attr) {
  * @param $decode
  *   Whether to decode entities in the $string. Set to FALSE if the $string
  *   is in plain text, TRUE otherwise. Defaults to TRUE.
+ *
  * @return
  *   Cleaned up and HTML-escaped version of $string.
  */
@@ -1205,3 +1236,4 @@ function filter_xss_bad_protocol($string
 /**
  * @} End of "Standard filters".
  */
+
Index: modules/filter/filter.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 filter.pages.inc
--- modules/filter/filter.pages.inc	10 Nov 2007 17:41:18 -0000	1.2
+++ modules/filter/filter.pages.inc	21 Jan 2008 21:58:53 -0000
@@ -1,12 +1,12 @@
 <?php
 // $Id: filter.pages.inc,v 1.2 2007/11/10 17:41:18 dries Exp $
 
+
 /**
  * @file
  * User page callbacks for the filter module.
  */
 
-
 /**
  * Menu callback; show a page with long filter tips.
  */
@@ -21,7 +21,6 @@ function filter_tips_long() {
   return $output;
 }
 
-
 /**
  * Format a set of filter tips.
  *
@@ -64,3 +63,4 @@ function theme_filter_tips($tips, $long 
 
   return $output;
 }
+
Index: modules/forum/forum-icon.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-icon.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 forum-icon.tpl.php
--- modules/forum/forum-icon.tpl.php	20 Dec 2007 09:35:09 -0000	1.3
+++ modules/forum/forum-icon.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum-icon.tpl.php,v 1.3 2007/12/20 09:35:09 goba Exp $
 
+
 /**
  * @file forum-icon.tpl.php
  * Display an appropriate icon for a forum post.
@@ -14,12 +15,18 @@
  * @see theme_forum_icon()
  */
 ?>
-<?php if ($new_posts): ?>
+
+<?php if ($new_posts):
+?>
   <a name="new">
 <?php endif; ?>
 
-<?php print theme('image', "misc/forum-$icon.png") ?>
 
-<?php if ($new_posts): ?>
+<?php print theme('image', "misc/forum-$icon.png")?>
+
+
+<?php if ($new_posts):
+?>
   </a>
-<?php endif; ?>
+<?php endif; 
+
Index: modules/forum/forum-list.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-list.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 forum-list.tpl.php
--- modules/forum/forum-list.tpl.php	30 Aug 2007 18:58:12 -0000	1.4
+++ modules/forum/forum-list.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum-list.tpl.php,v 1.4 2007/08/30 18:58:12 goba Exp $
 
+
 /**
  * @file forum-list.tpl.php
  * Default theme implementation to display a list of forums and containers.
@@ -35,38 +36,48 @@
   <thead>
     <tr>
       <th><?php print t('Forum'); ?></th>
-      <th><?php print t('Topics');?></th>
+      <th><?php print t('Topics'); ?></th>
       <th><?php print t('Posts'); ?></th>
       <th><?php print t('Last post'); ?></th>
     </tr>
   </thead>
   <tbody>
-  <?php foreach ($forums as $child_id => $forum): ?>
+  <?php foreach ($forums as $child_id => $forum):
+?>
     <tr id="forum-list-<?php print $child_id; ?>" class="<?php print $forum->zebra; ?>">
       <td <?php print $forum->is_container ? 'colspan="4" class="container"' : 'class="forum"'; ?>>
-        <?php /* Enclose the contents of this cell with X divs, where X is the
+/* Enclose the contents of this cell with X divs, where X is the
                * depth this forum resides at. This will allow us to use CSS
                * left-margin for indenting.
-               */ ?>
-        <?php print str_repeat('<div class="indent">', $forum->depth); ?>
+               */
+        <?php
+?>
+
+<?php print str_repeat('<div class="indent">', $forum->depth); ?>
           <div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->name; ?></a></div>
-          <?php if ($forum->description): ?>
+          <?php if ($forum->description):
+?>
             <div class="description"><?php print $forum->description; ?></div>
           <?php endif; ?>
-        <?php print str_repeat('</div>', $forum->depth); ?>
+
+<?php print str_repeat('</div>', $forum->depth); ?>
       </td>
-      <?php if (!$forum->is_container): ?>
+      <?php if (!$forum->is_container):
+?>
         <td class="topics">
-          <?php print $forum->num_topics ?>
-          <?php if ($forum->new_topics): ?>
+          <?php print $forum->num_topics?>
+
+<?php if ($forum->new_topics):
+?>
             <br />
             <a href="<?php print $forum->new_url; ?>"><?php print $forum->new_text; ?></a>
           <?php endif; ?>
         </td>
-        <td class="posts"><?php print $forum->num_posts ?></td>
-        <td class="last-reply"><?php print $forum->last_reply ?></td>
+        <td class="posts"><?php print $forum->num_posts?></td>
+        <td class="last-reply"><?php print $forum->last_reply?></td>
       <?php endif; ?>
     </tr>
   <?php endforeach; ?>
   </tbody>
 </table>
+
Index: modules/forum/forum-submitted.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-submitted.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 forum-submitted.tpl.php
--- modules/forum/forum-submitted.tpl.php	7 Aug 2007 08:39:35 -0000	1.3
+++ modules/forum/forum-submitted.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum-submitted.tpl.php,v 1.3 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file forum-submitted.tpl.php
  * Default theme implementation to format a simple string indicated when and
@@ -17,12 +18,23 @@
  * @see theme_forum_submitted()
  */
 ?>
-<?php if ($time): ?>
-  <?php print t(
+
+<?php if ($time):
+?>
+
+<?php print t(
   '@time ago<br />by !author', array(
     '@time' => $time,
     '!author' => $author,
-    )); ?>
-<?php else: ?>
-  <?php print t('n/a'); ?>
-<?php endif; ?>
+  )
+);
+?>
+
+<?php
+else:
+?>
+
+<?php print t('n/a'); ?>
+
+<?php endif; 
+
Index: modules/forum/forum-topic-list.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-topic-list.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 forum-topic-list.tpl.php
--- modules/forum/forum-topic-list.tpl.php	30 Aug 2007 18:58:12 -0000	1.4
+++ modules/forum/forum-topic-list.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum-topic-list.tpl.php,v 1.4 2007/08/30 18:58:12 goba Exp $
 
+
 /**
  * @file forum-topic-list.tpl.php
  * Theme implementation to display a list of forum topics.
@@ -38,25 +39,33 @@
     <tr><?php print $header; ?></tr>
   </thead>
   <tbody>
-  <?php foreach ($topics as $topic): ?>
-    <tr class="<?php print $topic->zebra;?>">
+  <?php foreach ($topics as $topic):
+?>
+    <tr class="<?php print $topic->zebra; ?>">
       <td class="icon"><?php print $topic->icon; ?></td>
       <td class="title"><?php print $topic->title; ?></td>
-    <?php if ($topic->moved): ?>
+    <?php if ($topic->moved):
+?>
       <td colspan="3"><?php print $topic->message; ?></td>
-    <?php else: ?>
+    <?php
+else:
+?>
       <td class="replies">
         <?php print $topic->num_comments; ?>
-        <?php if ($topic->new_replies): ?>
+
+<?php if ($topic->new_replies):
+?>
           <br />
           <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
         <?php endif; ?>
       </td>
       <td class="created"><?php print $topic->created; ?>
       <td class="last-reply"><?php print $topic->last_reply; ?>
-    <?php endif; ?>
+
+<?php endif; ?>
     </tr>
   <?php endforeach; ?>
   </tbody>
 </table>
-<?php print $pager; ?>
+<?php print $pager; 
+
Index: modules/forum/forum-topic-navigation.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-topic-navigation.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 forum-topic-navigation.tpl.php
--- modules/forum/forum-topic-navigation.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/forum/forum-topic-navigation.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum-topic-navigation.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file forum-topic-navigation.tpl.php
  * Default theme implementation to display the topic navigation string at the
@@ -23,13 +24,19 @@
  * @see theme_forum_topic_navigation()
  */
 ?>
-<?php if ($prev || $next): ?>
+
+<?php if ($prev || $next):
+?>
   <div class="forum-topic-navigation clear-block">
-    <?php if ($prev): ?>
-      <a href="<?php print $prev_url; ?>" class="topic-previous" title="<?php print t('Go to previous forum topic') ?>">‹ <?php print $prev_title ?></a>
+    <?php if ($prev):
+?>
+      <a href="<?php print $prev_url; ?>" class="topic-previous" title="<?php print t('Go to previous forum topic')?>">‹ <?php print $prev_title?></a>
     <?php endif; ?>
-    <?php if ($next): ?>
-      <a href="<?php print $next_url; ?>" class="topic-next" title="<?php print t('Go to next forum topic') ?>"><?php print $next_title ?> ›</a>
+
+<?php if ($next):
+?>
+      <a href="<?php print $next_url; ?>" class="topic-next" title="<?php print t('Go to next forum topic')?>"><?php print $next_title?> ›</a>
     <?php endif; ?>
   </div>
-<?php endif; ?>
+<?php endif; 
+
Index: modules/forum/forum.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v
retrieving revision 1.7
diff -u -p -r1.7 forum.admin.inc
--- modules/forum/forum.admin.inc	8 Jan 2008 10:35:41 -0000	1.7
+++ modules/forum/forum.admin.inc	21 Jan 2008 21:58:53 -0000
@@ -1,11 +1,11 @@
 <?php
 // $Id: forum.admin.inc,v 1.7 2008/01/08 10:35:41 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbacks for the forum module.
  */
-
 function forum_form_main($type, $edit = array()) {
   if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || !empty($_POST['confirm'])) {
     return drupal_get_form('forum_confirm_delete', $edit['tid']);
@@ -13,10 +13,11 @@ function forum_form_main($type, $edit = 
   switch ($type) {
     case 'forum':
       return drupal_get_form('forum_form_forum', $edit);
-      break;
+    break;
+
     case 'container':
       return drupal_get_form('forum_form_container', $edit);
-      break;
+    break;
   }
 }
 
@@ -55,7 +56,7 @@ function forum_form_forum(&$form_state, 
   );
 
   $form['vid'] = array('#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', ''));
-  $form['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
+  $form['submit'] = array('#type' => 'submit', '#value' => t('Save'));
   if ($edit['tid']) {
     $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
     $form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);
@@ -89,6 +90,7 @@ function forum_form_submit($form, &$form
       }
       drupal_set_message(t('Created new @type %term.', array('%term' => $form_state['values']['name'], '@type' => $type)));
       break;
+
     case SAVED_UPDATED:
       drupal_set_message(t('The @type %term has been updated.', array('%term' => $form_state['values']['name'], '@type' => $type)));
       break;
@@ -118,14 +120,14 @@ function forum_form_container(&$form_sta
     '#default_value' => $edit['name'],
     '#maxlength' => 255,
     '#description' => t('Short but meaningful name for this collection of related forums.'),
-    '#required' => TRUE
+    '#required' => TRUE,
   );
 
   $form['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
     '#default_value' => $edit['description'],
-    '#description' => t('Description and guidelines for forums within this container.')
+    '#description' => t('Description and guidelines for forums within this container.'),
   );
   $form['parent']['#tree'] = TRUE;
   $form['parent'][0] = _forum_parent_select($edit['tid'], t('Parent'), 'container');
@@ -133,7 +135,7 @@ function forum_form_container(&$form_sta
     '#type' => 'weight',
     '#title' => t('Weight'),
     '#default_value' => $edit['weight'],
-    '#description' => t('Containers are displayed in ascending order by weight (containers with equal weights are displayed alphabetically).')
+    '#description' => t('Containers are displayed in ascending order by weight (containers with equal weights are displayed alphabetically).'),
   );
 
   $form['vid'] = array(
@@ -142,7 +144,7 @@ function forum_form_container(&$form_sta
   );
   $form['submit'] = array(
     '#type' => 'submit',
-    '#value' => t('Save')
+    '#value' => t('Save'),
   );
   if ($edit['tid']) {
     $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
@@ -215,11 +217,11 @@ function forum_admin_settings() {
  * Returns an overview list of existing forums and containers
  */
 function forum_overview(&$form_state) {
-  include_once(drupal_get_path('module', 'taxonomy') .'/taxonomy.admin.inc');
+  include_once (drupal_get_path('module', 'taxonomy') .'/taxonomy.admin.inc');
 
-  $vid = variable_get('forum_nav_vocabulary', '');
+  $vid        = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
-  $form = taxonomy_overview_terms($form_state, $vocabulary);
+  $form       = taxonomy_overview_terms($form_state, $vocabulary);
   drupal_set_title('Forums');
 
   foreach (element_children($form) as $key) {
@@ -240,8 +242,9 @@ function forum_overview(&$form_state) {
 
   // The form needs to have submit and validate handlers set explicitly.
   $form['#theme'] = 'taxonomy_overview_terms';
-  $form['#submit'] = array('taxonomy_overview_terms_submit'); // Use the existing taxonomy overview submit handler.
-  $form['#validate'] = array('taxonomy_overview_terms_validate');
+  // Use the existing taxonomy overview submit handler.
+  $form['#submit']     = array('taxonomy_overview_terms_submit');
+  $form['#validate']   = array('taxonomy_overview_terms_validate');
   $form['#empty_text'] = '<em>'. t('There are no existing containers or forums. Containers and forums may be added using the <a href="@container">add container</a> and <a href="@forum">add forum</a> pages.', array('@container' => url('admin/content/forum/add/container'), '@forum' => url('admin/content/forum/add/forum'))) .'</em>';
   return $form;
 }
@@ -291,3 +294,4 @@ function _forum_parent_select($tid, $tit
 
   return array('#type' => 'select', '#title' => $title, '#default_value' => $parent, '#options' => $options, '#description' => $description, '#required' => TRUE);
 }
+
Index: modules/forum/forum.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.install,v
retrieving revision 1.16
diff -u -p -r1.16 forum.install
--- modules/forum/forum.install	31 Dec 2007 16:58:34 -0000	1.16
+++ modules/forum/forum.install	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum.install,v 1.16 2007/12/31 16:58:34 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -92,7 +93,7 @@ function forum_schema() {
     ),
     'indexes' => array(
       'nid' => array('nid'),
-      'tid' => array('tid')
+      'tid' => array('tid'),
     ),
     'primary key' => array('vid'),
   );
@@ -129,3 +130,4 @@ function forum_update_6000() {
 
   return $ret;
 }
+
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.446
diff -u -p -r1.446 forum.module
--- modules/forum/forum.module	15 Jan 2008 08:16:45 -0000	1.446
+++ modules/forum/forum.module	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum.module,v 1.446 2008/01/15 08:16:45 dries Exp $
 
+
 /**
  * @file
  * Enable threaded discussions about general topics.
@@ -21,12 +22,16 @@ function forum_help($path, $arg) {
       $output .= '<li>'. t('selecting <em>Disabled</em> under <em>Comment settings</em> while editing a forum topic will hide all existing comments on the thread, and prevent new ones.') .'</li></ul>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@forum">Forum module</a>.', array('@forum' => 'http://drupal.org/handbook/modules/forum/')) .'</p>';
       return $output;
+
     case 'admin/content/forum':
       return '<p>'. t('This page displays a list of existing forums and containers. Containers (optionally) hold forums, and forums hold forum topics (a forum topic is the initial post to a threaded discussion). To provide structure, both containers and forums may be placed inside other containers and forums. To rearrange forums and containers, grab a drag-and-drop handle under the <em>Name</em> column and drag the forum or container to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save</em> button at the bottom of the page.') .'</p>';
+
     case 'admin/content/forum/add/container':
       return '<p>'. t('By grouping related or similar forums, containers help organize forums. For example, a container named "Food" may hold two forums named "Fruit" and "Vegetables", respectively.') .'</p>';
+
     case 'admin/content/forum/add/forum':
       return '<p>'. t('A forum holds related or similar forum topics (a forum topic is the initial post to a threaded discussion). For example, a forum named "Fruit" may contain forum topics titled "Apples" and "Bananas", respectively.') .'</p>';
+
     case 'admin/content/forum/settings':
       return '<p>'. t('These settings allow you to adjust the display of your forum topics. The content types available for use within a forum may be selected by editing the <em>Content types</em> on the <a href="@forum-vocabulary">forum vocabulary page</a>.', array('@forum-vocabulary' => url('admin/content/taxonomy/edit/vocabulary/'. variable_get('forum_nav_vocabulary', '')))) .'</p>';
   }
@@ -149,7 +154,6 @@ function forum_menu() {
   return $items;
 }
 
-
 /**
  * Implementation of hook_init().
  */
@@ -218,6 +222,7 @@ function forum_nodeapi(&$node, $op, $tea
 
     // Check in particular that only a "leaf" term in the associated taxonomy
     // vocabulary is selected, not a "container" term.
+
     case 'validate':
       if ($node->taxonomy) {
         // Extract the node's proper topic ID.
@@ -235,6 +240,7 @@ function forum_nodeapi(&$node, $op, $tea
       break;
 
     // Assign forum taxonomy when adding a topic from within a forum.
+
     case 'presave':
       // Make sure all fields are set properly:
       $node->icon = !empty($node->icon) ? $node->icon : '';
@@ -269,7 +275,6 @@ function forum_nodeapi(&$node, $op, $tea
         break;
       }
       // Deliberate no break -- for new revisions and for previously unassigned terms we need an insert.
-
     case 'insert':
       if (!empty($node->tid)) {
         db_query('INSERT INTO {forum} (tid, vid, nid) VALUES (%d, %d, %d)', $node->tid, $node->vid, $node->nid);
@@ -297,7 +302,7 @@ function forum_node_info() {
       'module' => 'forum',
       'description' => t('A <em>forum topic</em> is the initial post to a new discussion thread within a forum.'),
       'title_label' => t('Subject'),
-    )
+    ),
   );
 }
 
@@ -308,8 +313,10 @@ function forum_access($op, $node, $accou
   switch ($op) {
     case 'create':
       return user_access('create forum topics', $account);
+
     case 'update':
       return user_access('edit any forum topic', $account) || (user_access('edit own forum topics', $account) && ($account->uid == $node->uid));
+
     case 'delete':
       return user_access('delete any forum topic', $account) || (user_access('delete own forum topics', $account) && ($account->uid == $node->uid));
   }
@@ -343,6 +350,7 @@ function forum_taxonomy($op, $type, $ter
         }
         variable_set('forum_containers', $containers);
         break;
+
       case 'vocabulary':
         variable_del('forum_nav_vocabulary');
     }
@@ -415,27 +423,27 @@ function forum_block($op = 'list', $delt
     case 'view':
       if (user_access('access content')) {
         switch ($delta) {
-          case 0:
-            $title = t('Active forum topics');
-            $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {term_node} tn ON tn.nid = n.nid INNER JOIN {term_data} td ON td.tid = tn.tid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND td.vid = %d ORDER BY l.last_comment_timestamp DESC");
-            $result = db_query_range($sql, variable_get('forum_nav_vocabulary', ''), 0, variable_get('forum_block_num_0', '5'));
-            $content = node_title_list($result);
-            break;
-
-          case 1:
-            $title = t('New forum topics');
-            $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {term_node} tn ON tn.nid = n.nid INNER JOIN {term_data} td ON td.tid = tn.tid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND td.vid = %d ORDER BY n.nid DESC");
-            $result = db_query_range($sql, variable_get('forum_nav_vocabulary', ''), 0, variable_get('forum_block_num_1', '5'));
-            $content = node_title_list($result);
-            break;
-        }
-
-        if (!empty($content)) {
-          $block['subject'] = $title;
-          $block['content'] = $content . theme('more_link', url('forum'), t('Read the latest forum topics.'));
-          return $block;
-        }
+        case 0:
+          $title   = t('Active forum topics');
+          $sql     = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {term_node} tn ON tn.nid = n.nid INNER JOIN {term_data} td ON td.tid = tn.tid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND td.vid = %d ORDER BY l.last_comment_timestamp DESC");
+          $result  = db_query_range($sql, variable_get('forum_nav_vocabulary', ''), 0, variable_get('forum_block_num_0', '5'));
+          $content = node_title_list($result);
+          break;
+
+        case 1:
+          $title   = t('New forum topics');
+          $sql     = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {term_node} tn ON tn.nid = n.nid INNER JOIN {term_data} td ON td.tid = tn.tid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND td.vid = %d ORDER BY n.nid DESC");
+          $result  = db_query_range($sql, variable_get('forum_nav_vocabulary', ''), 0, variable_get('forum_block_num_1', '5'));
+          $content = node_title_list($result);
+          break;
+      }
+
+      if (!empty($content)) {
+        $block['subject'] = $title;
+        $block['content'] = $content . theme('more_link', url('forum'), t('Read the latest forum topics.'));
+        return $block;
       }
+    }
   }
 }
 
@@ -467,8 +475,8 @@ function forum_link_alter(&$links, $node
     if (strstr($module, 'taxonomy_term')) {
       // Link back to the forum and not the taxonomy term page. We'll only
       // do this if the taxonomy term in question belongs to forums.
-      $tid = str_replace('taxonomy/term/', '', $link['href']);
-      $vid = variable_get('forum_nav_vocabulary', '');
+      $tid  = str_replace('taxonomy/term/', '', $link['href']);
+      $vid  = variable_get('forum_nav_vocabulary', '');
       $term = taxonomy_get_term($tid);
       if ($term->vid == $vid) {
         $links[$module]['href'] = str_replace('taxonomy/term', 'forum', $link['href']);
@@ -487,21 +495,22 @@ function forum_link_alter(&$links, $node
  *
  * @param $tid
  *   Taxonomy ID of the vocabulary that holds the forum list.
+ *
  * @return
  *   Array of object containing the forum information.
  */
 function forum_get_forums($tid = 0) {
 
-  $forums = array();
-  $vid = variable_get('forum_nav_vocabulary', '');
+  $forums  = array();
+  $vid     = variable_get('forum_nav_vocabulary', '');
   $_forums = taxonomy_get_tree($vid, $tid);
 
   if (count($_forums)) {
 
     $counts = array();
 
-    $sql = "SELECT r.tid, COUNT(n.nid) AS topic_count, SUM(l.comment_count) AS comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {term_node} r ON n.nid = r.nid WHERE n.status = 1 GROUP BY r.tid";
-    $sql = db_rewrite_sql($sql);
+    $sql     = "SELECT r.tid, COUNT(n.nid) AS topic_count, SUM(l.comment_count) AS comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {term_node} r ON n.nid = r.nid WHERE n.status = 1 GROUP BY r.tid";
+    $sql     = db_rewrite_sql($sql);
     $_counts = db_query($sql);
     while ($count = db_fetch_object($_counts)) {
       $counts[$count->tid] = $count;
@@ -525,8 +534,8 @@ function forum_get_forums($tid = 0) {
     // This query does not use full ANSI syntax since MySQL 3.x does not support
     // table1 INNER JOIN table2 INNER JOIN table3 ON table2_criteria ON table3_criteria
     // used to join node_comment_statistics to users.
-    $sql = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name, ncs.last_comment_uid FROM {node} n INNER JOIN {users} u1 ON n.uid = u1.uid INNER JOIN {term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {users} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
-    $sql = db_rewrite_sql($sql);
+    $sql   = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name, ncs.last_comment_uid FROM {node} n INNER JOIN {users} u1 ON n.uid = u1.uid INNER JOIN {term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {users} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
+    $sql   = db_rewrite_sql($sql);
     $topic = db_fetch_object(db_query_range($sql, $forum->tid, 0, 1));
 
     $last_post = new stdClass();
@@ -575,7 +584,8 @@ function forum_get_topics($tid, $sortby,
 
   $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
   $sql .= tablesort_sql($forum_topic_list_header, 'n.sticky DESC,');
-  $sql .= ', n.created DESC';  // Always add a secondary sort order so that the news forum topics are on top.
+  // Always add a secondary sort order so that the news forum topics are on top.
+  $sql .= ', n.created DESC';
 
   $sql_count = db_rewrite_sql("SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid AND r.tid = %d WHERE n.status = 1");
 
@@ -588,9 +598,9 @@ function forum_get_topics($tid, $sortby,
         $topic->new = 0;
       }
       else {
-        $history = _forum_user_last_visit($topic->nid);
+        $history            = _forum_user_last_visit($topic->nid);
         $topic->new_replies = comment_num_new($topic->nid, $history);
-        $topic->new = $topic->new_replies || ($topic->timestamp > $history);
+        $topic->new         = $topic->new_replies || ($topic->timestamp > $history);
       }
     }
     else {
@@ -641,9 +651,9 @@ function _forum_new($tid) {
 function template_preprocess_forums(&$variables) {
   global $user;
 
-  $vid = variable_get('forum_nav_vocabulary', '');
+  $vid        = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
-  $title = !empty($vocabulary->name) ? $vocabulary->name : '';
+  $title      = !empty($vocabulary->name) ? $vocabulary->name : '';
 
   // Breadcrumb navigation:
   $breadcrumb[] = l(t('Home'), NULL);
@@ -720,11 +730,10 @@ function template_preprocess_forums(&$va
     else {
       $variables['template_files'][] = 'forums-'. $variables['tid'];
     }
-
   }
   else {
     drupal_set_title(t('No forums defined'));
-    $variables['links'] = array();
+    $variables['links']  = array();
     $variables['forums'] = '';
     $variables['topics'] = '';
   }
@@ -825,7 +834,6 @@ function template_preprocess_forum_topic
         $variables['topics'][$id]->new_text = format_plural($topic->new_replies, '1 new', '@count new');
         $variables['topics'][$id]->new_url = url("node/$topic->nid", array('query' => comment_new_page_count($topic->num_comments, $topic->new_replies, $topic), 'fragment' => 'new'));
       }
-
     }
   }
   else {
@@ -934,16 +942,19 @@ function _forum_get_topic_order($sortby)
   switch ($sortby) {
     case 1:
       return array('field' => 'l.last_comment_timestamp', 'sort' => 'desc');
-      break;
+    break;
+
     case 2:
       return array('field' => 'l.last_comment_timestamp', 'sort' => 'asc');
-      break;
+    break;
+
     case 3:
       return array('field' => 'l.comment_count', 'sort' => 'desc');
-      break;
+    break;
+
     case 4:
       return array('field' => 'l.comment_count', 'sort' => 'asc');
-      break;
+    break;
   }
 }
 
@@ -951,3 +962,4 @@ function _forum_get_topic_order_sql($sor
   $order = _forum_get_topic_order($sortby);
   return $order['field'] .' '. $order['sort'];
 }
+
Index: modules/forum/forum.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 forum.pages.inc
--- modules/forum/forum.pages.inc	26 Jul 2007 06:48:03 -0000	1.2
+++ modules/forum/forum.pages.inc	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forum.pages.inc,v 1.2 2007/07/26 06:48:03 dries Exp $
 
+
 /**
  * @file
  * User page callbacks for the forum module.
@@ -10,9 +11,9 @@
  * Menu callback; prints a forum listing.
  */
 function forum_page($tid = 0) {
-  $topics = '';
+  $topics         = '';
   $forum_per_page = variable_get('forum_per_page', 25);
-  $sortby = variable_get('forum_order', 1);
+  $sortby         = variable_get('forum_order', 1);
 
   $forums = forum_get_forums($tid);
   $parents = taxonomy_get_parents_all($tid);
@@ -22,3 +23,4 @@ function forum_page($tid = 0) {
 
   return theme('forums', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
 }
+
Index: modules/forum/forums.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forums.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 forums.tpl.php
--- modules/forum/forums.tpl.php	7 Aug 2007 08:39:35 -0000	1.4
+++ modules/forum/forums.tpl.php	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: forums.tpl.php,v 1.4 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file forums.tpl.php
  * Default theme implementation to display a forum which may contain forum
@@ -18,10 +19,15 @@
  * @see theme_forums()
  */
 ?>
-<?php if ($forums_defined): ?>
+
+<?php if ($forums_defined):
+?>
 <div id="forum">
   <?php print theme('links', $links); ?>
-  <?php print $forums; ?>
-  <?php print $topics; ?>
+
+<?php print $forums; ?>
+
+<?php print $topics; ?>
 </div>
-<?php endif; ?>
+<?php endif; 
+
Index: modules/help/help.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.admin.inc,v
retrieving revision 1.5
diff -u -p -r1.5 help.admin.inc
--- modules/help/help.admin.inc	25 Nov 2007 11:11:17 -0000	1.5
+++ modules/help/help.admin.inc	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: help.admin.inc,v 1.5 2007/11/25 11:11:17 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the help module.
@@ -40,7 +41,6 @@ function help_page($name) {
       ksort($admin_tasks);
       $output .= theme('item_list', $admin_tasks, t('@module administration pages', array('@module' => $module['name'])));
     }
-
   }
   return $output;
 }
@@ -58,10 +58,10 @@ function help_links_as_list() {
   asort($modules);
 
   // Output pretty four-column list
-  $count = count($modules);
-  $break = ceil($count / 4);
+  $count  = count($modules);
+  $break  = ceil($count / 4);
   $output = '<div class="clear-block"><div class="help-items"><ul>';
-  $i = 0;
+  $i      = 0;
   foreach ($modules as $module => $name) {
     $output .= '<li>'. l($name, 'admin/help/'. $module) .'</li>';
     if (($i + 1) % $break == 0 && ($i + 1) != $count) {
Index: modules/help/help.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.module,v
retrieving revision 1.78
diff -u -p -r1.78 help.module
--- modules/help/help.module	14 Dec 2007 18:08:46 -0000	1.78
+++ modules/help/help.module	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: help.module,v 1.78 2007/12/14 18:08:46 goba Exp $
 
+
 /**
  * @file
  * Manages displaying online help.
@@ -39,9 +40,11 @@ function help_help($path, $arg) {
     case 'admin/help':
       $output = '<p>'. t('This guide provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
       return $output;
+
     case 'admin/help#help':
       $output = '<p>'. t('The help module provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@help">Help module</a>.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'</p>';
       return $output;
   }
 }
+
Index: modules/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.27
diff -u -p -r1.27 locale.install
--- modules/locale/locale.install	10 Jan 2008 14:35:24 -0000	1.27
+++ modules/locale/locale.install	21 Jan 2008 21:58:53 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: locale.install,v 1.27 2008/01/10 14:35:24 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -84,7 +85,8 @@ function locale_update_6000() {
         'not null' => TRUE,
         'default' => 0,
       ),
-      'javascript' => array( //Adds a column to store the filename of the JavaScript translation file.
+        //Adds a column to store the filename of the JavaScript translation file.
+      'javascript' => array(
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
@@ -108,7 +110,7 @@ function locale_update_6000() {
 
   // Save the default language in the variable table
   $default = db_fetch_object(db_query('SELECT * FROM {locales_meta} WHERE isdefault = 1'));
-  variable_set('language_default', (object) array('language' => $default->locale, 'name' => $default->name, 'native' => '', 'direction' => 0, 'enabled' => 1, 'plurals' => $default->plurals, 'formula' => $default->formula, 'domain' => '', 'prefix' => $default->locale, 'weight' => 0));
+  variable_set('language_default', (object)array('language' => $default->locale, 'name' => $default->name, 'native' => '', 'direction' => 0, 'enabled' => 1, 'plurals' => $default->plurals, 'formula' => $default->formula, 'domain' => '', 'prefix' => $default->locale, 'weight' => 0));
 
   $ret[] = update_sql("DROP TABLE {locales_meta}");
   return $ret;
@@ -164,7 +166,7 @@ function locale_update_6004() {
 
 /**
  * Change language setting variable of content types.
- * 
+ *
  * Use language_content_type_<content_type> instead of language_<content_type>
  * so content types such as 'default', 'count' or 'negotiation' will not
  * interfere with language variables.
@@ -374,7 +376,8 @@ function locale_schema() {
       ),
       'plid' => array(
         'type' => 'int',
-        'not null' => TRUE, // This should be NULL for no referenced string, not zero.
+        // This should be NULL for no referenced string, not zero.
+        'not null' => TRUE,
         'default' => 0,
         'description' => t('Parent lid (lid of the previous string in the plural chain) in case of plural strings. References {locales_source}.lid.'),
       ),
@@ -387,9 +390,9 @@ function locale_schema() {
     ),
     'primary key' => array('language', 'lid', 'plural'),
     'indexes' => array(
-      'lid'      => array('lid'),
-      'plid'     => array('plid'),
-      'plural'   => array('plural'),
+      'lid' => array('lid'),
+      'plid' => array('plid'),
+      'plural' => array('plural'),
     ),
   );
 
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.211
diff -u -p -r1.211 locale.module
--- modules/locale/locale.module	9 Jan 2008 11:51:54 -0000	1.211
+++ modules/locale/locale.module	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: locale.module,v 1.211 2008/01/09 11:51:54 goba Exp $
 
+
 /**
  * @file
  *   Add language handling functionality and enables the translation of the
@@ -40,13 +41,16 @@ function locale_help($path, $arg) {
       $output .= '<p>'. t('If an existing translation package does not meet your needs, the Gettext Portable Object (<em>.po</em>) files within a package may be modified, or new <em>.po</em> files may be created, using a desktop Gettext editor. The locale module\'s <a href="@import">import</a> feature allows the translated strings from a new or modified <em>.po</em> file to be added to your site. The locale module\'s <a href="@export">export</a> feature generates files from your site\'s translated strings, that can either be shared with others or edited offline by a Gettext translation editor.', array('@import' => url('admin/build/translate/import'), '@export' => url('admin/build/translate/export'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@locale">Locale module</a>.', array('@locale' => 'http://drupal.org/handbook/modules/locale/')) .'</p>';
       return $output;
+
     case 'admin/settings/language':
       $output = '<p>'. t("This page provides an overview of your site's enabled languages. If multiple languages are available and enabled, the text on your site interface may be translated, registered users may select their preferred language on the <em>My account</em> page, and site authors may indicate a specific language when creating posts. The site's default language is used for anonymous visitors and for users who have not selected a preferred language.") .'</p>';
       $output .= '<p>'. t('For each language available on the site, use the <em>edit</em> link to configure language details, including name, an optional language-specific path or domain, and whether the language is natively presented either left-to-right or right-to-left. These languages also appear in the <em>Language</em> selection when creating a post of a content type with multilingual support.') .'</p>';
       $output .= '<p>'. t('Use the <a href="@add-language">add language page</a> to enable additional languages (and automatically import files from a translation package, if available), the <a href="@search">translate interface page</a> to locate strings for manual translation, or the <a href="@import">import page</a> to add translations from individual <em>.po</em> files. A number of contributed translation packages containing <em>.po</em> files are available on the <a href="@translations">Drupal.org translations page</a>.', array('@add-language' => url('admin/settings/language/add'), '@search' => url('admin/build/translate/search'), '@import' => url('admin/build/translate/import'), '@translations' => 'http://drupal.org/project/translations')) .'</p>';
       return $output;
+
     case 'admin/settings/language/add':
       return '<p>'. t('Add all languages to be supported by your site. If your desired language is not available in the <em>Language name</em> drop-down, click <em>Custom language</em> and provide a language code and other details manually. When providing a language code manually, be sure to enter a standardized language code, since this code may be used by browsers to determine an appropriate display language.') .'</p>';
+
     case 'admin/settings/language/configure':
       $output = '<p>'. t("Language negotiation settings determine the site's presentation language. Available options include:") .'</p>';
       $output .= '<ul><li>'. t('<strong>None.</strong> The default language is used for site presentation, though users may (optionally) select a preferred language on the <em>My Account</em> page. (User language preferences will be used for site e-mails, if available.)') .'</li>';
@@ -55,18 +59,23 @@ function locale_help($path, $arg) {
       $output .= '<li>'. t('<strong>Domain name only.</strong> The presentation language is determined by examining the domain used to access the site, and comparing it to the language domain (if any) specified for each language. If a match is not identified, the default language is used. <em>Example: "http://de.example.com/contact" sets presentation language to German based on the use of "http://de.example.com" in the domain.</em>') .'</li></ul>';
       $output .= '<p>'. t('The path prefix or domain name for a language may be set by editing the <a href="@languages">available languages</a>. In the absence of an appropriate match, the site is displayed in the <a href="@languages">default language</a>.', array('@languages' => url('admin/settings/language'))) .'</p>';
       return $output;
+
     case 'admin/build/translate':
       $output = '<p>'. t('This page provides an overview of available translatable strings. Drupal displays translatable strings in text groups; modules may define additional text groups containing other translatable strings. Because text groups provide a method of grouping related strings, they are often used to focus translation efforts on specific areas of the Drupal interface.') .'</p>';
       $output .= '<p>'. t('Review the <a href="@languages">languages page</a> for more information on adding support for additional languages.', array('@languages' => url('admin/settings/language'))) .'</p>';
       return $output;
+
     case 'admin/build/translate/import':
       $output = '<p>'. t('This page imports the translated strings contained in an individual Gettext Portable Object (<em>.po</em>) file. Normally distributed as part of a translation package (each translation package may contain several <em>.po</em> files), a <em>.po</em> file may need to be imported after off-line editing in a Gettext translation editor. Importing an individual <em>.po</em> file may be a lengthy process.') .'</p>';
       $output .= '<p>'. t('Note that the <em>.po</em> files within a translation package are imported automatically (if available) when new modules or themes are enabled, or as new languages are added. Since this page only allows the import of one <em>.po</em> file at a time, it may be simpler to download and extract a translation package into your Drupal installation directory and <a href="@language-add">add the language</a> (which automatically imports all <em>.po</em> files within the package). Translation packages are available for download on the <a href="@translations">Drupal translation page</a>.', array('@language-add' => url('admin/settings/language/add'), '@translations' => 'http://drupal.org/project/translations')) .'</p>';
       return $output;
+
     case 'admin/build/translate/export':
       return '<p>'. t('This page exports the translated strings used by your site. An export file may be in Gettext Portable Object (<em>.po</em>) form, which includes both the original string and the translation (used to share translations with others), or in Gettext Portable Object Template (<em>.pot</em>) form, which includes the original strings only (used to create new translations with a Gettext translation editor).') .'</p>';
+
     case 'admin/build/translate/search':
       return '<p>'. t('This page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations. (Note: For translation tasks involving many strings, it may be more convenient to <a href="@export">export</a> strings for off-line editing in a desktop Gettext translation editor.) Searches may be limited to strings found within a specific text group or in a specific language.', array('@export' => url('admin/build/translate/export'))) .'</p>';
+
     case 'admin/build/block/configure':
       if ($arg[4] == 'locale' && $arg[5] == 0) {
         return '<p>'. t('This block is only shown if <a href="@languages">at least two languages are enabled</a> and <a href="@configuration">language negotiation</a> is set to something other than <em>None</em>.', array('@languages' => url('admin/settings/language'), '@configuration' => url('admin/settings/language/configure'))) .'</p>';
@@ -98,7 +107,8 @@ function locale_menu() {
   $items['admin/settings/language/add'] = array(
     'title' => 'Add language',
     'page callback' => 'locale_inc_callback',
-    'page arguments' => array('locale_languages_add_screen'), // two forms concatenated
+    // two forms concatenated
+    'page arguments' => array('locale_languages_add_screen'),
     'weight' => 5,
     'type' => MENU_LOCAL_TASK,
   );
@@ -127,7 +137,8 @@ function locale_menu() {
     'title' => 'Translate interface',
     'description' => 'Translate the built in interface as well as menu items and taxonomies.',
     'page callback' => 'locale_inc_callback',
-    'page arguments' => array('locale_translate_overview_screen'), // not a form, just a table
+    // not a form, just a table
+    'page arguments' => array('locale_translate_overview_screen'),
     'access arguments' => array('translate interface'),
   );
   $items['admin/build/translate/overview'] = array(
@@ -140,7 +151,8 @@ function locale_menu() {
     'weight' => 10,
     'type' => MENU_LOCAL_TASK,
     'page callback' => 'locale_inc_callback',
-    'page arguments' => array('locale_translate_seek_screen'), // search results and form concatenated
+    // search results and form concatenated
+    'page arguments' => array('locale_translate_seek_screen'),
   );
   $items['admin/build/translate/import'] = array(
     'title' => 'Import',
@@ -152,7 +164,8 @@ function locale_menu() {
   $items['admin/build/translate/export'] = array(
     'title' => 'Export',
     'page callback' => 'locale_inc_callback',
-    'page arguments' => array('locale_translate_export_screen'), // possibly multiple forms concatenated
+    // possibly multiple forms concatenated
+    'page arguments' => array('locale_translate_export_screen'),
     'weight' => 30,
     'type' => MENU_LOCAL_TASK,
   );
@@ -165,7 +178,8 @@ function locale_menu() {
   $items['admin/build/translate/delete/%'] = array(
     'title' => 'Delete string',
     'page callback' => 'locale_inc_callback',
-    'page arguments' => array('locale_translate_delete', 4),  // directly deletes, no confirmation
+    // directly deletes, no confirmation
+    'page arguments' => array('locale_translate_delete', 4),
     'type' => MENU_CALLBACK,
   );
 
@@ -207,7 +221,7 @@ function locale_user($type, $edit, &$use
 
   // If we have more then one language and either creating a user on the
   // admin interface or edit the user, show the language selector.
-  if (variable_get('language_count', 1) > 1 && ($type == 'register' && user_access('administer users') || $type == 'form' && $category == 'account' )) {
+  if (variable_get('language_count', 1) > 1 && ($type == 'register' && user_access('administer users') || $type == 'form' && $category == 'account')) {
     $languages = language_list('enabled');
     $languages = $languages[1];
 
@@ -225,7 +239,7 @@ function locale_user($type, $edit, &$use
       '#weight' => 1,
     );
 
-    // Get language negotiation settings.  
+    // Get language negotiation settings.
     $mode = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
     $form['locale']['language'] = array(
       '#type' => (count($names) <= 5 ? 'radios' : 'select'),
@@ -245,6 +259,7 @@ function locale_form_alter(&$form, $form
   switch ($form_id) {
 
     // Language field for paths
+
     case 'path_admin_form':
       $form['language'] = array(
         '#type' => 'select',
@@ -257,6 +272,7 @@ function locale_form_alter(&$form, $form
       break;
 
     // Language setting for content types
+
     case 'node_type_form':
       if (isset($form['identity']['type'])) {
         $form['workflow']['language_content_type'] = array(
@@ -270,6 +286,7 @@ function locale_form_alter(&$form, $form
       break;
 
     // Language field for nodes
+
     default:
       if (isset($form['#id']) && $form['#id'] == 'node-form') {
         if (isset($form['#node']->type) && variable_get('language_content_type_'. $form['#node']->type, 0)) {
@@ -285,7 +302,7 @@ function locale_form_alter(&$form, $form
           $default = language_default();
           $form['language'] = array(
             '#type' => 'value',
-            '#value' => $default->language
+            '#value' => $default->language,
           );
         }
       }
@@ -328,7 +345,7 @@ function locale($string = NULL, $langcod
     // Reset in-memory cache.
     $locale_t = NULL;
   }
-  
+
   if (!isset($string)) {
     // Return all cached strings if no string was specified
     return $locale_t;
@@ -419,13 +436,12 @@ function locale_get_plural($count, $lang
     }
     else {
       $plurals[$langcode][$count] = -1;
-      return -1;
+      return - 1;
     }
   }
   return $plurals[$langcode][$count];
 }
 
-
 /**
  * Returns a language name
  */
@@ -568,9 +584,9 @@ function locale_block($op = 'list', $del
     $links = array();
     foreach ($languages[1] as $language) {
       $links[$language->language] = array(
-        'href'       => $_GET['q'],
-        'title'      => $language->native,
-        'language'   => $language,
+        'href' => $_GET['q'],
+        'title' => $language->native,
+        'language' => $language,
         'attributes' => array('class' => 'language-link'),
       );
     }
@@ -586,3 +602,4 @@ function locale_block($op = 'list', $del
     return $block;
   }
 }
+
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.25
diff -u -p -r1.25 menu.admin.inc
--- modules/menu/menu.admin.inc	21 Jan 2008 12:12:44 -0000	1.25
+++ modules/menu/menu.admin.inc	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: menu.admin.inc,v 1.25 2008/01/21 12:12:44 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbaks for menu module.
@@ -13,9 +14,9 @@ function menu_overview_page() {
   $result = db_query("SELECT * FROM {menu_custom} ORDER BY title");
   $content = array();
   while ($menu = db_fetch_array($result)) {
-    $menu['href'] = 'admin/build/menu-customize/'. $menu['menu_name'];
+    $menu['href']    = 'admin/build/menu-customize/'. $menu['menu_name'];
     $menu['options'] = array();
-    $content[] = $menu;
+    $content[]       = $menu;
   }
   return theme('admin_block_content', $content);
 }
@@ -33,8 +34,8 @@ function menu_overview_form(&$form_state
     FROM {menu_links} ml LEFT JOIN {menu_router} m ON m.path = ml.router_path
     WHERE ml.menu_name = '%s'
     ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC";
-  $result = db_query($sql, $menu['menu_name']);
-  $tree = menu_tree_data($result);
+  $result     = db_query($sql, $menu['menu_name']);
+  $tree       = menu_tree_data($result);
   $node_links = array();
   menu_tree_collect_node_links($tree, $node_links);
   // We indicate that a menu administrator is running the menu access check.
@@ -43,7 +44,7 @@ function menu_overview_form(&$form_state
   $menu_admin = FALSE;
 
   $form = _menu_overview_tree_form($tree);
-  $form['#menu'] =  $menu;
+  $form['#menu'] = $menu;
   if (element_children($form)) {
     $form['submit'] = array(
       '#type' => 'submit',
@@ -131,8 +132,10 @@ function menu_overview_form_submit($form
   // parent. To prevent this, save items in the form in the same order they
   // are sent by $_POST, ensuring parents are saved first, then their children.
   // See http://drupal.org/node/181126#comment-632270
-  $order = array_flip(array_keys($form['#post'])); // Get the $_POST order.
-  $form = array_merge($order, $form); // Update our original form with the new order.
+  // Get the $_POST order.
+  $order = array_flip(array_keys($form['#post']));
+  // Update our original form with the new order.
+  $form = array_merge($order, $form);
 
   $updated_items = array();
   $fields = array('expanded', 'weight', 'plid');
@@ -199,16 +202,16 @@ function theme_menu_overview_form($form)
       // Change the parent field to a hidden. This allows any value but hides the field.
       $element['plid']['#type'] = 'hidden';
 
-      $row = array();
+      $row   = array();
       $row[] = theme('indentation', $element['#item']['depth'] - 1) . drupal_render($element['title']);
       $row[] = array('data' => drupal_render($element['hidden']), 'class' => 'checkbox');
       $row[] = array('data' => drupal_render($element['expanded']), 'class' => 'checkbox');
       $row[] = drupal_render($element['weight']) . drupal_render($element['plid']) . drupal_render($element['mlid']);
-      $row = array_merge($row, $operations);
+      $row   = array_merge($row, $operations);
 
-      $row = array_merge(array('data' => $row), $element['#attributes']);
+      $row          = array_merge(array('data' => $row), $element['#attributes']);
       $row['class'] = !empty($row['class']) ? $row['class'] .' draggable' : 'draggable';
-      $rows[] = $row;
+      $rows[]       = $row;
     }
   }
   $output = '';
@@ -368,7 +371,7 @@ function menu_edit_item_submit($form, &$
 
   // The value of "hidden" is the opposite of the value
   // supplied by the "enabled" checkbox.
-  $item['hidden'] = (int) !$item['enabled'];
+  $item['hidden'] = (int)!$item['enabled'];
   unset($item['enabled']);
 
   $item['options']['attributes']['title'] = $item['description'];
@@ -385,8 +388,8 @@ function menu_edit_item_submit($form, &$
 function menu_edit_menu(&$form_state, $type, $menu = array()) {
   if ($type == 'edit') {
     $form['menu_name'] = array('#type' => 'value', '#value' => $menu['menu_name']);
-    $form['#insert'] = FALSE;
-    $form['delete'] = array(
+    $form['#insert']   = FALSE;
+    $form['delete']    = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
       '#access' => !in_array($menu['menu_name'], menu_list_system_menus()),
@@ -449,8 +452,8 @@ function menu_delete_menu_page($menu) {
  */
 function menu_delete_menu_confirm(&$form_state, $menu) {
   $form['#menu'] = $menu;
-  $caption = '';
-  $num_links = db_result(db_query("SELECT COUNT(*) FROM {menu_links} WHERE menu_name = '%s'", $menu['menu_name']));
+  $caption       = '';
+  $num_links     = db_result(db_query("SELECT COUNT(*) FROM {menu_links} WHERE menu_name = '%s'", $menu['menu_name']));
   if ($num_links) {
     $caption .= '<p>'. format_plural($num_links, '<strong>Warning:</strong> There is currently 1 menu item in %title. It will be deleted (system-defined items will be reset).', '<strong>Warning:</strong> There are currently @count menu items in %title. They will be deleted (system-defined items will be reset).', array('%title' => $menu['title'])) .'</p>';
   }
@@ -465,7 +468,7 @@ function menu_delete_menu_confirm_submit
   $menu = $form['#menu'];
   $form_state['redirect'] = 'admin/build/menu';
   // System-defined menus may not be deleted - only menus defined by this module.
-  if (in_array($menu['menu_name'], menu_list_system_menus())  || !db_result(db_query("SELECT COUNT(*) FROM {menu_custom} WHERE menu_name = '%s'", $menu['menu_name']))) {
+  if (in_array($menu['menu_name'], menu_list_system_menus()) || !db_result(db_query("SELECT COUNT(*) FROM {menu_custom} WHERE menu_name = '%s'", $menu['menu_name']))) {
     return;
   }
   // Reset all the menu links defined by the system via hook_menu.
@@ -506,7 +509,8 @@ function menu_edit_menu_validate($form, 
     // We will add 'menu-' to the menu name to help avoid name-space conflicts.
     $item['menu_name'] = 'menu-'. $item['menu_name'];
     if (db_result(db_query("SELECT menu_name FROM {menu_custom} WHERE menu_name = '%s'", $item['menu_name'])) ||
-      db_result(db_query_range("SELECT menu_name FROM {menu_links} WHERE menu_name = '%s'", $item['menu_name'], 0, 1))) {
+      db_result(db_query_range("SELECT menu_name FROM {menu_links} WHERE menu_name = '%s'", $item['menu_name'], 0, 1))
+    ) {
       form_set_error('menu_name', t('The menu already exists.'));
     }
   }
@@ -520,12 +524,12 @@ function menu_edit_menu_submit($form, &$
   $path = 'admin/build/menu-customize/';
   if ($form['#insert']) {
     // Add 'menu-' to the menu name to help avoid name-space conflicts.
-    $menu['menu_name'] = 'menu-'. $menu['menu_name'];
-    $link['link_title'] = $menu['title'];
-    $link['link_path'] = $path . $menu['menu_name'];
+    $menu['menu_name']   = 'menu-'. $menu['menu_name'];
+    $link['link_title']  = $menu['title'];
+    $link['link_path']   = $path . $menu['menu_name'];
     $link['router_path'] = $path .'%';
-    $link['module'] = 'menu';
-    $link['plid'] = db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s' AND module = '%s'", 'admin/build/menu', 'system'));
+    $link['module']      = 'menu';
+    $link['plid']        = db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s' AND module = '%s'", 'admin/build/menu', 'system'));
     menu_link_save($link);
     db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", $menu['menu_name'], $menu['title'], $menu['description']);
   }
@@ -609,14 +613,14 @@ function menu_configure() {
     '#description' => t('Choose the menu to be the default in the menu options in the content authoring form.'),
   );
 
-  $secondary_options = array('secondary-links' => $menu_options['secondary-links'],  'primary-links' => $menu_options['primary-links']);
+  $secondary_options = array('secondary-links' => $menu_options['secondary-links'], 'primary-links' => $menu_options['primary-links']);
   $form["menu_secondary_links_source"] = array(
     '#type' => 'radios',
     '#title' => t('Source for the secondary links'),
     '#default_value' => variable_get('menu_secondary_links_source', 'secondary-links'),
     '#options' => $secondary_options,
     '#tree' => FALSE,
-    '#description' => t('Select what should be displayed as the secondary links. If %primary is chosen, the children of the active primary menu link (if any) will be shown instead of the links in the %secondary menu.', array('%secondary' => $menu_options['secondary-links'],  '%primary' => $menu_options['primary-links'])),
+    '#description' => t('Select what should be displayed as the secondary links. If %primary is chosen, the children of the active primary menu link (if any) will be shown instead of the links in the %secondary menu.', array('%secondary' => $menu_options['secondary-links'], '%primary' => $menu_options['primary-links'])),
   );
 
   return system_settings_form($form);
Index: modules/menu/menu.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.install,v
retrieving revision 1.8
diff -u -p -r1.8 menu.install
--- modules/menu/menu.install	10 Oct 2007 11:39:33 -0000	1.8
+++ modules/menu/menu.install	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: menu.install,v 1.8 2007/10/10 11:39:33 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.157
diff -u -p -r1.157 menu.module
--- modules/menu/menu.module	8 Jan 2008 15:49:09 -0000	1.157
+++ modules/menu/menu.module	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: menu.module,v 1.157 2008/01/08 15:49:09 goba Exp $
 
+
 /**
  * @file
  * Allows administrators to customize the site navigation menu.
@@ -22,12 +23,16 @@ function menu_help($path, $arg) {
       $output .= '<p>'. t('The <a href="@menu">menus page</a> displays all menus currently available on your site. Select a menu from this list to add or edit a menu item, or to rearrange items within the menu. Create new menus using the <a href="@add-menu">add menu page</a> (the block containing a new menu must also be enabled on the <a href="@blocks">blocks administration page</a>).', array('@menu' => url('admin/build/menu'), '@add-menu' => url('admin/build/menu/add'), '@blocks' => url('admin/build/block'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@menu">Menu module</a>.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) .'</p>';
       return $output;
+
     case 'admin/build/menu':
       return '<p>'. t('Menus are a collection of links (menu items) used to navigate a website. The menus currently available on your site are displayed below. Select a menu from this list to manage its menu items.') .'</p>';
+
     case 'admin/build/menu/add':
       return '<p>'. t('Enter the name for your new menu. Remember to enable the newly created block in the <a href="@blocks">blocks administration page</a>.', array('@blocks' => url('admin/build/block'))) .'</p>';
+
     case 'admin/build/menu-customize/%':
       return '<p>'. t('To rearrange menu items, grab a drag-and-drop handle under the <em>Menu item</em> column and drag the items (or group of items) to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save configuration</em> button at the bottom of the page.') .'<p>';
+
     case 'admin/build/menu/item/add':
       return '<p>'. t('Enter the title and path for your new menu item.') .'</p>';
   }
@@ -155,14 +160,14 @@ function menu_theme() {
  */
 function menu_enable() {
   menu_rebuild();
-  $link = db_fetch_array(db_query("SELECT mlid AS plid, menu_name from {menu_links} WHERE link_path = 'admin/build/menu' AND module = 'system'"));
+  $link                = db_fetch_array(db_query("SELECT mlid AS plid, menu_name from {menu_links} WHERE link_path = 'admin/build/menu' AND module = 'system'"));
   $link['router_path'] = 'admin/build/menu-customize/%';
-  $link['module'] = 'menu';
-  $result = db_query("SELECT * FROM {menu_custom}");
+  $link['module']      = 'menu';
+  $result              = db_query("SELECT * FROM {menu_custom}");
   while ($menu = db_fetch_array($result)) {
-    $link['mlid'] = 0;
+    $link['mlid']       = 0;
     $link['link_title'] = $menu['title'];
-    $link['link_path'] = 'admin/build/menu-customize/'. $menu['menu_name'];
+    $link['link_path']  = 'admin/build/menu-customize/'. $menu['menu_name'];
     if (!db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s' AND plid = %d", $link['link_path'], $link['plid']))) {
       menu_link_save($link);
     }
@@ -192,6 +197,7 @@ function menu_load($menu_name) {
  * @param $item
  *   The menu item for which to generate a list of parents.
  *   If $item['mlid'] == 0 then the complete tree is returned.
+ *
  * @return
  *   An array of menu link titles keyed on the a string containing the menu name
  *   and mlid. The list excludes the given item and its children.
@@ -304,6 +310,7 @@ function menu_nodeapi(&$node, $op) {
         }
       }
       break;
+
     case 'delete':
       // Delete all menu module links that point to this node.
       $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = 'node/%d' AND module = 'menu'", $node->nid);
@@ -311,6 +318,7 @@ function menu_nodeapi(&$node, $op) {
         menu_link_delete($m['mlid']);
       }
       break;
+
     case 'prepare':
       if (empty($node->menu)) {
         // Prepare the node for the edit form so that $node->menu always exists.
@@ -425,6 +433,7 @@ function menu_node_form_submit($form, &$
  * @param $all
  *   If FALSE return only user-added menus, or if TRUE also include
  *   the menus defined by the system.
+ *
  * @return
  *   An array with the machine-readable names as the keys, and human-readable
  *   titles as the values.
@@ -443,3 +452,4 @@ function menu_get_menus($all = TRUE) {
   }
   return $rows;
 }
+
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.49
diff -u -p -r1.49 content_types.inc
--- modules/node/content_types.inc	22 Dec 2007 23:24:25 -0000	1.49
+++ modules/node/content_types.inc	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: content_types.inc,v 1.49 2007/12/22 23:24:25 goba Exp $
 
+
 /**
  * @file
  * Content type editing UI.
@@ -10,10 +11,10 @@
  * Displays the content type admin overview page.
  */
 function node_overview_types() {
-  $types = node_get_types();
-  $names = node_get_types('names');
+  $types  = node_get_types();
+  $names  = node_get_types('names');
   $header = array(t('Name'), t('Type'), t('Description'), array('data' => t('Operations'), 'colspan' => '2'));
-  $rows = array();
+  $rows   = array();
 
   foreach ($names as $key => $name) {
     $type = $types[$key];
@@ -62,7 +63,8 @@ function node_type_form(&$form_state, $t
     $type->locked = FALSE;
   }
 
-  $form['#node_type'] = $type; // Make the type object available to implementations of hook_form_alter.
+  // Make the type object available to implementations of hook_form_alter.
+  $form['#node_type'] = $type;
 
   $form['identity'] = array(
     '#type' => 'fieldset',
@@ -104,7 +106,7 @@ function node_type_form(&$form_state, $t
     '#type' => 'textarea',
     '#default_value' => $type->description,
     '#description' => t('A brief description of this content type. This text will be displayed as part of the list on the <em>create content</em> page.'),
-    );
+  );
 
   $form['submission'] = array(
     '#type' => 'fieldset',
@@ -136,13 +138,13 @@ function node_type_form(&$form_state, $t
     '#title' => t('Minimum number of words'),
     '#default_value' => $type->min_word_count,
     '#options' => drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)),
-    '#description' => t('The minimum number of words for the body field to be considered valid for this content type. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.')
+    '#description' => t('The minimum number of words for the body field to be considered valid for this content type. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.'),
   );
-  $form['submission']['help']  = array(
+  $form['submission']['help'] = array(
     '#type' => 'textarea',
     '#title' => t('Explanation or submission guidelines'),
     '#default_value' => $type->help,
-    '#description' => t('This text will be displayed at the top of the submission form for this content type. It is useful for helping or instructing your users.')
+    '#description' => t('This text will be displayed at the top of the submission form for this content type. It is useful for helping or instructing your users.'),
   );
   $form['workflow'] = array(
     '#type' => 'fieldset',
@@ -217,7 +219,7 @@ function node_type_form(&$form_state, $t
  * Implementation of hook_form_validate().
  */
 function node_type_form_validate($form, &$form_state) {
-  $type = new stdClass();
+  $type       = new stdClass();
   $type->type = trim($form_state['values']['type']);
   $type->name = trim($form_state['values']['name']);
 
@@ -254,10 +256,10 @@ function node_type_form_submit($form, &$
 
   $type = new stdClass();
 
-  $type->type = trim($form_state['values']['type']);
-  $type->name = trim($form_state['values']['name']);
+  $type->type      = trim($form_state['values']['type']);
+  $type->name      = trim($form_state['values']['name']);
   $type->orig_type = trim($form_state['values']['orig_type']);
-  $type->old_type = isset($form_state['values']['old_type']) ? $form_state['values']['old_type'] : $type->type;
+  $type->old_type  = isset($form_state['values']['old_type']) ? $form_state['values']['old_type'] : $type->type;
 
   $type->description = $form_state['values']['description'];
   $type->help = $form_state['values']['help'];
@@ -270,10 +272,10 @@ function node_type_form_submit($form, &$
   $type->has_title = ($type->title_label != '');
   $type->has_body = ($type->body_label != '');
 
-  $type->module = !empty($form_state['values']['module']) ? $form_state['values']['module'] : 'node';
-  $type->custom = $form_state['values']['custom'];
+  $type->module   = !empty($form_state['values']['module']) ? $form_state['values']['module'] : 'node';
+  $type->custom   = $form_state['values']['custom'];
   $type->modified = TRUE;
-  $type->locked = $form_state['values']['locked'];
+  $type->locked   = $form_state['values']['locked'];
 
   if ($op == t('Reset to defaults')) {
     node_type_reset($type);
@@ -408,3 +410,4 @@ function node_type_delete_confirm_submit
   $form_state['redirect'] = 'admin/content/types';
   return;
 }
+
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.17
diff -u -p -r1.17 node.admin.inc
--- modules/node/node.admin.inc	28 Dec 2007 12:02:51 -0000	1.17
+++ modules/node/node.admin.inc	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: node.admin.inc,v 1.17 2007/12/28 12:02:51 dries Exp $
 
+
 /**
  * @file
  * Content administration and module settings UI.
@@ -24,19 +25,20 @@ function node_configure() {
   $form['default_nodes_main'] = array(
     '#type' => 'select', '#title' => t('Number of posts on main page'), '#default_value' => variable_get('default_nodes_main', 10),
     '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
-    '#description' => t('The default maximum number of posts to display per page on overview pages such as the main page.')
+    '#description' => t('The default maximum number of posts to display per page on overview pages such as the main page.'),
   );
   $form['teaser_length'] = array(
     '#type' => 'select', '#title' => t('Length of trimmed posts'), '#default_value' => variable_get('teaser_length', 600),
     '#options' => array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'),
       800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'),
-      1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')),
-    '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.")
+      1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters'),
+    ),
+    '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers."),
   );
 
   $form['node_preview'] = array(
     '#type' => 'radios', '#title' => t('Preview post'), '#default_value' => variable_get('node_preview', 0),
-    '#options' => array(t('Optional'), t('Required')), '#description' => t('Must users preview posts before submitting?')
+    '#options' => array(t('Optional'), t('Required')), '#description' => t('Must users preview posts before submitting?'),
   );
 
   $form['#validate'] = array('node_configure_validate');
@@ -58,7 +60,8 @@ function node_configure_validate($form, 
  */
 function node_configure_rebuild_confirm() {
   return confirm_form(array(), t('Are you sure you want to rebuild the permissions on site content?'),
-                  'admin/content/node-settings', t('This action rebuilds all permissions on site content, and may be a lengthy process. This action cannot be undone.'), t('Rebuild permissions'), t('Cancel'));
+    'admin/content/node-settings', t('This action rebuilds all permissions on site content, and may be a lengthy process. This action cannot be undone.'), t('Rebuild permissions'), t('Cancel')
+  );
 }
 
 /**
@@ -119,9 +122,10 @@ function node_node_operations() {
 function node_filters() {
   // Regular filters
   $filters['status'] = array('title' => t('status'),
-    'options' => array('status-1'   => t('published'), 'status-0' => t('not published'),
-                       'promote-1'  => t('promoted'),  'promote-0' => t('not promoted'),
-                       'sticky-1'   => t('sticky'),    'sticky-0' => t('not sticky'))
+    'options' => array('status-1' => t('published'), 'status-0' => t('not published'),
+      'promote-1' => t('promoted'), 'promote-0' => t('not promoted'),
+      'sticky-1' => t('sticky'), 'sticky-0' => t('not sticky'),
+    ),
   );
   // Include translation states if we have this module enabled
   if (module_exists('translation')) {
@@ -159,14 +163,17 @@ function node_build_filter_query() {
         list($key, $value) = explode('-', $value, 2);
         $where[] = 'n.'. $key .' = %d';
         break;
+
       case 'category':
-        $table = "tn$index";
+        $table   = "tn$index";
         $where[] = "$table.tid = %d";
-        $join .= "INNER JOIN {term_node} $table ON n.nid = $table.nid ";
+        $join   .= "INNER JOIN {term_node} $table ON n.nid = $table.nid ";
         break;
+
       case 'type':
         $where[] = "n.type = '%s'";
         break;
+
       case 'language':
         $where[] = "n.language = '%s'";
         break;
@@ -301,9 +308,11 @@ function node_filter_form_submit($form, 
         }
       }
       break;
+
     case t('Undo'):
       array_pop($_SESSION['node_overview_filter']);
       break;
+
     case t('Reset'):
       $_SESSION['node_overview_filter'] = array();
       break;
@@ -344,7 +353,6 @@ function node_admin_nodes_validate($form
   }
 }
 
-
 /**
  * Make mass update of nodes, changing all nodes in the $nodes array
  * to update them with the field values in $updates.
@@ -365,7 +373,7 @@ function node_mass_update($nodes, $updat
   if (count($nodes) > 10) {
     $batch = array(
       'operations' => array(
-        array('_node_mass_update_batch_process', array($nodes, $updates))
+        array('_node_mass_update_batch_process', array($nodes, $updates)),
       ),
       'finished' => '_node_mass_update_batch_finished',
       'title' => t('Processing'),
@@ -454,7 +462,7 @@ function node_admin_content($form_state)
   }
   $form = node_filter_form();
 
-  $form['admin']  = node_admin_nodes();
+  $form['admin'] = node_admin_nodes();
 
   return $form;
 }
@@ -485,23 +493,23 @@ function node_admin_nodes() {
     '#submit' => array('node_admin_nodes_submit'),
   );
 
-  $languages = language_list();
+  $languages   = language_list();
   $destination = drupal_get_destination();
-  $nodes = array();
+  $nodes       = array();
   while ($node = db_fetch_object($result)) {
     $nodes[$node->nid] = '';
     $options = empty($node->language) ? array() : array('language' => $languages[$node->language]);
     $form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid, $options) .' '. theme('mark', node_mark($node->nid, $node->changed)));
-    $form['name'][$node->nid] =  array('#value' => check_plain(node_get_types('name', $node)));
+    $form['name'][$node->nid] = array('#value' => check_plain(node_get_types('name', $node)));
     $form['username'][$node->nid] = array('#value' => theme('username', $node));
-    $form['status'][$node->nid] =  array('#value' => ($node->status ? t('published') : t('not published')));
+    $form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
     if ($multilanguage) {
       $form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
     }
     $form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/'. $node->nid .'/edit', array('query' => $destination)));
   }
-  $form['nodes'] = array('#type' => 'checkboxes', '#options' => $nodes);
-  $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
+  $form['nodes']  = array('#type' => 'checkboxes', '#options' => $nodes);
+  $form['pager']  = array('#value' => theme('pager', NULL, 50, 0));
   $form['#theme'] = 'node_admin_nodes';
   return $form;
 }
@@ -514,9 +522,9 @@ function node_admin_nodes() {
 function theme_node_admin_nodes($form) {
   // If there are rows in this form, then $form['title'] contains a list of
   // the title form elements.
-  $has_posts = isset($form['title']) && is_array($form['title']);
+  $has_posts     = isset($form['title']) && is_array($form['title']);
   $select_header = $has_posts ? theme('table_select_header_cell') : '';
-  $header = array($select_header, t('Title'), t('Type'), t('Author'), t('Status'));
+  $header        = array($select_header, t('Title'), t('Type'), t('Author'), t('Status'));
   if (isset($form['language'])) {
     $header[] = t('Language');
   }
@@ -526,7 +534,7 @@ function theme_node_admin_nodes($form) {
   $output .= drupal_render($form['options']);
   if ($has_posts) {
     foreach (element_children($form['title']) as $key) {
-      $row = array();
+      $row   = array();
       $row[] = drupal_render($form['nodes'][$key]);
       $row[] = drupal_render($form['title'][$key]);
       $row[] = drupal_render($form['name'][$key]);
@@ -538,7 +546,6 @@ function theme_node_admin_nodes($form) {
       $row[] = drupal_render($form['operations'][$key]);
       $rows[] = $row;
     }
-
   }
   else {
     $rows[] = array(array('data' => t('No posts available.'), 'colspan' => '6'));
@@ -565,9 +572,10 @@ function node_multiple_delete_confirm(&$
   $form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
   $form['#submit'][] = 'node_multiple_delete_confirm_submit';
   return confirm_form($form,
-                      t('Are you sure you want to delete these items?'),
-                      'admin/content/node', t('This action cannot be undone.'),
-                      t('Delete all'), t('Cancel'));
+    t('Are you sure you want to delete these items?'),
+    'admin/content/node', t('This action cannot be undone.'),
+    t('Delete all'), t('Cancel')
+  );
 }
 
 function node_multiple_delete_confirm_submit($form, &$form_state) {
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.4
diff -u -p -r1.4 node.install
--- modules/node/node.install	18 Dec 2007 12:59:21 -0000	1.4
+++ modules/node/node.install	21 Jan 2008 21:58:54 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: node.install,v 1.4 2007/12/18 12:59:21 dries Exp $
 
+
 /**
  * Implementation of hook_schema().
  */
@@ -12,100 +13,115 @@ function node_schema() {
         'description' => t('The primary identifier for a node.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'vid' => array(
         'description' => t('The current {node_revisions}.vid version identifier.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'type' => array(
         'description' => t('The {node_type}.type of this node.'),
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'language' => array(
         'description' => t('The {languages}.language of this node.'),
         'type' => 'varchar',
         'length' => 12,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'title' => array(
         'description' => t('The title of this node, always treated a non-markup plain text.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'uid' => array(
         'description' => t('The {users}.uid that owns this node; initially, this is the user that created it.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'status' => array(
         'description' => t('Boolean indicating whether the node is published (visible to non-administrators).'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 1),
+        'default' => 1,
+      ),
       'created' => array(
         'description' => t('The Unix timestamp when the node was created.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'changed' => array(
         'description' => t('The Unix timestamp when the node was most recently saved.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'comment' => array(
         'description' => t('Whether comments are allowed on this node: 0 = no, 1 = read only, 2 = read/write.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'promote' => array(
         'description' => t('Boolean indicating whether the node should displayed on the front page.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'moderate' => array(
         'description' => t('Previously, a boolean indicating whether the node was "in moderation"; mostly no longer used.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'sticky' => array(
         'description' => t('Boolean indicating whether the node should be displayed at the top of lists in which it appears.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'tnid' => array(
         'description' => t('The translation set id for this node, which equals the node id of the source post in each set.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'translate' => array(
         'description' => t('A boolean indicating whether this translation page needs to be updated.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
       ),
+    ),
     'indexes' => array(
-      'node_changed'        => array('changed'),
-      'node_created'        => array('created'),
-      'node_moderate'       => array('moderate'),
+      'node_changed' => array('changed'),
+      'node_created' => array('created'),
+      'node_moderate' => array('moderate'),
       'node_promote_status' => array('promote', 'status'),
-      'node_status_type'    => array('status', 'type', 'nid'),
-      'node_title_type'     => array('title', array('type', 4)),
-      'node_type'           => array(array('type', 4)),
-      'uid'                 => array('uid'),
-      'tnid'                => array('tnid'),
-      'translate'           => array('translate'),
-      ),
+      'node_status_type' => array('status', 'type', 'nid'),
+      'node_title_type' => array('title', array('type', 4)),
+      'node_type' => array(array('type', 4)),
+      'uid' => array('uid'),
+      'tnid' => array('tnid'),
+      'translate' => array('translate'),
+    ),
     'unique keys' => array(
-      'vid'     => array('vid')
-      ),
+      'vid' => array('vid'),
+    ),
     'primary key' => array('nid'),
-    );
+  );
 
   $schema['node_access'] = array(
     'description' => t('Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.'),
@@ -115,43 +131,49 @@ function node_schema() {
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'gid' => array(
         'description' => t("The grant ID a user must possess in the specified realm to gain this row's privileges on the node."),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'realm' => array(
         'description' => t('The realm in which the user must possess the grant ID. Each node access node can define one or more realms.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'grant_view' => array(
         'description' => t('Boolean indicating whether a user with the realm/grant pair can view this node.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'grant_update' => array(
         'description' => t('Boolean indicating whether a user with the realm/grant pair can edit this node.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'grant_delete' => array(
         'description' => t('Boolean indicating whether a user with the realm/grant pair can delete this node.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny')
+        'size' => 'tiny',
       ),
+    ),
     'primary key' => array('nid', 'gid', 'realm'),
-    );
+  );
 
   $schema['node_counter'] = array(
     'description' => t('Access statistics for {node}s.'),
@@ -160,30 +182,34 @@ function node_schema() {
         'description' => t('The {node}.nid for these statistics.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'totalcount' => array(
         'description' => t('The total number of times the {node} has been viewed.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'daycount' => array(
         'description' => t('The total number of times the {node} has been viewed today.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'medium'),
+        'size' => 'medium',
+      ),
       'timestamp' => array(
         'description' => t('The most recent time the {node} has been viewed.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0)
+        'default' => 0,
       ),
+    ),
     'primary key' => array('nid'),
-    );
+  );
 
   $schema['node_revisions'] = array(
     'description' => t('Stores information about each saved version of a {node}.'),
@@ -193,55 +219,64 @@ function node_schema() {
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'vid' => array(
         'description' => t('The primary identifier for this version.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'uid' => array(
         'description' => t('The {users}.uid that created this version.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'title' => array(
         'description' => t('The title of this version.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'body' => array(
         'description' => t('The body of this version.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'teaser' => array(
         'description' => t('The teaser of this version.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'log' => array(
         'description' => t('The log entry explaining the changes in this version.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'timestamp' => array(
         'description' => t('A Unix timestamp indicating when this version was created.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'format' => array(
         'description' => t("The input format used by this version's body."),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0)
+        'default' => 0,
       ),
+    ),
     'indexes' => array(
       'nid' => array('nid'),
-      'uid' => array('uid')
-      ),
+      'uid' => array('uid'),
+    ),
     'primary key' => array('vid'),
-    );
+  );
 
   $schema['node_type'] = array(
     'description' => t('Stores information about all defined {node} types.'),
@@ -250,85 +285,99 @@ function node_schema() {
         'description' => t('The machine-readable name of this type.'),
         'type' => 'varchar',
         'length' => 32,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'name' => array(
         'description' => t('The human-readable name of this type.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'module' => array(
         'description' => t('The module that implements this type.'),
         'type' => 'varchar',
         'length' => 255,
-        'not null' => TRUE),
-      'description'    => array(
+        'not null' => TRUE,
+      ),
+      'description' => array(
         'description' => t('A brief description of this type.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'medium'),
+        'size' => 'medium',
+      ),
       'help' => array(
         'description' => t('Help information shown to the user when creating a {node} of this type.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'medium'),
+        'size' => 'medium',
+      ),
       'has_title' => array(
         'description' => t('Boolean indicating whether this type uses the {node}.title field.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'title_label' => array(
         'description' => t('The label displayed for the title field on the edit form.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'has_body' => array(
         'description' => t('Boolean indicating whether this type uses the {node_revisions}.body field.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'body_label' => array(
         'description' => t('The label displayed for the body field on the edit form.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'min_word_count' => array(
         'description' => t('The minimum number of words the body must contain.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'custom' => array(
         'description' => t('A boolean indicating whether this type is defined by a module (FALSE) or by a user via a module like the Content Construction Kit (TRUE).'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'modified' => array(
         'description' => t('A boolean indicating whether this type has been modified by an administrator; currently not used in any way.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'locked' => array(
         'description' => t('A boolean indicating whether the administrator can change the machine name of this type.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'orig_type' => array(
         'description' => t('The original machine-readable name of this node type. This may be different from the current type name if the locked field is 0.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => '')
+        'default' => '',
       ),
+    ),
     'primary key' => array('type'),
-    );
+  );
 
   return $schema;
 }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.941
diff -u -p -r1.941 node.module
--- modules/node/node.module	10 Jan 2008 15:57:10 -0000	1.941
+++ modules/node/node.module	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: node.module,v 1.941 2008/01/10 15:57:10 goba Exp $
 
+
 /**
  * @file
  * The core that allows content to be submitted to the site. Modules and scripts may
@@ -24,7 +25,8 @@ function node_help($path, $arg) {
   // for rebuild. We don't need to issue the message on the confirm form, or
   // while the rebuild is being processed.
   if ($path != 'admin/content/node-settings/rebuild' && $path != 'batch' && strpos($path, '#') === FALSE
-      && user_access('access administration pages') && node_access_needs_rebuild()) {
+    && user_access('access administration pages') && node_access_needs_rebuild()
+  ) {
     if ($path == 'admin/content/node-settings') {
       $message = t('The content access permissions need to be rebuilt.');
     }
@@ -41,14 +43,20 @@ function node_help($path, $arg) {
       $output .= '<p>'. t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The <a href="@post-settings">post settings page</a> sets certain options for the display of posts. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content/node'), '@post-settings' => url('admin/content/node-settings'), '@permissions' => url('admin/user/permissions'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@node">Node module</a>.', array('@node' => 'http://drupal.org/handbook/modules/node/')) .'</p>';
       return $output;
+
     case 'admin/content/node':
-      return ' '; // Return a non-null value so that the 'more help' link is shown.
+      // Return a non-null value so that the 'more help' link is shown.
+      return ' ';
+
     case 'admin/content/types':
       return '<p>'. t('Below is a list of all the content types on your site. All posts that exist on your site are instances of one of these content types.') .'</p>';
+
     case 'admin/content/types/add':
       return '<p>'. t('To create a new content type, enter the human-readable name, the machine-readable name, and all other relevant fields that are on this page. Once created, users of your site will be able to create posts that are instances of this content type.') .'</p>';
+
     case 'node/%/revisions':
       return '<p>'. t('The revisions let you track differences between multiple versions of a post.') .'</p>';
+
     case 'node/%/edit':
       $node = node_load($arg[1]);
       $type = node_get_types('type', $node->type);
@@ -189,6 +197,7 @@ function node_last_viewed($nid) {
  *   Node ID whose history supplies the "last viewed" timestamp.
  * @param $timestamp
  *   Time which is compared against node's "last viewed" timestamp.
+ *
  * @return
  *   One of the MARK constants.
  */
@@ -295,6 +304,7 @@ function node_teaser_include_verify(&$fo
  *   The desired character length of the teaser. If omitted, the default
  *   value will be used. Ignored if the special delimiter is present
  *   in $body.
+ *
  * @return
  *   The generated teaser.
  */
@@ -434,12 +444,16 @@ function node_get_types($op = 'types', $
   switch ($op) {
     case 'types':
       return $_node_types;
+
     case 'type':
       return isset($_node_types[$type]) ? $_node_types[$type] : FALSE;
+
     case 'module':
       return isset($_node_types[$type]->module) ? $_node_types[$type]->module : FALSE;
+
     case 'names':
       return $_node_names;
+
     case 'name':
       return isset($_node_names[$type]) ? $_node_names[$type] : FALSE;
   }
@@ -476,9 +490,9 @@ function node_types_rebuild() {
  *   Status flag indicating outcome of the operation.
  */
 function node_type_save($info) {
-  $is_existing = FALSE;
+  $is_existing   = FALSE;
   $existing_type = !empty($info->old_type) ? $info->old_type : $info->type;
-  $is_existing = db_result(db_query("SELECT COUNT(*) FROM {node_type} WHERE type = '%s'", $existing_type));
+  $is_existing   = db_result(db_query("SELECT COUNT(*) FROM {node_type} WHERE type = '%s'", $existing_type));
   if (!isset($info->help)) {
     $info->help = '';
   }
@@ -544,7 +558,7 @@ function _node_types_build() {
 
   $info_array = module_invoke_all('node_info');
   foreach ($info_array as $type => $info) {
-    $info['type'] = $type;
+    $info['type']       = $type;
     $_node_types[$type] = (object) _node_type_set_defaults($info);
     $_node_names[$type] = $info['name'];
   }
@@ -620,13 +634,15 @@ function _node_type_set_defaults($info) 
  *   Either a node object, node array, or a string containing the node type.
  * @param $hook
  *   A string containing the name of the hook.
+ *
  * @return
  *   TRUE iff the $hook exists in the node type of $node.
  */
 function node_hook(&$node, $hook) {
   $module = node_get_types('module', $node);
   if ($module == 'node') {
-    $module = 'node_content'; // Avoid function name collisions.
+    // Avoid function name collisions.
+    $module = 'node_content';
   }
   return module_hook($module, $hook);
 }
@@ -640,6 +656,7 @@ function node_hook(&$node, $hook) {
  *   A string containing the name of the hook.
  * @param $a2, $a3, $a4
  *   Arguments to pass on to the hook, after the $node argument.
+ *
  * @return
  *   The returned value of the invoked hook.
  */
@@ -647,7 +664,8 @@ function node_invoke(&$node, $hook, $a2 
   if (node_hook($node, $hook)) {
     $module = node_get_types('module', $node);
     if ($module == 'node') {
-      $module = 'node_content'; // Avoid function name collisions.
+      // Avoid function name collisions.
+      $module = 'node_content';
     }
     $function = $module .'_'. $hook;
     return ($function($node, $a2, $a3, $a4));
@@ -663,6 +681,7 @@ function node_invoke(&$node, $hook, $a2 
  *   A string containing the name of the nodeapi operation.
  * @param $a3, $a4
  *   Arguments to pass on to the hook, after the $node and $op arguments.
+ *
  * @return
  *   The returned value of the invoked hooks.
  */
@@ -900,8 +919,8 @@ function node_save(&$node) {
   $node->changed = time();
 
   $node->timestamp = time();
-  $node->format = isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT;
-  $update_node = TRUE;
+  $node->format    = isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT;
+  $update_node     = TRUE;
 
   //Generate the node table query and the
   //the node_revisions table query
@@ -925,7 +944,7 @@ function node_save(&$node) {
     db_query('UPDATE {node} SET vid = %d WHERE nid = %d', $node->vid, $node->nid);
   }
 
- // Call the node specific callback (if any):
+  // Call the node specific callback (if any):
   node_invoke($node, $op);
   node_invoke_nodeapi($node, $op);
 
@@ -936,7 +955,6 @@ function node_save(&$node) {
   cache_clear_all();
 }
 
-
 /**
  * Helper function to save a revision with the uid of the current user.
  *
@@ -1124,7 +1142,7 @@ function node_perm() {
 
   foreach (node_get_types() as $type) {
     if ($type->module == 'node') {
-      $name = check_plain($type->type);
+      $name    = check_plain($type->type);
       $perms[] = 'create '. $name .' content';
       $perms[] = 'delete own '. $name .' content';
       $perms[] = 'delete any '. $name .' content';
@@ -1162,11 +1180,12 @@ function node_search($op = 'search', $ke
       );
       $form['content_ranking']['#theme'] = 'node_search_admin';
       $form['content_ranking']['info'] = array(
-        '#value' => '<em>'. t('The following numbers control which properties the content search should favor when ordering the results. Higher numbers mean more influence, zero means the property is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') .'</em>'
+        '#value' => '<em>'. t('The following numbers control which properties the content search should favor when ordering the results. Higher numbers mean more influence, zero means the property is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') .'</em>',
       );
 
       $ranking = array('node_rank_relevance' => t('Keyword relevance'),
-                       'node_rank_recent' => t('Recently posted'));
+        'node_rank_recent' => t('Recently posted'),
+      );
       if (module_exists('comment')) {
         $ranking['node_rank_comments'] = t('Number of comments');
       }
@@ -1215,9 +1234,9 @@ function node_search($op = 'search', $ke
 
       // Build ranking expression (we try to map each parameter to a
       // uniform distribution in the range 0..1).
-      $ranking = array();
+      $ranking    = array();
       $arguments2 = array();
-      $join2 = '';
+      $join2      = '';
       // Used to avoid joining on node_comment_statistics twice
       $stats_join = FALSE;
       $total = 0;
@@ -1229,17 +1248,17 @@ function node_search($op = 'search', $ke
       }
       if ($weight = (int)variable_get('node_rank_recent', 5)) {
         // Exponential decay with half-life of 6 months, starting at last indexed node
-        $ranking[] = '%d * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), MAX(c.last_comment_timestamp)) - %d) * 6.43e-8)';
+        $ranking[]    = '%d * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), MAX(c.last_comment_timestamp)) - %d) * 6.43e-8)';
         $arguments2[] = $weight;
         $arguments2[] = (int)variable_get('node_cron_last', 0);
-        $join2 .= ' LEFT JOIN {node_comment_statistics} c ON c.nid = i.sid';
-        $stats_join = TRUE;
+        $join2       .= ' LEFT JOIN {node_comment_statistics} c ON c.nid = i.sid';
+        $stats_join   = TRUE;
         $total += $weight;
       }
       if (module_exists('comment') && $weight = (int)variable_get('node_rank_comments', 5)) {
         // Inverse law that maps the highest reply count on the site to 1 and 0 to 0.
-        $scale = variable_get('node_cron_comments_scale', 0.0);
-        $ranking[] = '%d * (2.0 - 2.0 / (1.0 + MAX(c.comment_count) * %f))';
+        $scale        = variable_get('node_cron_comments_scale', 0.0);
+        $ranking[]    = '%d * (2.0 - 2.0 / (1.0 + MAX(c.comment_count) * %f))';
         $arguments2[] = $weight;
         $arguments2[] = $scale;
         if (!$stats_join) {
@@ -1248,13 +1267,14 @@ function node_search($op = 'search', $ke
         $total += $weight;
       }
       if (module_exists('statistics') && variable_get('statistics_count_content_views', 0) &&
-          $weight = (int)variable_get('node_rank_views', 5)) {
+        $weight = (int)variable_get('node_rank_views', 5)
+      ) {
         // Inverse law that maps the highest view count on the site to 1 and 0 to 0.
-        $scale = variable_get('node_cron_views_scale', 0.0);
-        $ranking[] = '%d * (2.0 - 2.0 / (1.0 + MAX(nc.totalcount) * %f))';
+        $scale        = variable_get('node_cron_views_scale', 0.0);
+        $ranking[]    = '%d * (2.0 - 2.0 / (1.0 + MAX(nc.totalcount) * %f))';
         $arguments2[] = $weight;
         $arguments2[] = $scale;
-        $join2 .= ' LEFT JOIN {node_counter} nc ON nc.nid = i.sid';
+        $join2       .= ' LEFT JOIN {node_counter} nc ON nc.nid = i.sid';
         $total += $weight;
       }
       $select2 = (count($ranking) ? implode(' + ', $ranking) : 'i.relevance') .' AS score';
@@ -1266,10 +1286,10 @@ function node_search($op = 'search', $ke
       $results = array();
       foreach ($find as $item) {
         // Build the node body.
-        $node = node_load($item->sid);
+        $node             = node_load($item->sid);
         $node->build_mode = NODE_BUILD_SEARCH_RESULT;
-        $node = node_build_content($node, FALSE, FALSE);
-        $node->body = drupal_render($node->content);
+        $node             = node_build_content($node, FALSE, FALSE);
+        $node->body       = drupal_render($node->content);
 
         // Fetch comments for snippet
         $node->body .= module_invoke('comment', 'nodeapi', $node, 'update index');
@@ -1278,14 +1298,15 @@ function node_search($op = 'search', $ke
 
         $extra = node_invoke_nodeapi($node, 'search result');
         $results[] = array('link' => url('node/'. $item->sid, array('absolute' => TRUE)),
-                           'type' => check_plain(node_get_types('name', $node)),
-                           'title' => $node->title,
-                           'user' => theme('username', $node),
-                           'date' => $node->changed,
-                           'node' => $node,
-                           'extra' => $extra,
-                           'score' => $item->score / $total,
-                           'snippet' => search_excerpt($keys, $node->body));
+          'type' => check_plain(node_get_types('name', $node)),
+          'title' => $node->title,
+          'user' => theme('username', $node),
+          'date' => $node->changed,
+          'node' => $node,
+          'extra' => $extra,
+          'score' => $item->score / $total,
+          'snippet' => search_excerpt($keys, $node->body),
+        );
       }
       return $results;
   }
@@ -1347,7 +1368,7 @@ function node_link($type, $node = NULL, 
         'href' => "node/$node->nid",
         // The title attribute gets escaped when the links are processed, so
         // there is no need to escape here.
-        'attributes' => array('title' => t('Read the rest of !title.', array('!title' => $node->title)))
+        'attributes' => array('title' => t('Read the rest of !title.', array('!title' => $node->title))),
       );
     }
   }
@@ -1500,11 +1521,13 @@ function node_menu() {
     'page arguments' => array(1),
     'access callback' => 'node_access',
     'access arguments' => array('view', 1),
-    'type' => MENU_CALLBACK);
+    'type' => MENU_CALLBACK,
+  );
   $items['node/%node/view'] = array(
     'title' => 'View',
     'type' => MENU_DEFAULT_LOCAL_TASK,
-    'weight' => -10);
+    'weight' => -10,
+  );
   $items['node/%node/edit'] = array(
     'title' => 'Edit',
     'page callback' => 'node_page_edit',
@@ -1523,7 +1546,8 @@ function node_menu() {
     'access arguments' => array('delete', 1),
     'file' => 'node.pages.inc',
     'weight' => 1,
-    'type' => MENU_CALLBACK);
+    'type' => MENU_CALLBACK,
+  );
   $items['node/%node/revisions'] = array(
     'title' => 'Revisions',
     'page callback' => 'node_revision_overview',
@@ -1639,9 +1663,9 @@ function node_feed($nids = FALSE, $chann
   $items = '';
   foreach ($nids as $nid) {
     // Load the specified node:
-    $item = node_load($nid);
+    $item             = node_load($nid);
     $node->build_mode = NODE_BUILD_RSS;
-    $link = url("node/$nid", array('absolute' => TRUE));
+    $link             = url("node/$nid", array('absolute' => TRUE));
 
     if ($item_length != 'title') {
       $teaser = ($item_length == 'teaser') ? TRUE : FALSE;
@@ -1672,12 +1696,14 @@ function node_feed($nids = FALSE, $chann
       case 'fulltext':
         $item_text = $item->body;
         break;
+
       case 'teaser':
         $item_text = $item->teaser;
         if (!empty($item->readmore)) {
           $item_text .= '<p>'. l(t('read more'), 'node/'. $item->nid, array('absolute' => TRUE, 'attributes' => array('target' => '_blank'))) .'</p>';
         }
         break;
+
       case 'title':
         $item_text = '';
         break;
@@ -1687,11 +1713,11 @@ function node_feed($nids = FALSE, $chann
   }
 
   $channel_defaults = array(
-    'version'     => '2.0',
-    'title'       => variable_get('site_name', 'Drupal'),
-    'link'        => $base_url,
+    'version' => '2.0',
+    'title' => variable_get('site_name', 'Drupal'),
+    'link' => $base_url,
     'description' => variable_get('site_mission', ''),
-    'language'    => $language->language
+    'language' => $language->language,
   );
   $channel = array_merge($channel_defaults, $channel);
 
@@ -1779,8 +1805,8 @@ function _node_index_node($node) {
 
   // Build the node body.
   $node->build_mode = NODE_BUILD_SEARCH_INDEX;
-  $node = node_build_content($node, FALSE, FALSE);
-  $node->body = drupal_render($node->content);
+  $node             = node_build_content($node, FALSE, FALSE);
+  $node->body       = drupal_render($node->content);
 
   $text = '<h1>'. check_plain($node->title) .'</h1>'. $node->body;
 
@@ -1950,6 +1976,7 @@ function node_search_validate($form, &$f
  * @param $account
  *   Optional, a user object representing the user for whom the operation is to
  *   be performed. Determines access for a user other than the current user.
+ *
  * @return
  *   TRUE if the operation may be performed.
  */
@@ -1984,7 +2011,8 @@ function node_access($op, $node, $accoun
   // before the $node parameter.
   $module = node_get_types('module', $node);
   if ($module == 'node') {
-    $module = 'node_content'; // Avoid function name collisions.
+    // Avoid function name collisions.
+    $module = 'node_content';
   }
   $access = module_invoke($module, 'access', $op, $node, $account);
   if (!is_null($access)) {
@@ -2028,6 +2056,7 @@ function node_access($op, $node, $accoun
  * @param $node_access_alias
  *   If the node_access table has been given an SQL alias other than the default
  *   "na", that must be passed here.
+ *
  * @return
  *   An SQL join clause.
  */
@@ -2050,6 +2079,7 @@ function _node_access_join_sql($node_ali
  * @param $account
  *   The user object for the user performing the operation. If omitted, the
  *   current user is used.
+ *
  * @return
  *   An SQL where clause.
  */
@@ -2086,6 +2116,7 @@ function _node_access_where_sql($op = 'v
  * @param $account
  *   The user object for the user performing the operation. If omitted, the
  *   current user is used.
+ *
  * @return
  *   An associative array in which the keys are realms, and the values are
  *   arrays of grants for those realms.
@@ -2118,7 +2149,7 @@ function node_access_view_all_nodes() {
       $grants_sql = 'AND ('. implode(' OR ', $grants) .')';
     }
 
-    $sql = "SELECT COUNT(*) FROM {node_access} WHERE nid = 0 $grants_sql AND grant_view >= 1";
+    $sql    = "SELECT COUNT(*) FROM {node_access} WHERE nid = 0 $grants_sql AND grant_view >= 1";
     $result = db_query($sql);
     $access = db_result($result);
   }
@@ -2131,8 +2162,8 @@ function node_access_view_all_nodes() {
  */
 function node_db_rewrite_sql($query, $primary_table, $primary_field) {
   if ($primary_field == 'nid' && !node_access_view_all_nodes()) {
-    $return['join'] = _node_access_join_sql($primary_table);
-    $return['where'] = _node_access_where_sql();
+    $return['join']     = _node_access_join_sql($primary_table);
+    $return['where']    = _node_access_where_sql();
     $return['distinct'] = 1;
     return $return;
   }
@@ -2227,7 +2258,8 @@ function node_access_write_grants($node,
  *
  * @param $rebuild
  *   (Optional) The boolean value to be written.
-  * @return
+ *
+ * @return
  *   (If no value was provided for $rebuild) The current value of the flag.
  */
 function node_access_needs_rebuild($rebuild = NULL) {
@@ -2274,7 +2306,7 @@ function node_access_rebuild($batch_mode
         'operations' => array(
           array('_node_access_rebuild_batch_operation', array()),
         ),
-        'finished' => '_node_access_rebuild_batch_finished'
+        'finished' => '_node_access_rebuild_batch_finished',
       );
       batch_set($batch);
     }
@@ -2359,7 +2391,6 @@ function _node_access_rebuild_batch_fini
  * @} End of "defgroup node_access".
  */
 
-
 /**
  * @defgroup node_content Hook implementations for user-created content types.
  * @{
@@ -2442,7 +2473,8 @@ function theme_node_submitted($node) {
     array(
       '!username' => theme('username', $node),
       '@datetime' => format_date($node->created),
-    ));
+    )
+  );
 }
 
 /**
@@ -2462,10 +2494,10 @@ function node_hook_info() {
           'runs when' => t('After saving an updated post'),
         ),
         'delete' => array(
-          'runs when' => t('After deleting a post')
+          'runs when' => t('After deleting a post'),
         ),
         'view' => array(
-          'runs when' => t('When content is viewed by an authenticated user')
+          'runs when' => t('When content is viewed by an authenticated user'),
         ),
       ),
     ),
@@ -2642,8 +2674,8 @@ function node_assign_owner_action(&$node
 
 function node_assign_owner_action_form($context) {
   $description = t('The username of the user to which you would like to assign ownership.');
-  $count = db_result(db_query("SELECT COUNT(*) FROM {users}"));
-  $owner_name = '';
+  $count       = db_result(db_query("SELECT COUNT(*) FROM {users}"));
+  $owner_name  = '';
   if (isset($context['owner_uid'])) {
     $owner_name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $context['owner_uid']));
   }
@@ -2722,3 +2754,4 @@ function node_unpublish_by_keyword_actio
     }
   }
 }
+
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.26
diff -u -p -r1.26 node.pages.inc
--- modules/node/node.pages.inc	10 Jan 2008 15:57:10 -0000	1.26
+++ modules/node/node.pages.inc	21 Jan 2008 21:58:56 -0000
@@ -1,12 +1,12 @@
 <?php
 // $Id: node.pages.inc,v 1.26 2008/01/10 15:57:10 goba Exp $
 
+
 /**
  * @file
  * Page callbacks for adding, editing, deleting, and revisions management for content.
  */
 
-
 /**
  * Menu callback; presents the node editing form, or redirects to delete confirmation.
  */
@@ -40,7 +40,6 @@ function theme_node_add_list($content) {
   return $output;
 }
 
-
 /**
  * Present a node submission form or a set of links to such forms.
  */
@@ -262,7 +261,8 @@ function node_body_field(&$node, $label,
   $include = !isset($node->teaser) || ($node->teaser == substr($node->body, 0, strlen($node->teaser)));
 
   $form = array(
-    '#after_build' => array('node_teaser_js', 'node_teaser_include_verify'));
+    '#after_build' => array('node_teaser_js', 'node_teaser_include_verify'),
+  );
 
   $form['#prefix'] = '<div class="body-field-wrapper">';
   $form['#suffix'] = '</div>';
@@ -309,7 +309,6 @@ function node_form_delete_submit($form, 
   $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);
 }
 
-
 function node_form_build_preview($form, &$form_state) {
   $node = node_form_submit_build_node($form, $form_state);
   $form_state['node_preview'] = node_preview($node);
@@ -370,12 +369,13 @@ function node_preview($node) {
         $node->picture = $user->picture;
       }
       else {
-        $node->uid = 0; // anonymous user
+        // anonymous user
+        $node->uid = 0;
       }
     }
     else if ($node->uid) {
-      $user = user_load(array('uid' => $node->uid));
-      $node->name = $user->name;
+      $user          = user_load(array('uid' => $node->uid));
+      $node->name    = $user->name;
       $node->picture = $user->picture;
     }
 
@@ -450,9 +450,9 @@ function node_form_submit($form, &$form_
   $node = node_form_submit_build_node($form, $form_state);
   $insert = empty($node->nid);
   node_save($node);
-  $node_link = l(t('view'), 'node/'. $node->nid);
+  $node_link     = l(t('view'), 'node/'. $node->nid);
   $watchdog_args = array('@type' => $node->type, '%title' => $node->title);
-  $t_args = array('@type' => node_get_types('name', $node), '%title' => $node->title);
+  $t_args        = array('@type' => node_get_types('name', $node), '%title' => $node->title);
 
   if ($insert) {
     watchdog('content', '@type: added %title.', $watchdog_args, WATCHDOG_NOTICE, $node_link);
@@ -541,14 +541,13 @@ function node_revision_overview($node) {
     $operations = array();
 
     if ($revision->current_vid > 0) {
-      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '!username' => theme('username', $revision)))
-                               . (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : ''),
-                     'class' => 'revision-current');
+      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '!username' => theme('username', $revision))) . (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : ''),
+        'class' => 'revision-current',
+      );
       $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2);
     }
     else {
-      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', $revision)))
-               . (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : '');
+      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', $revision))) . (($revision->log != '') ? '<p class="revision-log">'. filter_xss($revision->log) .'</p>' : '');
       if ($revert_permission) {
         $operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert");
       }
@@ -601,3 +600,4 @@ function node_revision_delete_confirm_su
     $form_state['redirect'] .= '/revisions';
   }
 }
+
Index: modules/node/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 node.tpl.php
--- modules/node/node.tpl.php	28 Aug 2007 11:35:33 -0000	1.3
+++ modules/node/node.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: node.tpl.php,v 1.3 2007/08/28 11:35:33 goba Exp $
 
+
 /**
  * @file node.tpl.php
  *
@@ -48,27 +49,40 @@
  * @see template_preprocess_node()
  */
 ?>
-<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?> clear-block">
+<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) {
+  print ' sticky';
+}
+?>
+<?php if (!$status) {
+  print ' node-unpublished';
+}
+?> clear-block">
+
+<?php print $picture?>
 
-<?php print $picture ?>
 
-<?php if (!$page): ?>
-  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
+<?php if (!$page):
+?>
+  <h2><a href="<?php print $node_url?>" title="<?php print $title?>"><?php print $title?></a></h2>
 <?php endif; ?>
 
   <div class="meta">
-  <?php if ($submitted): ?>
-    <span class="submitted"><?php print $submitted ?></span>
+  <?php if ($submitted):
+?>
+    <span class="submitted"><?php print $submitted?></span>
   <?php endif; ?>
 
-  <?php if ($terms): ?>
-    <span class="terms"><?php print $terms ?></span>
-  <?php endif;?>
+
+<?php if ($terms):
+?>
+    <span class="terms"><?php print $terms?></span>
+  <?php endif; ?>
   </div>
 
   <div class="content">
-    <?php print $content ?>
+    <?php print $content?>
   </div>
 
   <?php print $links; ?>
-</div>
\ No newline at end of file
+</div>
+
Index: modules/openid/openid.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v
retrieving revision 1.7
diff -u -p -r1.7 openid.inc
--- modules/openid/openid.inc	28 Dec 2007 12:02:52 -0000	1.7
+++ modules/openid/openid.inc	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: openid.inc,v 1.7 2007/12/28 12:02:52 dries Exp $
 
+
 /**
  * @file
  * OpenID utility functions.
@@ -8,10 +9,11 @@
 
 // Diffie-Hellman Key Exchange Default Value.
 define('OPENID_DH_DEFAULT_MOD', '155172898181473697471232257763715539915724801'.
-       '966915404479707795314057629378541917580651227423698188993727816152646631'.
-       '438561595825688188889951272158842675419950341258706556549803580104870537'.
-       '681476726513255747040765857479291291572334510643245094715007229621094194'.
-       '349783925984760375594985848253359305585439638443');
+  '966915404479707795314057629378541917580651227423698188993727816152646631'.
+  '438561595825688188889951272158842675419950341258706556549803580104870537'.
+  '681476726513255747040765857479291291572334510643245094715007229621094194'.
+  '349783925984760375594985848253359305585439638443'
+);
 
 // Constants for Diffie-Hellman key exchange computations.
 define('OPENID_DH_DEFAULT_GEN', '2');
@@ -50,7 +52,7 @@ function openid_redirect($url, $message)
 }
 
 function openid_redirect_form(&$form_state, $url, $message) {
-  $form = array();
+  $form            = array();
   $form['#action'] = $url;
   $form['#method'] = "post";
   foreach ($message as $key => $value) {
@@ -75,8 +77,7 @@ function openid_redirect_form(&$form_sta
  */
 function _openid_is_xri($identifier) {
   $firstchar = substr($identifier, 0, 1);
-  if ($firstchar == "@" || $firstchar == "=")
-    return TRUE;
+  if ($firstchar == "@" || $firstchar == "=") return TRUE;
 
   if (stristr($identifier, 'xri://') !== FALSE) {
     return TRUE;
@@ -179,11 +180,7 @@ function _openid_parse_message($message)
  */
 function _openid_nonce() {
   // YYYY-MM-DDThh:mm:ssTZD UTC, plus some optional extra unique chars
-  return gmstrftime('%Y-%m-%dT%H:%M:%S%Z') .
-    chr(mt_rand(0, 25) + 65) .
-    chr(mt_rand(0, 25) + 65) .
-    chr(mt_rand(0, 25) + 65) .
-    chr(mt_rand(0, 25) + 65);
+  return gmstrftime('%Y-%m-%dT%H:%M:%S%Z') . chr(mt_rand(0, 25) + 65) . chr(mt_rand(0, 25) + 65) . chr(mt_rand(0, 25) + 65) . chr(mt_rand(0, 25) + 65);
 }
 
 /**
@@ -213,6 +210,7 @@ function _openid_meta_httpequiv($equiv, 
 
 /**
  * Sign certain keys in a message
+ *
  * @param $association - object loaded from openid_association or openid_server_association table
  *              - important fields are ->assoc_type and ->mac_key
  * @param $message_array - array of entire message about to be sent
@@ -229,8 +227,8 @@ function _openid_signature($association,
     }
   }
 
-  $message = _openid_create_message($sign_data);
-  $secret = base64_decode($association->mac_key);
+  $message   = _openid_create_message($sign_data);
+  $secret    = base64_decode($association->mac_key);
   $signature = _openid_hmac($secret, $message);
 
   return base64_encode($signature);
@@ -241,11 +239,11 @@ function _openid_hmac($key, $text) {
     $key = _openid_sha1($key, true);
   }
 
-  $key = str_pad($key, OPENID_SHA1_BLOCKSIZE, chr(0x00));
-  $ipad = str_repeat(chr(0x36), OPENID_SHA1_BLOCKSIZE);
-  $opad = str_repeat(chr(0x5c), OPENID_SHA1_BLOCKSIZE);
+  $key   = str_pad($key, OPENID_SHA1_BLOCKSIZE, chr(0x00));
+  $ipad  = str_repeat(chr(0x36), OPENID_SHA1_BLOCKSIZE);
+  $opad  = str_repeat(chr(0x5c), OPENID_SHA1_BLOCKSIZE);
   $hash1 = _openid_sha1(($key ^ $ipad) . $text, true);
-  $hmac = _openid_sha1(($key ^ $opad) . $hash1, true);
+  $hmac  = _openid_sha1(($key ^ $opad) . $hash1, true);
 
   return $hmac;
 }
@@ -313,9 +311,9 @@ function _openid_dh_long_to_binary($long
 }
 
 function _openid_dh_xorsecret($shared, $secret) {
-  $dh_shared_str = _openid_dh_long_to_binary($shared);
+  $dh_shared_str  = _openid_dh_long_to_binary($shared);
   $sha1_dh_shared = _openid_sha1($dh_shared_str);
-  $xsecret = "";
+  $xsecret        = "";
   for ($i = 0; $i < strlen($secret); $i++) {
     $xsecret .= chr(ord($secret[$i]) ^ ord($sha1_dh_shared[$i]));
   }
@@ -418,3 +416,4 @@ if (!function_exists('bcpowmod')) {
     return $result;
   }
 }
+
Index: modules/openid/openid.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.install,v
retrieving revision 1.3
diff -u -p -r1.3 openid.install
--- modules/openid/openid.install	10 Oct 2007 11:39:33 -0000	1.3
+++ modules/openid/openid.install	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: openid.install,v 1.3 2007/10/10 11:39:33 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -68,3 +69,4 @@ function openid_schema() {
 
   return $schema;
 }
+
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.16
diff -u -p -r1.16 openid.module
--- modules/openid/openid.module	10 Jan 2008 15:03:53 -0000	1.16
+++ modules/openid/openid.module	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: openid.module,v 1.16 2008/01/10 15:03:53 goba Exp $
 
+
 /**
  * @file
  * Implement OpenID Relying Party support for Drupal
@@ -41,8 +42,7 @@ function openid_menu() {
  */
 function openid_help($path, $arg) {
   switch ($path) {
-
-  case 'user/%/openid':
+    case 'user/%/openid':
       $output = '<p>'. t('This site supports <a href="@openid-net">OpenID</a>, a secure way to log into many websites using a single username and password. OpenID can reduce the necessity of managing many usernames and passwords for many websites.', array('@openid-net' => url('http://openid.net'))) .'</p>';
       $output .= '<p>'. t('To use OpenID you must first establish an identity on a public or private OpenID server. If you do not have an OpenID and would like one, look into one of the <a href="@openid-providers">free public providers</a>. You can find out more about OpenID at <a href="@openid-net">this website</a>.', array('@openid-providers' => url('http://openid.net/wiki/index.php/OpenIDServers'), '@openid-net' => url('http://openid.net'))) .'</p>';
       $output .= '<p>'. t('If you already have an OpenID, enter the URL to your OpenID server below (e.g. myusername.openidprovider.com). Next time you login, you will be able to use this URL instead of a regular username and password. You can have multiple OpenID servers if you like; just keep adding them here.') .'</p>';
@@ -94,7 +94,7 @@ function openid_form_alter(&$form, $form
       '#size' => ($form_id == 'user_login') ? 58 : 13,
       '#maxlength' => 255,
       '#weight' => -1,
-      '#description' => l(t('What is OpenID?'), 'http://openid.net/', array('external' => TRUE))
+      '#description' => l(t('What is OpenID?'), 'http://openid.net/', array('external' => TRUE)),
     );
     $form['openid.return_to'] = array('#type' => 'hidden', '#value' => url('openid/authenticate', array('absolute' => TRUE, 'query' => drupal_get_destination())));
   }
@@ -274,15 +274,15 @@ function openid_discovery($claimed_id) {
       // Check for HTML delegation
       if (count($services) == 0) {
         // Look for 2.0 links
-        $uri = _openid_link_href('openid2.provider', $result->data);
+        $uri      = _openid_link_href('openid2.provider', $result->data);
         $delegate = _openid_link_href('openid2.local_id', $result->data);
-        $version = 2;
+        $version  = 2;
 
         // 1.0 links
         if (empty($uri)) {
-          $uri = _openid_link_href('openid.server', $result->data);
+          $uri      = _openid_link_href('openid.server', $result->data);
           $delegate = _openid_link_href('openid.delegate', $result->data);
-          $version = 1;
+          $version  = 1;
         }
         if (!empty($uri)) {
           $services[] = array('uri' => $uri, 'delegate' => $delegate, 'version' => $version);
@@ -312,17 +312,17 @@ function openid_association($op_endpoint
   // Check to see if we have an association for this IdP already
   $assoc_handle = db_result(db_query("SELECT assoc_handle FROM {openid_association} WHERE idp_endpoint_uri = '%s'", $op_endpoint));
   if (empty($assoc_handle)) {
-    $mod = OPENID_DH_DEFAULT_MOD;
-    $gen = OPENID_DH_DEFAULT_GEN;
-    $r = _openid_dh_rand($mod);
+    $mod     = OPENID_DH_DEFAULT_MOD;
+    $gen     = OPENID_DH_DEFAULT_GEN;
+    $r       = _openid_dh_rand($mod);
     $private = bcadd($r, 1);
-    $public = bcpowmod($gen, $private, $mod);
+    $public  = bcpowmod($gen, $private, $mod);
 
     // If there is no existing association, then request one
     $assoc_request = openid_association_request($public);
     $assoc_message = _openid_encode_message(_openid_create_message($assoc_request));
     $assoc_headers = array('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8');
-    $assoc_result = drupal_http_request($op_endpoint, $assoc_headers, 'POST', $assoc_message);
+    $assoc_result  = drupal_http_request($op_endpoint, $assoc_headers, 'POST', $assoc_message);
     if (isset($assoc_result->error)) {
       module_invoke('system', 'check_http_request');
       return FALSE;
@@ -341,7 +341,8 @@ function openid_association($op_endpoint
       $assoc_response['mac_key'] = base64_encode(_openid_dh_xorsecret($shared, $enc_mac_key));
     }
     db_query("INSERT INTO {openid_association} (idp_endpoint_uri, session_type, assoc_handle, assoc_type, expires_in, mac_key, created) VALUES('%s', '%s', '%s', '%s', %d, '%s', %d)",
-             $op_endpoint, $assoc_response['session_type'], $assoc_response['assoc_handle'], $assoc_response['assoc_type'], $assoc_response['expires_in'], $assoc_response['mac_key'], time());
+      $op_endpoint, $assoc_response['session_type'], $assoc_response['assoc_handle'], $assoc_response['assoc_type'], $assoc_response['expires_in'], $assoc_response['mac_key'], time()
+    );
 
     $assoc_handle = $assoc_response['assoc_handle'];
   }
@@ -373,7 +374,7 @@ function openid_authentication($response
     $form_state['redirect'] = NULL;
     $form_state['values']['name'] = (empty($response['openid.sreg.nickname'])) ? $identity : $response['openid.sreg.nickname'];
     $form_state['values']['mail'] = (empty($response['openid.sreg.email'])) ? '' : $response['openid.sreg.email'];
-    $form_state['values']['pass']  = user_password();
+    $form_state['values']['pass'] = user_password();
     $form_state['values']['status'] = variable_get('user_register', 1) == 1;
     $form_state['values']['response'] = $response;
     $form_state['values']['auth_openid'] = $identity;
@@ -415,7 +416,7 @@ function openid_association_request($pub
     'openid.ns' => OPENID_NS_2_0,
     'openid.mode' => 'associate',
     'openid.session_type' => 'DH-SHA1',
-    'openid.assoc_type' => 'HMAC-SHA1'
+    'openid.assoc_type' => 'HMAC-SHA1',
   );
 
   if ($request['openid.session_type'] == 'DH-SHA1' || $request['openid.session_type'] == 'DH-SHA256') {
@@ -432,7 +433,7 @@ function openid_authentication_request($
   $realm = ($return_to) ? $return_to : url('', array('absolute' => TRUE));
 
   $ns = ($version == 2) ? OPENID_NS_2_0 : OPENID_NS_1_0;
-  $request =  array(
+  $request = array(
     'openid.ns' => $ns,
     'openid.mode' => 'checkid_setup',
     'openid.identity' => $identity,
@@ -502,3 +503,4 @@ function openid_verify_assertion($op_end
   }
   return $valid;
 }
+
Index: modules/openid/openid.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v
retrieving revision 1.4
diff -u -p -r1.4 openid.pages.inc
--- modules/openid/openid.pages.inc	8 Jan 2008 10:35:42 -0000	1.4
+++ modules/openid/openid.pages.inc	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: openid.pages.inc,v 1.4 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the openid module.
@@ -14,9 +15,11 @@ function openid_authentication_page() {
   switch ($result['status']) {
     case 'success':
       return openid_authentication($result);
+
     case 'failed':
       drupal_set_message(t('OpenID login failed.'), 'error');
       break;
+
     case 'cancel':
       drupal_set_message(t('OpenID login cancelled.'));
       break;
@@ -88,3 +91,4 @@ function openid_user_delete($account, $a
   }
   drupal_goto('user/'. $account->uid .'/openid');
 }
+
Index: modules/openid/xrds.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/xrds.inc,v
retrieving revision 1.2
diff -u -p -r1.2 xrds.inc
--- modules/openid/xrds.inc	15 Oct 2007 09:40:42 -0000	1.2
+++ modules/openid/xrds.inc	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: xrds.inc,v 1.2 2007/10/15 09:40:42 goba Exp $
 
+
 // Global variables to track parsing state
 $xrds_open_elements = array();
 $xrds_services = array();
@@ -37,11 +38,13 @@ function _xrds_element_end(&$parser, $na
   $name = _xrds_strip_namespace($name);
   if ($name == 'SERVICE') {
     if (in_array(OPENID_NS_2_0 .'/signon', $xrds_current_service['types']) ||
-        in_array(OPENID_NS_2_0 .'/server', $xrds_current_service['types'])) {
+      in_array(OPENID_NS_2_0 .'/server', $xrds_current_service['types'])
+    ) {
       $xrds_current_service['version'] = 2;
     }
     elseif (in_array(OPENID_NS_1_1, $xrds_current_service['types']) ||
-            in_array(OPENID_NS_1_0, $xrds_current_service['types'])) {
+      in_array(OPENID_NS_1_0, $xrds_current_service['types'])
+    ) {
       $xrds_current_service['version'] = 1;
     }
     if (!empty($xrds_current_service['version'])) {
@@ -59,12 +62,15 @@ function _xrds_cdata(&$parser, $data) {
     case 'XRDS/XRD/SERVICE/TYPE':
       $xrds_current_service['types'][] = $data;
       break;
+
     case 'XRDS/XRD/SERVICE/URI':
       $xrds_current_service['uri'] = $data;
       break;
+
     case 'XRDS/XRD/SERVICE/DELEGATE':
       $xrds_current_service['delegate'] = $data;
       break;
+
     case 'XRDS/XRD/SERVICE/LOCALID':
       $xrds_current_service['localid'] = $data;
       break;
@@ -79,4 +85,5 @@ function _xrds_strip_namespace($name) {
   }
 
   return $name;
-}
\ No newline at end of file
+}
+
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.7
diff -u -p -r1.7 path.admin.inc
--- modules/path/path.admin.inc	8 Jan 2008 10:35:42 -0000	1.7
+++ modules/path/path.admin.inc	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: path.admin.inc,v 1.7 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbacks for the path module.
@@ -29,14 +30,14 @@ function path_admin_overview($keys = NUL
   $header = array(
     array('data' => t('Alias'), 'field' => 'dst', 'sort' => 'asc'),
     array('data' => t('System'), 'field' => 'src'),
-    array('data' => t('Operations'), 'colspan' => '2')
+    array('data' => t('Operations'), 'colspan' => '2'),
   );
   if ($multilanguage) {
     $header[3] = $header[2];
     $header[2] = array('data' => t('Language'), 'field' => 'language');
   }
   $sql .= tablesort_sql($header);
-  $result = pager_query($sql, 50, 0 , NULL, $keys);
+  $result = pager_query($sql, 50, 0, NULL, $keys);
 
   $rows = array();
   $destination = drupal_get_destination();
@@ -51,7 +52,7 @@ function path_admin_overview($keys = NUL
   }
 
   if (empty($rows)) {
-    $empty_message = $keys ? t('No URL aliases found.') : t('No URL aliases available.') ;
+    $empty_message = $keys ? t('No URL aliases found.') : t('No URL aliases available.');
     $rows[] = array(array('data' => $empty_message, 'colspan' => ($multilanguage ? 5 : 4)));
   }
 
@@ -111,7 +112,7 @@ function path_admin_form(&$form_state, $
   // This will be a hidden value unless locale module is enabled
   $form['language'] = array(
     '#type' => 'value',
-    '#value' => $edit['language']
+    '#value' => $edit['language'],
   );
   if ($edit['pid']) {
     $form['pid'] = array('#type' => 'hidden', '#value' => $edit['pid']);
@@ -124,7 +125,6 @@ function path_admin_form(&$form_state, $
   return $form;
 }
 
-
 /**
  * Verify that a new URL alias is valid
  */
@@ -165,7 +165,8 @@ function path_admin_delete_confirm($form
     $form['pid'] = array('#type' => 'value', '#value' => $pid);
     $output = confirm_form($form,
       t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
-      isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path');
+      isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'
+    );
   }
   return $output;
 }
@@ -181,7 +182,6 @@ function path_admin_delete_confirm_submi
   }
 }
 
-
 /**
  * Return a form to filter URL aliases.
  *
@@ -191,7 +191,7 @@ function path_admin_delete_confirm_submi
 function path_admin_filter_form(&$form_state, $keys = '') {
   $form['#attributes'] = array('class' => 'search-form');
   $form['basic'] = array('#type' => 'fieldset',
-    '#title' => t('Filter aliases')
+    '#title' => t('Filter aliases'),
   );
   $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
   $form['basic']['inline']['filter'] = array(
@@ -205,7 +205,7 @@ function path_admin_filter_form(&$form_s
     '#type' => 'submit',
     '#value' => t('Filter'),
     '#submit' => array('path_admin_filter_form_submit_filter'),
-    );
+  );
   if ($keys) {
     $form['basic']['inline']['reset'] = array(
       '#type' => 'submit',
@@ -230,7 +230,6 @@ function path_admin_filter_form_submit_r
   $form_state['redirect'] = 'admin/build/path/list';
 }
 
-
 /**
  * Helper function for grabbing filter keys.
  */
@@ -239,3 +238,4 @@ function path_admin_filter_get_keys() {
   $path = explode('/', $_GET['q'], 5);
   return count($path) == 5 ? $path[4] : '';
 }
+
Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.137
diff -u -p -r1.137 path.module
--- modules/path/path.module	23 Dec 2007 15:32:36 -0000	1.137
+++ modules/path/path.module	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: path.module,v 1.137 2007/12/23 15:32:36 goba Exp $
 
+
 /**
  * @file
  * Enables users to rename URLs.
@@ -25,8 +26,10 @@ function path_help($path, $arg) {
       $output .= '<p>'. t('This module also provides user-defined mass URL aliasing capabilities, which is useful if you wish to uniformly use URLs different from the default. For example, you may want to have your URLs presented in a different language. Access to the Drupal source code on the web server is required to set up mass URL aliasing. ') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@path">Path module</a>.', array('@path' => 'http://drupal.org/handbook/modules/path/')) .'</p>';
       return $output;
+
     case 'admin/build/path':
       return '<p>'. t("Drupal provides complete control over URLs through aliasing, which is often used to make URLs more readable or easy to remember. For example, the alias 'about' may be mapped onto the post at the system path 'node/1', creating a more meaningful URL. Each system path can have multiple aliases.") .'</p>';
+
     case 'admin/build/path/add':
       return '<p>'. t('Enter the path you wish to create the alias for, followed by the name of the new alias.') .'</p>';
   }
@@ -122,7 +125,6 @@ function path_set_alias($path = NULL, $a
   drupal_clear_path_cache();
 }
 
-
 /**
  * Implementation of hook_nodeapi().
  *
@@ -195,7 +197,7 @@ function path_form_alter(&$form, $form_s
     if ($path) {
       $form['path']['pid'] = array(
         '#type' => 'value',
-        '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $path, $form['#node']->language))
+        '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s' AND language = '%s'", $path, $form['#node']->language)),
       );
     }
   }
@@ -214,3 +216,4 @@ function path_perm() {
 function path_load($pid) {
   return db_fetch_array(db_query('SELECT * FROM {url_alias} WHERE pid = %d', $pid));
 }
+
Index: modules/php/php.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/php/php.install,v
retrieving revision 1.1
diff -u -p -r1.1 php.install
--- modules/php/php.install	24 Apr 2007 10:54:34 -0000	1.1
+++ modules/php/php.install	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: php.install,v 1.1 2007/04/24 10:54:34 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -27,3 +28,4 @@ function php_install() {
 function php_disable() {
   drupal_set_message(t('The PHP module has been disabled. Please note that any existing content that was using the PHP filter will now be visible in plain text. This might pose a security risk by exposing sensitive information, if any, used in the PHP code.'));
 }
+
Index: modules/php/php.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/php/php.module,v
retrieving revision 1.8
diff -u -p -r1.8 php.module
--- modules/php/php.module	18 Dec 2007 10:31:42 -0000	1.8
+++ modules/php/php.module	21 Jan 2008 21:58:56 -0000
@@ -1,12 +1,12 @@
 <?php
 // $Id: php.module,v 1.8 2007/12/18 10:31:42 dries Exp $
 
+
 /**
  * @file
  * Additional filter for PHP input.
  */
 
-
 /**
  * Implementation of hook_help().
  */
@@ -30,6 +30,7 @@ function php_filter_tips($delta, $format
     switch ($long) {
       case 0:
         return t('You may post PHP code. You should include &lt;?php ?&gt; tags.');
+
       case 1:
         $output = '<h4>'. t('Using custom PHP code') .'</h4>';
         $output .= '<p>'. t('Custom PHP code may be embedded in some types of site content, including posts and blocks. While embedding PHP code inside a post or block is a powerful and flexible feature when used by a trusted user with PHP experience, it is a significant and dangerous security risk when used improperly. Even a small mistake when posting PHP code may accidentally compromise your site.') .'</p>';
@@ -73,17 +74,19 @@ function php_filter($op, $delta = 0, $fo
   switch ($op) {
     case 'list':
       return array(0 => t('PHP evaluator'));
+
     case 'no cache':
       // No caching for the PHP evaluator.
       return $delta == 0;
+
     case 'description':
       return t('Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!');
+
     case 'process':
       return drupal_eval($text);
+
     default:
       return $text;
   }
 }
 
-
-
Index: modules/ping/ping.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/ping/ping.module,v
retrieving revision 1.52
diff -u -p -r1.52 ping.module
--- modules/ping/ping.module	19 Dec 2007 17:45:42 -0000	1.52
+++ modules/ping/ping.module	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: ping.module,v 1.52 2007/12/19 17:45:42 goba Exp $
 
+
 /**
  * @file
  * Alerts other sites that your site has been updated.
@@ -56,4 +57,3 @@ function ping_ping($name = '', $url = ''
   }
 }
 
-
Index: modules/poll/poll-bar-block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll-bar-block.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 poll-bar-block.tpl.php
--- modules/poll/poll-bar-block.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/poll/poll-bar-block.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll-bar-block.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file poll-bar-block.tpl.php
  * Display the bar for a single choice in a poll
@@ -24,3 +25,4 @@
 <div class="percent">
   <?php print $percentage; ?>%
 </div>
+
Index: modules/poll/poll-bar.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll-bar.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 poll-bar.tpl.php
--- modules/poll/poll-bar.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/poll/poll-bar.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll-bar.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file poll-bar.tpl.php
  * Display the bar for a single choice in a poll
@@ -24,3 +25,4 @@
 <div class="percent">
   <?php print $percentage; ?>% (<?php print format_plural($votes, '1 vote', '@count votes'); ?>)
 </div>
+
Index: modules/poll/poll-results-block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll-results-block.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 poll-results-block.tpl.php
--- modules/poll/poll-results-block.tpl.php	2 Aug 2007 20:08:53 -0000	1.2
+++ modules/poll/poll-results-block.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,5 +1,7 @@
 <?php
 // $Id: poll-results-block.tpl.php,v 1.2 2007/08/02 20:08:53 dries Exp $
+
+
 /**
  * @file poll-results-block.tpl.php
  * Display the poll results in a block.
@@ -17,13 +19,15 @@
  *
  * @see template_preprocess_poll_results()
  */
+
 ?>
 
 <div class="poll">
-  <div class="title"><?php print $title ?></div>
-  <?php print $results ?>
+  <div class="title"><?php print $title?></div>
+  <?php print $results?>
   <div class="total">
     <?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
   </div>
 </div>
 <div class="links"><?php print $links; ?></div>
+
Index: modules/poll/poll-results.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll-results.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 poll-results.tpl.php
--- modules/poll/poll-results.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/poll/poll-results.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll-results.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file poll-results-block.tpl.php
  * Display the poll results in a block.
@@ -23,7 +24,11 @@
   <div class="total">
     <?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
   </div>
-  <?php if (!empty($cancel_form)): ?>
-    <?php print $cancel_form; ?>
-  <?php endif; ?>
+  <?php if (!empty($cancel_form)):
+?>
+
+<?php print $cancel_form; ?>
+
+<?php endif; ?>
 </div>
+
Index: modules/poll/poll-vote.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll-vote.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 poll-vote.tpl.php
--- modules/poll/poll-vote.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/poll/poll-vote.tpl.php	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll-vote.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file poll-vote.tpl.php
  * Voting form for a poll.
@@ -18,13 +19,19 @@
 <div class="poll">
   <div class="vote-form">
     <div class="choices">
-      <?php if ($block): ?>
+      <?php if ($block):
+?>
         <div class="title"><?php print $title; ?>:</div>
       <?php endif; ?>
-      <?php print $choice; ?>
+
+<?php print $choice; ?>
     </div>
     <?php print $vote; ?>
   </div>
-  <?php // This is the 'rest' of the form, in case items have been added. ?>
-  <?php print $rest ?>
+// This is the 'rest' of the form, in case items have been added.
+  <?php
+?>
+
+<?php print $rest?>
 </div>
+
Index: modules/poll/poll.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.install,v
retrieving revision 1.13
diff -u -p -r1.13 poll.install
--- modules/poll/poll.install	18 Dec 2007 12:59:21 -0000	1.13
+++ modules/poll/poll.install	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll.install,v 1.13 2007/12/18 12:59:21 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -24,108 +25,108 @@ function poll_schema() {
   $schema['poll'] = array(
     'description' => t('Stores poll-specific information for poll nodes.'),
     'fields' => array(
-      'nid'     => array(
+      'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
-        'description' => t("The poll's {node}.nid.")
-        ),
+        'description' => t("The poll's {node}.nid."),
+      ),
       'runtime' => array(
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'description' => t('The number of seconds past {node}.created during which the poll is open.')
-        ),
-      'active'  => array(
+        'description' => t('The number of seconds past {node}.created during which the poll is open.'),
+      ),
+      'active' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
         'description' => t('Boolean indicating whether or not the poll is open.'),
-        ),
       ),
+    ),
     'primary key' => array('nid'),
-    );
+  );
 
   $schema['poll_choices'] = array(
     'description' => t('Stores information about all choices for all {poll}s.'),
     'fields' => array(
-      'chid'    => array(
+      'chid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'description' => t('Unique identifier for a poll choice.'),
-        ),
-      'nid'     => array(
+      ),
+      'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The {node}.nid this choice belongs to.'),
-        ),
-      'chtext'  => array(
+      ),
+      'chtext' => array(
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
         'default' => '',
         'description' => t('The text for this choice.'),
-        ),
+      ),
       'chvotes' => array(
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The total number of votes this choice has received by all users.'),
-        ),
+      ),
       'chorder' => array(
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The sort order of this choice among all choices for the same node.'),
-        )
       ),
+    ),
     'indexes' => array(
-      'nid' => array('nid')
-      ),
+      'nid' => array('nid'),
+    ),
     'primary key' => array('chid'),
-    );
+  );
 
   $schema['poll_votes'] = array(
     'description' => t('Stores per-{users} votes for each {poll}.'),
     'fields' => array(
-      'nid'      => array(
+      'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'description' => t('The {poll} node this vote is for.'),
-        ),
-      'uid'      => array(
+      ),
+      'uid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The {users}.uid this vote is from unless the voter was anonymous.'),
-        ),
-      'chorder'  => array(
+      ),
+      'chorder' => array(
         'type' => 'int',
         'not null' => TRUE,
         'default' => -1,
         'description' => t("The {users}'s vote for this poll."),
-        ),
+      ),
       'hostname' => array(
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
         'default' => '',
         'description' => t('The IP address this vote is from unless the voter was logged in.'),
-        ),
       ),
+    ),
     'primary key' => array('nid', 'uid', 'hostname'),
     'indexes' => array(
       'hostname' => array('hostname'),
-      'uid'      => array('uid'),
-      ),
-    );
+      'uid' => array('uid'),
+    ),
+  );
 
   return $schema;
 }
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.263
diff -u -p -r1.263 poll.module
--- modules/poll/poll.module	15 Jan 2008 07:57:46 -0000	1.263
+++ modules/poll/poll.module	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll.module,v 1.263 2008/01/15 07:57:46 dries Exp $
 
+
 /**
  * @file
  * Enables your site to capture votes on different topics in the form of multiple
@@ -64,8 +65,10 @@ function poll_access($op, $node, $accoun
   switch ($op) {
     case 'create':
       return user_access('create poll content', $account);
+
     case 'update':
       return user_access('edit any poll content', $account) || (user_access('edit own poll content', $account) && ($node->uid == $account->uid));
+
     case 'delete':
       return user_access('delete any poll content', $account) || (user_access('delete own poll content', $account) && ($node->uid == $account->uid));
   }
@@ -174,7 +177,7 @@ function poll_node_info() {
       'description' => t('A <em>poll</em> is a question with a set of possible responses. A <em>poll</em>, once created, automatically provides a simple running count of the number of votes received for each response.'),
       'title_label' => t('Question'),
       'has_body' => FALSE,
-    )
+    ),
   );
 }
 
@@ -237,7 +240,8 @@ function poll_form(&$node, $form_state) 
     '#value' => t('More choices'),
     '#description' => t("If the amount of boxes above isn't enough, click here to add more choices."),
     '#weight' => 1,
-    '#submit' => array('poll_more_choices_submit'), // If no javascript action.
+    // If no javascript action.
+    '#submit' => array('poll_more_choices_submit'),
     '#ahah' => array(
       'path' => 'poll/js',
       'wrapper' => 'poll-choices',
@@ -263,7 +267,7 @@ function poll_form(&$node, $form_state) 
       '#title' => t('Poll status'),
       '#default_value' => isset($node->active) ? $node->active : 1,
       '#options' => $_active,
-      '#description' => t('When a poll is closed, visitors can no longer vote for it.')
+      '#description' => t('When a poll is closed, visitors can no longer vote for it.'),
     );
   }
   $form['settings']['runtime'] = array(
@@ -351,7 +355,8 @@ function poll_choice_js() {
 
   // Render the new output.
   $choice_form = $form['choice_wrapper']['choice'];
-  unset($choice_form['#prefix'], $choice_form['#suffix']); // Prevent duplicate wrappers.
+  // Prevent duplicate wrappers.
+  unset($choice_form['#prefix'], $choice_form['#suffix']);
   $choice_form[$delta]['#attributes']['class'] = empty($choice_form[$delta]['#attributes']['class']) ? 'ahah-new-content' : $choice_form[$delta]['#attributes']['class'] .' ahah-new-content';
   $choice_form[$delta]['chvotes']['#value'] = 0;
   $output = theme('status_messages') . drupal_render($choice_form);
@@ -590,7 +595,7 @@ function poll_view_voting(&$form_state, 
  */
 function poll_view_voting_validate($form, &$form_state) {
   if ($form_state['values']['choice'] == -1) {
-    form_set_error( 'choice', t('Your vote could not be recorded because you did not select any of the choices.'));
+    form_set_error('choice', t('Your vote could not be recorded because you did not select any of the choices.'));
   }
 }
 
@@ -624,12 +629,12 @@ function poll_vote($form, &$form_state) 
  * Inputs: $form
  */
 function template_preprocess_poll_vote(&$variables) {
-  $form = $variables['form'];
+  $form                = $variables['form'];
   $variables['choice'] = drupal_render($form['choice']);
-  $variables['title'] = check_plain($form['#node']->title);
-  $variables['vote'] = drupal_render($form['vote']);
-  $variables['rest'] = drupal_render($form);
-  $variables['block'] = $form['#block'];
+  $variables['title']  = check_plain($form['#node']->title);
+  $variables['vote']   = drupal_render($form['vote']);
+  $variables['rest']   = drupal_render($form);
+  $variables['block']  = $form['#block'];
   // If this is a block, allow a different tpl.php to be used.
   if ($variables['block']) {
     $variables['template_files'][] = 'poll-vote-block';
@@ -661,7 +666,6 @@ function poll_view_results(&$node, $teas
   return theme('poll_results', $node->title, $poll_results, $total_votes, isset($node->links) ? $node->links : array(), $block, $node->nid, isset($node->vote) ? $node->vote : NULL);
 }
 
-
 /**
  * Theme the admin poll form for choices.
  *
@@ -757,7 +761,7 @@ function poll_cancel_form(&$form_state, 
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Cancel your vote'),
-    '#submit' => array('poll_cancel')
+    '#submit' => array('poll_cancel'),
   );
 
   $form['#cache'] = TRUE;
@@ -791,3 +795,4 @@ function poll_user($op, &$edit, &$user) 
     db_query('UPDATE {poll_votes} SET uid = 0 WHERE uid = %d', $user->uid);
   }
 }
+
Index: modules/poll/poll.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v
retrieving revision 1.4
diff -u -p -r1.4 poll.pages.inc
--- modules/poll/poll.pages.inc	14 Dec 2007 09:50:41 -0000	1.4
+++ modules/poll/poll.pages.inc	21 Jan 2008 21:58:56 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: poll.pages.inc,v 1.4 2007/12/14 09:50:41 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the poll module.
@@ -14,8 +15,8 @@ function poll_page() {
   $sql = db_rewrite_sql("SELECT n.nid, n.title, p.active, n.created, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid INNER JOIN {poll_choices} c ON n.nid = c.nid WHERE n.status = 1 GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC");
   // Count all polls for the pager.
   $count_sql = db_rewrite_sql('SELECT COUNT(*) FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid WHERE n.status = 1');
-  $result = pager_query($sql, 15, 0, $count_sql);
-  $output = '<ul>';
+  $result    = pager_query($sql, 15, 0, $count_sql);
+  $output    = '<ul>';
   while ($node = db_fetch_object($result)) {
     $output .= '<li>'. l($node->title, "node/$node->nid") .' - '. format_plural($node->votes, '1 vote', '@count votes') .' - '. ($node->active ? t('open') : t('closed')) .'</li>';
   }
@@ -39,7 +40,8 @@ function poll_votes($node) {
   while ($vote = db_fetch_object($result)) {
     $rows[] = array(
       $vote->name ? theme('username', $vote) : check_plain($vote->hostname),
-      check_plain($node->choice[$vote->chorder]['chtext']));
+      check_plain($node->choice[$vote->chorder]['chtext']),
+    );
   }
   $output .= theme('table', $header, $rows);
   $output .= theme('pager', NULL, 20, 0);
@@ -54,3 +56,4 @@ function poll_results($node) {
   $node->show_results = TRUE;
   return node_show($node, 0);
 }
+
Index: modules/profile/profile-block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile-block.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 profile-block.tpl.php
--- modules/profile/profile-block.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/profile/profile-block.tpl.php	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile-block.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file profile-block.tpl.php
  * Default theme implementation for displaying a users profile within a
@@ -30,13 +31,19 @@
  * @see template_preprocess_profile_block()
  */
 ?>
+
 <?php print $picture; ?>
 
-<?php foreach ($profile as $field) : ?>
+
+<?php foreach ($profile as $field):
+?>
   <p>
-    <?php if ($field->type != 'checkbox') : ?>
+    <?php if ($field->type != 'checkbox'):
+?>
       <strong><?php print $field->title; ?></strong><br />
     <?php endif; ?>
-    <?php print $field->value; ?>
+
+<?php print $field->value; ?>
   </p>
-<?php endforeach; ?>
+<?php endforeach; 
+
Index: modules/profile/profile-listing.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile-listing.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 profile-listing.tpl.php
--- modules/profile/profile-listing.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/profile/profile-listing.tpl.php	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile-listing.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file profile-listing.tpl.php
  * Default theme implementation for displaying a user and their profile data
@@ -43,10 +44,12 @@
     <?php print $name; ?>
   </div>
 
-  <?php foreach ($profile as $field) : ?>
+  <?php foreach ($profile as $field):
+?>
     <div class="field">
       <?php print $field->value; ?>
     </div>
   <?php endforeach; ?>
 
 </div>
+
Index: modules/profile/profile-wrapper.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile-wrapper.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 profile-wrapper.tpl.php
--- modules/profile/profile-wrapper.tpl.php	7 Aug 2007 08:39:35 -0000	1.2
+++ modules/profile/profile-wrapper.tpl.php	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile-wrapper.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
 
+
 /**
  * @file profile-wrapper.tpl.php
  * Default theme implementation for wrapping member listings and their
@@ -23,3 +24,4 @@
 <div id="profile">
   <?php print $content; ?>
 </div>
+
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.8
diff -u -p -r1.8 profile.admin.inc
--- modules/profile/profile.admin.inc	21 Jan 2008 15:20:43 -0000	1.8
+++ modules/profile/profile.admin.inc	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile.admin.inc,v 1.8 2008/01/21 15:20:43 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbacks for the profile module.
@@ -97,8 +98,8 @@ function theme_profile_admin_overview($f
     drupal_add_js(drupal_get_path('module', 'profile') .'/profile.js');
   }
 
-  $rows = array();
-  $categories = array();
+  $rows            = array();
+  $categories      = array();
   $category_number = 0;
   foreach (element_children($form) as $key) {
     // Don't take form control structures.
@@ -127,7 +128,7 @@ function theme_profile_admin_overview($f
       $field['category']['#attributes']['class'] = 'profile-category profile-category-'. $categories[$category];
 
       // Add the row
-      $row = array();
+      $row   = array();
       $row[] = drupal_render($field['title']);
       $row[] = drupal_render($field['name']);
       $row[] = drupal_render($field['type']);
@@ -135,8 +136,8 @@ function theme_profile_admin_overview($f
         $row[] = drupal_render($field['category']);
         $row[] = drupal_render($field['weight']);
       }
-      $row[] = drupal_render($field['edit']);
-      $row[] = drupal_render($field['delete']);
+      $row[]  = drupal_render($field['edit']);
+      $row[]  = drupal_render($field['delete']);
       $rows[] = array('data' => $row, 'class' => 'draggable');
     }
   }
@@ -303,8 +304,8 @@ function profile_field_form_validate($fo
   if (strtolower($form_state['values']['category']) == 'account') {
     form_set_error('category', t('The specified category name is reserved for use by Drupal.'));
   }
-  $args1 = array($form_state['values']['title'], $form_state['values']['category']);
-  $args2 = array($form_state['values']['name']);
+  $args1        = array($form_state['values']['title'], $form_state['values']['category']);
+  $args2        = array($form_state['values']['name']);
   $query_suffix = '';
 
   if (isset($form_state['values']['fid'])) {
@@ -371,7 +372,8 @@ function profile_field_delete(&$form_sta
   return confirm_form($form,
     t('Are you sure you want to delete the field %field?', array('%field' => $field->title)), 'admin/user/profile',
     t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="@edit-field">edit this field</a> and change it to a hidden profile field so that it may only be accessed by administrators.', array('@edit-field' => url('admin/user/profile/edit/'. $fid))),
-    t('Delete'), t('Cancel'));
+    t('Delete'), t('Cancel')
+  );
 }
 
 /**
@@ -402,3 +404,4 @@ function profile_admin_settings_autocomp
   print drupal_to_js($matches);
   exit();
 }
+
Index: modules/profile/profile.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v
retrieving revision 1.12
diff -u -p -r1.12 profile.install
--- modules/profile/profile.install	18 Dec 2007 12:59:22 -0000	1.12
+++ modules/profile/profile.install	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile.install,v 1.12 2007/12/18 12:59:22 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.235
diff -u -p -r1.235 profile.module
--- modules/profile/profile.module	31 Dec 2007 08:54:37 -0000	1.235
+++ modules/profile/profile.module	21 Jan 2008 21:58:57 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile.module,v 1.235 2007/12/31 08:54:37 dries Exp $
 
+
 /**
  * @file
  * Support for configurable user profiles.
@@ -43,6 +44,7 @@ function profile_help($path, $arg) {
       $output .= '<li>'. t('date') .'</li></ul>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@profile">Profile module</a>.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) .'</p>';
       return $output;
+
     case 'admin/user/profile':
       return '<p>'. t("This page displays a list of the existing custom profile fields to be displayed on a user's <em>My Account</em> page. To provide structure, similar or related fields may be placed inside a category. To add a new category (or edit an existing one), edit a profile field and provide a new category name. To change the category of a field or the order of fields within a category, grab a drag-and-drop handle under the Title column and drag the field to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save configuration</em> button at the bottom of the page.") .'</p>';
   }
@@ -68,7 +70,7 @@ function profile_theme() {
     'profile_admin_overview' => array(
       'arguments' => array('form' => NULL),
       'file' => 'profile.admin.inc',
-    )
+    ),
   );
 }
 
@@ -202,20 +204,28 @@ function profile_user($type, &$edit, &$u
   switch ($type) {
     case 'load':
       return profile_load_profile($user);
+
     case 'register':
       return profile_form_profile($edit, $user, $category, TRUE);
+
     case 'update':
-    return profile_save_profile($edit, $user, $category);
+      return profile_save_profile($edit, $user, $category);
+
     case 'insert':
       return profile_save_profile($edit, $user, $category, TRUE);
+
     case 'view':
       return profile_view_profile($user);
+
     case 'form':
       return profile_form_profile($edit, $user, $category);
+
     case 'validate':
       return profile_validate_profile($edit, $category);
+
     case 'categories':
       return profile_categories();
+
     case 'delete':
       db_query('DELETE FROM {profile_values} WHERE uid = %d', $user->uid);
   }
@@ -247,21 +257,23 @@ function profile_view_field($user, $fiel
   // Only allow browsing of private fields for admins, if browsing is enabled,
   // and if a user has permission to view profiles. Note that this check is
   // necessary because a user may always see their own profile.
-  $browse = user_access('access user profiles')
-         && (user_access('administer users') || $field->visibility != PROFILE_PRIVATE)
-         && !empty($field->page);
+  $browse = user_access('access user profiles') && (user_access('administer users') || $field->visibility != PROFILE_PRIVATE) && !empty($field->page);
 
   if (isset($user->{$field->name}) && $value = $user->{$field->name}) {
     switch ($field->type) {
       case 'textarea':
         return check_markup($value);
+
       case 'textfield':
       case 'selection':
         return $browse ? l($value, 'profile/'. $field->name .'/'. $value) : check_plain($value);
+
       case 'checkbox':
         return $browse ? l($field->title, 'profile/'. $field->name) : check_plain($field->title);
+
       case 'url':
         return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>';
+
       case 'date':
         $format = substr(variable_get('date_format_short', 'm/d/Y - H:i'), 0, 5);
         // Note: Avoid PHP's date() because it does not handle dates before
@@ -277,6 +289,7 @@ function profile_view_field($user, $fiel
           'g:ia' => NULL,
         );
         return strtr($format, $replace);
+
       case 'list':
         $values = split("[,\n\r]", $value);
         $fields = array();
@@ -363,6 +376,7 @@ function profile_form_profile($edit, $us
           $fields[$category][$field->name]['#autocomplete_path'] = "profile/autocomplete/". $field->fid;
         }
         break;
+
       case 'textarea':
         $fields[$category][$field->name] = array('#type' => 'textarea',
           '#title' => check_plain($field->title),
@@ -371,6 +385,7 @@ function profile_form_profile($edit, $us
           '#required' => $field->required,
         );
         break;
+
       case 'list':
         $fields[$category][$field->name] = array('#type' => 'textarea',
           '#title' => check_plain($field->title),
@@ -379,6 +394,7 @@ function profile_form_profile($edit, $us
           '#required' => $field->required,
         );
         break;
+
       case 'checkbox':
         $fields[$category][$field->name] = array('#type' => 'checkbox',
           '#title' => check_plain($field->title),
@@ -387,6 +403,7 @@ function profile_form_profile($edit, $us
           '#required' => $field->required,
         );
         break;
+
       case 'selection':
         $options = $field->required ? array() : array('--');
         $lines = split("[,\n\r]", $field->options);
@@ -403,6 +420,7 @@ function profile_form_profile($edit, $us
           '#required' => $field->required,
         );
         break;
+
       case 'date':
         $fields[$category][$field->name] = array('#type' => 'date',
           '#title' => check_plain($field->title),
@@ -453,7 +471,7 @@ function profile_categories() {
       'title' => $category->category,
       'weight' => 3,
       'access callback' => 'profile_category_access',
-      'access arguments' => array($category->category)
+      'access arguments' => array($category->category),
     );
   }
   return $data;
@@ -492,7 +510,6 @@ function template_preprocess_profile_blo
       $variables['profile'][$field->name]->type = $field->type;
     }
   }
-
 }
 
 /**
@@ -517,7 +534,6 @@ function template_preprocess_profile_lis
       $variables['profile'][$field->name]->type = $field->type;
     }
   }
-
 }
 
 /**
@@ -539,12 +555,13 @@ function template_preprocess_profile_wra
 
 function _profile_field_types($type = NULL) {
   $types = array('textfield' => t('single-line textfield'),
-                 'textarea' => t('multi-line textfield'),
-                 'checkbox' => t('checkbox'),
-                 'selection' => t('list selection'),
-                 'list' => t('freeform list'),
-                 'url' => t('URL'),
-                 'date' => t('date'));
+    'textarea' => t('multi-line textfield'),
+    'checkbox' => t('checkbox'),
+    'selection' => t('list selection'),
+    'list' => t('freeform list'),
+    'url' => t('URL'),
+    'date' => t('date'),
+  );
   return isset($type) ? $types[$type] : $types;
 }
 
@@ -553,8 +570,8 @@ function _profile_field_serialize($type 
 }
 
 function _profile_get_fields($category, $register = FALSE) {
-  $args = array();
-  $sql = 'SELECT * FROM {profile_fields} WHERE ';
+  $args    = array();
+  $sql     = 'SELECT * FROM {profile_fields} WHERE ';
   $filters = array();
   if ($register) {
     $filters[] = 'register = 1';
Index: modules/profile/profile.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 profile.pages.inc
--- modules/profile/profile.pages.inc	8 Dec 2007 14:06:22 -0000	1.2
+++ modules/profile/profile.pages.inc	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: profile.pages.inc,v 1.2 2007/12/08 14:06:22 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the profile module.
@@ -40,15 +41,18 @@ function profile_browse() {
       case 'checkbox':
         $query = 'v.value = 1';
         break;
+
       case 'textfield':
       case 'selection':
         $query = "v.value = '%s'";
         $arguments[] = $value;
         break;
+
       case 'list':
         $query = "v.value LIKE '%%%s%%'";
         $arguments[] = $value;
         break;
+
       default:
         drupal_not_found();
         return;
@@ -118,3 +122,4 @@ function profile_autocomplete($field, $s
 
   drupal_json($matches);
 }
+
Index: modules/search/search-block-form.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search-block-form.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 search-block-form.tpl.php
--- modules/search/search-block-form.tpl.php	31 Oct 2007 18:06:38 -0000	1.1
+++ modules/search/search-block-form.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search-block-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
 
+
 /**
  * @file search-block-form.tpl.php
  * Default theme implementation for displaying a search form within a block region.
@@ -35,3 +36,4 @@
 <div class="container-inline">
   <?php print $search_form; ?>
 </div>
+
Index: modules/search/search-result.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search-result.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 search-result.tpl.php
--- modules/search/search-result.tpl.php	31 Oct 2007 18:06:38 -0000	1.1
+++ modules/search/search-result.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search-result.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
 
+
 /**
  * @file search-result.tpl.php
  * Default theme implementation for displaying a single search result.
@@ -50,10 +51,14 @@
   <a href="<?php print $url; ?>"><?php print $title; ?></a>
 </dt>
 <dd>
-  <?php if ($snippet) : ?>
+  <?php if ($snippet):
+?>
     <p class="search-snippet"><?php print $snippet; ?></p>
   <?php endif; ?>
-  <?php if ($info) : ?>
+
+<?php if ($info):
+?>
   <p class="search-info"><?php print $info; ?></p>
   <?php endif; ?>
 </dd>
+
Index: modules/search/search-results.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search-results.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 search-results.tpl.php
--- modules/search/search-results.tpl.php	31 Oct 2007 18:06:38 -0000	1.1
+++ modules/search/search-results.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search-results.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
 
+
 /**
  * @file search-results.tpl.php
  * Default theme implementation for displaying search results.
@@ -24,4 +25,5 @@
 <dl class="search-results <?php print $type; ?>-results">
   <?php print $search_results; ?>
 </dl>
-<?php print $pager; ?>
+<?php print $pager; 
+
Index: modules/search/search-theme-form.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search-theme-form.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 search-theme-form.tpl.php
--- modules/search/search-theme-form.tpl.php	31 Oct 2007 18:06:38 -0000	1.1
+++ modules/search/search-theme-form.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search-theme-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
 
+
 /**
  * @file search-theme-form.tpl.php
  * Default theme implementation for displaying a search form directly into the
@@ -36,3 +37,4 @@
 <div id="search" class="container-inline">
   <?php print $search_form; ?>
 </div>
+
Index: modules/search/search.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.admin.inc,v
retrieving revision 1.4
diff -u -p -r1.4 search.admin.inc
--- modules/search/search.admin.inc	8 Jan 2008 10:35:42 -0000	1.4
+++ modules/search/search.admin.inc	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search.admin.inc,v 1.4 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the search module.
@@ -11,7 +12,8 @@
  */
 function search_wipe_confirm() {
   return confirm_form(array(), t('Are you sure you want to re-index the site?'),
-                  'admin/settings/search', t(' The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel'));
+    'admin/settings/search', t(' The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel')
+  );
 }
 
 /**
@@ -78,8 +80,10 @@ function search_admin_settings_validate(
   }
   // If these settings change, the index needs to be rebuilt.
   if ((variable_get('minimum_word_size', 3) != $form_state['values']['minimum_word_size']) ||
-      (variable_get('overlap_cjk', TRUE) != $form_state['values']['overlap_cjk'])) {
+    (variable_get('overlap_cjk', TRUE) != $form_state['values']['overlap_cjk'])
+  ) {
     drupal_set_message(t('The index will be rebuilt.'));
     search_wipe();
   }
 }
+
Index: modules/search/search.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.install,v
retrieving revision 1.14
diff -u -p -r1.14 search.install
--- modules/search/search.install	28 Dec 2007 10:53:27 -0000	1.14
+++ modules/search/search.install	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search.install,v 1.14 2007/12/28 10:53:27 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -89,7 +90,7 @@ function search_schema() {
     ),
     'indexes' => array(
       'sid_type' => array('sid', 'type'),
-      'word' => array('word')
+      'word' => array('word'),
     ),
     'unique keys' => array('word_sid_type' => array('word', 'sid', 'type')),
   );
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.250
diff -u -p -r1.250 search.module
--- modules/search/search.module	8 Jan 2008 10:35:42 -0000	1.250
+++ modules/search/search.module	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search.module,v 1.250 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * Enables site-wide keyword searching.
@@ -20,67 +21,70 @@
  * No     Number, Other
  */
 define('PREG_CLASS_SEARCH_EXCLUDE',
-'\x{0}-\x{2f}\x{3a}-\x{40}\x{5b}-\x{60}\x{7b}-\x{bf}\x{d7}\x{f7}\x{2b0}-'.
-'\x{385}\x{387}\x{3f6}\x{482}-\x{489}\x{559}-\x{55f}\x{589}-\x{5c7}\x{5f3}-'.
-'\x{61f}\x{640}\x{64b}-\x{65e}\x{66a}-\x{66d}\x{670}\x{6d4}\x{6d6}-\x{6ed}'.
-'\x{6fd}\x{6fe}\x{700}-\x{70f}\x{711}\x{730}-\x{74a}\x{7a6}-\x{7b0}\x{901}-'.
-'\x{903}\x{93c}\x{93e}-\x{94d}\x{951}-\x{954}\x{962}-\x{965}\x{970}\x{981}-'.
-'\x{983}\x{9bc}\x{9be}-\x{9cd}\x{9d7}\x{9e2}\x{9e3}\x{9f2}-\x{a03}\x{a3c}-'.
-'\x{a4d}\x{a70}\x{a71}\x{a81}-\x{a83}\x{abc}\x{abe}-\x{acd}\x{ae2}\x{ae3}'.
-'\x{af1}-\x{b03}\x{b3c}\x{b3e}-\x{b57}\x{b70}\x{b82}\x{bbe}-\x{bd7}\x{bf0}-'.
-'\x{c03}\x{c3e}-\x{c56}\x{c82}\x{c83}\x{cbc}\x{cbe}-\x{cd6}\x{d02}\x{d03}'.
-'\x{d3e}-\x{d57}\x{d82}\x{d83}\x{dca}-\x{df4}\x{e31}\x{e34}-\x{e3f}\x{e46}-'.
-'\x{e4f}\x{e5a}\x{e5b}\x{eb1}\x{eb4}-\x{ebc}\x{ec6}-\x{ecd}\x{f01}-\x{f1f}'.
-'\x{f2a}-\x{f3f}\x{f71}-\x{f87}\x{f90}-\x{fd1}\x{102c}-\x{1039}\x{104a}-'.
-'\x{104f}\x{1056}-\x{1059}\x{10fb}\x{10fc}\x{135f}-\x{137c}\x{1390}-\x{1399}'.
-'\x{166d}\x{166e}\x{1680}\x{169b}\x{169c}\x{16eb}-\x{16f0}\x{1712}-\x{1714}'.
-'\x{1732}-\x{1736}\x{1752}\x{1753}\x{1772}\x{1773}\x{17b4}-\x{17db}\x{17dd}'.
-'\x{17f0}-\x{180e}\x{1843}\x{18a9}\x{1920}-\x{1945}\x{19b0}-\x{19c0}\x{19c8}'.
-'\x{19c9}\x{19de}-\x{19ff}\x{1a17}-\x{1a1f}\x{1d2c}-\x{1d61}\x{1d78}\x{1d9b}-'.
-'\x{1dc3}\x{1fbd}\x{1fbf}-\x{1fc1}\x{1fcd}-\x{1fcf}\x{1fdd}-\x{1fdf}\x{1fed}-'.
-'\x{1fef}\x{1ffd}-\x{2070}\x{2074}-\x{207e}\x{2080}-\x{2101}\x{2103}-\x{2106}'.
-'\x{2108}\x{2109}\x{2114}\x{2116}-\x{2118}\x{211e}-\x{2123}\x{2125}\x{2127}'.
-'\x{2129}\x{212e}\x{2132}\x{213a}\x{213b}\x{2140}-\x{2144}\x{214a}-\x{2b13}'.
-'\x{2ce5}-\x{2cff}\x{2d6f}\x{2e00}-\x{3005}\x{3007}-\x{303b}\x{303d}-\x{303f}'.
-'\x{3099}-\x{309e}\x{30a0}\x{30fb}-\x{30fe}\x{3190}-\x{319f}\x{31c0}-\x{31cf}'.
-'\x{3200}-\x{33ff}\x{4dc0}-\x{4dff}\x{a015}\x{a490}-\x{a716}\x{a802}\x{a806}'.
-'\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}\x{fd3f}'.
-'\x{fdfc}-\x{fe6b}\x{feff}-\x{ff0f}\x{ff1a}-\x{ff20}\x{ff3b}-\x{ff40}\x{ff5b}-'.
-'\x{ff65}\x{ff70}\x{ff9e}\x{ff9f}\x{ffe0}-\x{fffd}');
+  '\x{0}-\x{2f}\x{3a}-\x{40}\x{5b}-\x{60}\x{7b}-\x{bf}\x{d7}\x{f7}\x{2b0}-'.
+  '\x{385}\x{387}\x{3f6}\x{482}-\x{489}\x{559}-\x{55f}\x{589}-\x{5c7}\x{5f3}-'.
+  '\x{61f}\x{640}\x{64b}-\x{65e}\x{66a}-\x{66d}\x{670}\x{6d4}\x{6d6}-\x{6ed}'.
+  '\x{6fd}\x{6fe}\x{700}-\x{70f}\x{711}\x{730}-\x{74a}\x{7a6}-\x{7b0}\x{901}-'.
+  '\x{903}\x{93c}\x{93e}-\x{94d}\x{951}-\x{954}\x{962}-\x{965}\x{970}\x{981}-'.
+  '\x{983}\x{9bc}\x{9be}-\x{9cd}\x{9d7}\x{9e2}\x{9e3}\x{9f2}-\x{a03}\x{a3c}-'.
+  '\x{a4d}\x{a70}\x{a71}\x{a81}-\x{a83}\x{abc}\x{abe}-\x{acd}\x{ae2}\x{ae3}'.
+  '\x{af1}-\x{b03}\x{b3c}\x{b3e}-\x{b57}\x{b70}\x{b82}\x{bbe}-\x{bd7}\x{bf0}-'.
+  '\x{c03}\x{c3e}-\x{c56}\x{c82}\x{c83}\x{cbc}\x{cbe}-\x{cd6}\x{d02}\x{d03}'.
+  '\x{d3e}-\x{d57}\x{d82}\x{d83}\x{dca}-\x{df4}\x{e31}\x{e34}-\x{e3f}\x{e46}-'.
+  '\x{e4f}\x{e5a}\x{e5b}\x{eb1}\x{eb4}-\x{ebc}\x{ec6}-\x{ecd}\x{f01}-\x{f1f}'.
+  '\x{f2a}-\x{f3f}\x{f71}-\x{f87}\x{f90}-\x{fd1}\x{102c}-\x{1039}\x{104a}-'.
+  '\x{104f}\x{1056}-\x{1059}\x{10fb}\x{10fc}\x{135f}-\x{137c}\x{1390}-\x{1399}'.
+  '\x{166d}\x{166e}\x{1680}\x{169b}\x{169c}\x{16eb}-\x{16f0}\x{1712}-\x{1714}'.
+  '\x{1732}-\x{1736}\x{1752}\x{1753}\x{1772}\x{1773}\x{17b4}-\x{17db}\x{17dd}'.
+  '\x{17f0}-\x{180e}\x{1843}\x{18a9}\x{1920}-\x{1945}\x{19b0}-\x{19c0}\x{19c8}'.
+  '\x{19c9}\x{19de}-\x{19ff}\x{1a17}-\x{1a1f}\x{1d2c}-\x{1d61}\x{1d78}\x{1d9b}-'.
+  '\x{1dc3}\x{1fbd}\x{1fbf}-\x{1fc1}\x{1fcd}-\x{1fcf}\x{1fdd}-\x{1fdf}\x{1fed}-'.
+  '\x{1fef}\x{1ffd}-\x{2070}\x{2074}-\x{207e}\x{2080}-\x{2101}\x{2103}-\x{2106}'.
+  '\x{2108}\x{2109}\x{2114}\x{2116}-\x{2118}\x{211e}-\x{2123}\x{2125}\x{2127}'.
+  '\x{2129}\x{212e}\x{2132}\x{213a}\x{213b}\x{2140}-\x{2144}\x{214a}-\x{2b13}'.
+  '\x{2ce5}-\x{2cff}\x{2d6f}\x{2e00}-\x{3005}\x{3007}-\x{303b}\x{303d}-\x{303f}'.
+  '\x{3099}-\x{309e}\x{30a0}\x{30fb}-\x{30fe}\x{3190}-\x{319f}\x{31c0}-\x{31cf}'.
+  '\x{3200}-\x{33ff}\x{4dc0}-\x{4dff}\x{a015}\x{a490}-\x{a716}\x{a802}\x{a806}'.
+  '\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}\x{fd3f}'.
+  '\x{fdfc}-\x{fe6b}\x{feff}-\x{ff0f}\x{ff1a}-\x{ff20}\x{ff3b}-\x{ff40}\x{ff5b}-'.
+  '\x{ff65}\x{ff70}\x{ff9e}\x{ff9f}\x{ffe0}-\x{fffd}'
+);
 
 /**
  * Matches all 'N' Unicode character classes (numbers)
  */
 define('PREG_CLASS_NUMBERS',
-'\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}'.
-'\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}'.
-'\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}'.
-'\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-'.
-'\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}'.
-'\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}'.
-'\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}'.
-'\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-'.
-'\x{3289}\x{32b1}-\x{32bf}\x{ff10}-\x{ff19}');
+  '\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}'.
+  '\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}'.
+  '\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}'.
+  '\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-'.
+  '\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}'.
+  '\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}'.
+  '\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}'.
+  '\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-'.
+  '\x{3289}\x{32b1}-\x{32bf}\x{ff10}-\x{ff19}'
+);
 
 /**
  * Matches all 'P' Unicode character classes (punctuation)
  */
 define('PREG_CLASS_PUNCTUATION',
-'\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}'.
-'\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}'.
-'\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}'.
-'\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}'.
-'\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}'.
-'\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}'.
-'\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}'.
-'\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}'.
-'\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-'.
-'\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}'.
-'\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}'.
-'\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}'.
-'\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}'.
-'\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-'.
-'\x{ff65}');
+  '\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}'.
+  '\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}'.
+  '\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}'.
+  '\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}'.
+  '\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}'.
+  '\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}'.
+  '\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}'.
+  '\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}'.
+  '\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-'.
+  '\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}'.
+  '\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}'.
+  '\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}'.
+  '\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}'.
+  '\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-'.
+  '\x{ff65}'
+);
 
 /**
  * Matches all CJK characters that are candidates for auto-splitting
@@ -88,7 +92,8 @@ define('PREG_CLASS_PUNCTUATION',
  * Contains kana and BMP ideographs.
  */
 define('PREG_CLASS_CJK', '\x{3041}-\x{30ff}\x{31f0}-\x{31ff}\x{3400}-\x{4db5}'.
-'\x{4e00}-\x{9fbb}\x{f900}-\x{fad9}');
+  '\x{4e00}-\x{9fbb}\x{f900}-\x{fad9}'
+);
 
 /**
  * Implementation of hook_help().
@@ -100,8 +105,10 @@ function search_help($path, $arg) {
       $output .= '<p>'. t('To provide keyword searching, the search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured <a href="@cron">cron maintenance task</a> is required. Indexing behavior can be adjusted using the <a href="@searchsettings">search settings page</a>; for example, the <em>Number of items to index per cron run</em> sets the maximum number of items indexed in each pass of a <a href="@cron">cron maintenance task</a>. If necessary, reduce this number to prevent timeouts and memory errors when indexing.', array('@cron' => url('admin/reports/status'), '@searchsettings' => url('admin/settings/search'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@search">Search module</a>.', array('@search' => 'http://drupal.org/handbook/modules/search/')) .'</p>';
       return $output;
+
     case 'admin/settings/search':
       return '<p>'. t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured <a href="@cron">cron maintenance task</a> is required. Indexing behavior can be adjusted using the settings below.', array('@cron' => url('admin/reports/status'))) .'</p>';
+
     case 'search#noresults':
       return t('<ul>
 <li>Check if your spelling is correct.</li>
@@ -283,7 +290,7 @@ function search_update_totals() {
     // Get total count
     $total = db_result(db_query("SELECT SUM(score) FROM {search_index} WHERE word = '%s'", $word));
     // Apply Zipf's law to equalize the probability distribution
-    $total = log10(1 + 1/(max(1, $total)));
+    $total = log10(1 + 1 / (max(1, $total)));
     db_query("UPDATE {search_total} SET count = %f WHERE word = '%s'", $total, $word);
     if (!db_affected_rows()) {
       db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %f)", $word, $total);
@@ -342,7 +349,7 @@ function search_simplify($text) {
 function search_expand_cjk($matches) {
   $min = variable_get('minimum_word_size', 3);
   $str = $matches[0];
-  $l = drupal_strlen($str);
+  $l   = drupal_strlen($str);
   // Passthrough short words
   if ($l <= $min) {
     return ' '. $str .' ';
@@ -354,7 +361,7 @@ function search_expand_cjk($matches) {
   for ($i = 0; $i < $l; ++$i) {
     // Grab next character
     $current = drupal_substr($str, 0, 1);
-    $str = substr($str, strlen($current));
+    $str     = substr($str, strlen($current));
     $chars[] = $current;
     if ($i >= $min - 1) {
       $tokens .= implode('', $chars) .' ';
@@ -426,17 +433,18 @@ function search_index($sid, $type, $text
   // Multipliers for scores of words inside certain HTML tags.
   // Note: 'a' must be included for link ranking to work.
   $tags = array('h1' => 25,
-                'h2' => 18,
-                'h3' => 15,
-                'h4' => 12,
-                'h5' => 9,
-                'h6' => 6,
-                'u' => 3,
-                'b' => 3,
-                'i' => 3,
-                'strong' => 3,
-                'em' => 3,
-                'a' => 10);
+    'h2' => 18,
+    'h3' => 15,
+    'h4' => 12,
+    'h5' => 9,
+    'h6' => 6,
+    'u' => 3,
+    'b' => 3,
+    'i' => 3,
+    'strong' => 3,
+    'em' => 3,
+    'a' => 10,
+  );
 
   // Strip off all ignored tags to speed up processing, but insert space before/after
   // them to keep word boundaries.
@@ -448,15 +456,23 @@ function search_index($sid, $type, $text
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting $null as required).
 
-  $tag = FALSE; // Odd/even counter. Tag or no tag.
-  $link = FALSE; // State variable for link analyser
-  $score = 1; // Starting score per word
-  $accum = ' '; // Accumulator for cleaned up data
-  $tagstack = array(); // Stack with open tags
-  $tagwords = 0; // Counter for consecutive words
-  $focus = 1; // Focus state
+  // Odd/even counter. Tag or no tag.
+  $tag = FALSE;
+  // State variable for link analyser
+  $link = FALSE;
+  // Starting score per word
+  $score = 1;
+  // Accumulator for cleaned up data
+  $accum = ' ';
+  // Stack with open tags
+  $tagstack = array();
+  // Counter for consecutive words
+  $tagwords = 0;
+  // Focus state
+  $focus = 1;
 
-  $results = array(0 => array()); // Accumulator for words for index
+  // Accumulator for words for index
+  $results = array(0 => array());
 
   foreach ($split as $value) {
     if ($tag) {
@@ -624,6 +640,7 @@ function search_touch_node($nid) {
 function search_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   switch ($op) {
     // Transplant links to a node into the target node.
+
     case 'update index':
       $result = db_query("SELECT caption FROM {search_node_links} WHERE nid = %d", $node->nid);
       $output = array();
@@ -633,6 +650,7 @@ function search_nodeapi(&$node, $op, $te
       return '<a>('. implode(', ', $output) .')</a>';
     // Reindex the node when it is updated.  The node is automatically indexed
     // when it is added, simply by being added to the node table.
+
     case 'update':
       search_touch_node($node->nid);
       break;
@@ -645,6 +663,7 @@ function search_nodeapi(&$node, $op, $te
 function search_comment($a1, $op) {
   switch ($op) {
     // Reindex the node when comments are added or changed
+
     case 'insert':
     case 'update':
     case 'delete':
@@ -686,6 +705,7 @@ function search_query_insert($keys, $opt
  *
  * @param $text
  *   The search keys.
+ *
  * @return
  *   A list of six elements.
  *    * A series of statements AND'd together which will be used to provide all
@@ -709,16 +729,16 @@ function search_parse_query($text) {
   }
 
   // Classify tokens
-  $or = FALSE;
+  $or      = FALSE;
   $warning = '';
-  $simple = TRUE;
+  $simple  = TRUE;
   foreach ($matches as $match) {
     $phrase = FALSE;
     // Strip off phrase quotes
     if ($match[2]{0} == '"') {
       $match[2] = substr($match[2], 1, -1);
-      $phrase = TRUE;
-      $simple = FALSE;
+      $phrase   = TRUE;
+      $simple   = FALSE;
     }
     // Simplify keyword according to indexing rules and external preprocessors
     $words = search_simplify($match[2]);
@@ -763,20 +783,20 @@ function search_parse_query($text) {
   }
 
   // Convert keywords into SQL statements.
-  $query = array();
-  $query2 = array();
-  $arguments = array();
+  $query      = array();
+  $query2     = array();
+  $arguments  = array();
   $arguments2 = array();
-  $matches = 0;
+  $matches    = 0;
   $simple_and = FALSE;
-  $simple_or = FALSE;
+  $simple_or  = FALSE;
   // Positive matches
   foreach ($keys['positive'] as $key) {
     // Group of ORed terms
     if (is_array($key) && count($key)) {
       $simple_or = TRUE;
-      $queryor = array();
-      $any = FALSE;
+      $queryor   = array();
+      $any       = FALSE;
       foreach ($key as $or) {
         list($q, $num_new_scores) = _search_parse_query($or, $arguments2);
         $any |= $num_new_scores;
@@ -813,9 +833,9 @@ function search_parse_query($text) {
   foreach ($keys['negative'] as $key) {
     list($q) = _search_parse_query($key, $arguments2, TRUE);
     if ($q) {
-      $query[] = $q;
+      $query[]     = $q;
       $arguments[] = $key;
-      $simple = FALSE;
+      $simple      = FALSE;
     }
   }
   $query = implode(' AND ', $query);
@@ -923,7 +943,7 @@ function do_search($keywords, $type, $jo
   // Build query for keyword normalization.
   $conditions = "$where1 AND ($query[2]) AND i.type = '%s'";
   $arguments1 = array_merge($arguments1, $query[3], array($type));
-  $join = "INNER JOIN {search_total} t ON i.word = t.word $join1";
+  $join       = "INNER JOIN {search_total} t ON i.word = t.word $join1";
   if (!$query[5]) {
     $conditions .= " AND ($query[0])";
     $arguments1 = array_merge($arguments1, $query[1]);
@@ -931,7 +951,7 @@ function do_search($keywords, $type, $jo
   }
 
   // Calculate maximum keyword relevance, to normalize it.
-  $select = "SELECT SUM(i.score * t.count) AS score FROM {search_index} i $join WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d ORDER BY score DESC";
+  $select    = "SELECT SUM(i.score * t.count) AS score FROM {search_index} i $join WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d ORDER BY score DESC";
   $arguments = array_merge($arguments1, array($query[4]));
   $normalize = db_result(db_query_range($select, $arguments, 0, 1));
   if (!$normalize) {
@@ -940,9 +960,9 @@ function do_search($keywords, $type, $jo
   $columns2 = str_replace('i.relevance', '('. (1.0 / $normalize) .' * SUM(i.score * t.count))', $columns2);
 
   // Build query to retrieve results.
-  $select = "SELECT i.type, i.sid, $columns2 FROM {search_index} i $join $join2 WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d";
-  $count_select =  "SELECT COUNT(*) FROM ($select) n1";
-  $arguments = array_merge($arguments2, $arguments1, array($query[4]));
+  $select       = "SELECT i.type, i.sid, $columns2 FROM {search_index} i $join $join2 WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d";
+  $count_select = "SELECT COUNT(*) FROM ($select) n1";
+  $arguments    = array_merge($arguments2, $arguments1, array($query[4]));
 
   // Do actual search query
   $result = pager_query("$select $sort_parameters", 10, 0, $count_select, $arguments);
@@ -961,8 +981,8 @@ function search_get_keys() {
   if (!isset($return)) {
     // Extract keys as remainder of path
     // Note: support old GET format of searches for existing links.
-    $path = explode('/', $_GET['q'], 3);
-    $keys = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys'];
+    $path   = explode('/', $_GET['q'], 3);
+    $keys   = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys'];
     $return = count($path) == 3 ? $path[2] : $keys;
   }
   return $return;
@@ -1008,6 +1028,7 @@ function search_get_keys() {
  *   which implements hook_search(). Defaults to 'node'.
  * @param $prompt
  *   A piece of text to put before the form (e.g. "Enter your keywords")
+ *
  * @return
  *   An HTML string containing the search form.
  */
@@ -1060,8 +1081,8 @@ function search_box(&$form_state, $form_
     '#default_value' => '',
     '#attributes' => array('title' => t('Enter the terms you wish to search for.')),
   );
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
-  $form['#submit'][] = 'search_box_form_submit';
+  $form['submit']      = array('#type' => 'submit', '#value' => t('Search'));
+  $form['#submit'][]   = 'search_box_form_submit';
   $form['#validate'][] = 'search_box_form_validate';
 
   return $form;
@@ -1179,9 +1200,9 @@ function search_excerpt($keys, $text) {
   // First we collect ranges of text around each keyword, starting/ending
   // at spaces.
   // If the sum of all fragments is too short, we look for second occurrences.
-  $ranges = array();
+  $ranges   = array();
   $included = array();
-  $length = 0;
+  $length   = 0;
   while ($length < 256 && count($workkeys)) {
     foreach ($workkeys as $k => $key) {
       if (strlen($key) == 0) {
@@ -1243,8 +1264,8 @@ function search_excerpt($keys, $text) {
     }
     else {
       $newranges[$from1] = $to1;
-      $from1 = $from2;
-      $to1 = $to2;
+      $from1             = $from2;
+      $to1               = $to2;
     }
   }
   $newranges[$from1] = $to1;
@@ -1273,13 +1294,14 @@ function _search_excerpt_replace(&$text)
 }
 
 function search_forms() {
-  $forms['search_theme_form']= array(
+  $forms['search_theme_form'] = array(
     'callback' => 'search_box',
     'callback arguments' => array('search_theme_form'),
   );
-  $forms['search_block_form']= array(
+  $forms['search_block_form'] = array(
     'callback' => 'search_box',
     'callback arguments' => array('search_block_form'),
   );
   return $forms;
 }
+
Index: modules/search/search.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.pages.inc,v
retrieving revision 1.4
diff -u -p -r1.4 search.pages.inc
--- modules/search/search.pages.inc	6 Dec 2007 09:51:01 -0000	1.4
+++ modules/search/search.pages.inc	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: search.pages.inc,v 1.4 2007/12/06 09:51:01 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the search module.
@@ -78,8 +79,8 @@ function template_preprocess_search_resu
  * @see search-result.tpl.php
  */
 function template_preprocess_search_result(&$variables) {
-  $result = $variables['result'];
-  $variables['url'] = check_url($result['link']);
+  $result             = $variables['result'];
+  $variables['url']   = check_url($result['link']);
   $variables['title'] = check_plain($result['title']);
 
   $info = array();
@@ -128,3 +129,4 @@ function search_form_submit($form, &$for
   $form_state['redirect'] = 'search/'. $type .'/'. $keys;
   return;
 }
+
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.6
diff -u -p -r1.6 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	8 Jan 2008 10:35:42 -0000	1.6
+++ modules/statistics/statistics.admin.inc	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: statistics.admin.inc,v 1.6 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the statistics module.
@@ -14,7 +15,7 @@ function statistics_recent_hits() {
     array('data' => t('Timestamp'), 'field' => 'a.timestamp', 'sort' => 'desc'),
     array('data' => t('Page'), 'field' => 'a.path'),
     array('data' => t('User'), 'field' => 'u.name'),
-    array('data' => t('Operations'))
+    array('data' => t('Operations')),
   );
 
   $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid'. tablesort_sql($header);
@@ -26,7 +27,8 @@ function statistics_recent_hits() {
       array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
       _statistics_format_item($log->title, $log->path),
       theme('username', $log),
-      l(t('details'), "admin/reports/access/$log->aid"));
+      l(t('details'), "admin/reports/access/$log->aid"),
+    );
   }
 
   if (empty($rows)) {
@@ -50,7 +52,7 @@ function statistics_top_pages() {
     array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
     array('data' => t('Page'), 'field' => 'path'),
     array('data' => t('Average page generation time'), 'field' => 'average_time'),
-    array('data' => t('Total page generation time'), 'field' => 'total_time')
+    array('data' => t('Total page generation time'), 'field' => 'total_time'),
   );
   $sql .= tablesort_sql($header);
   $result = pager_query($sql, 30, 0, $sql_cnt);
@@ -79,18 +81,18 @@ function statistics_top_visitors() {
     array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
     array('data' => t('Visitor'), 'field' => 'u.name'),
     array('data' => t('Total page generation time'), 'field' => 'total'),
-    array('data' => t('Operations'))
+    array('data' => t('Operations')),
   );
 
-  $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, ac.aid FROM {accesslog} a LEFT JOIN {access} ac ON ac.type = 'host' AND LOWER(a.hostname) LIKE (ac.mask) LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, ac.aid". tablesort_sql($header);
+  $sql     = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, ac.aid FROM {accesslog} a LEFT JOIN {access} ac ON ac.type = 'host' AND LOWER(a.hostname) LIKE (ac.mask) LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, ac.aid". tablesort_sql($header);
   $sql_cnt = "SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM {accesslog}";
-  $result = pager_query($sql, 30, 0, $sql_cnt);
+  $result  = pager_query($sql, 30, 0, $sql_cnt);
 
   $rows = array();
   while ($account = db_fetch_object($result)) {
-    $qs = drupal_get_destination();
+    $qs       = drupal_get_destination();
     $ban_link = $account->aid ? l(t('unban'), "admin/user/rules/delete/$account->aid", array('query' => $qs)) : l(t('ban'), "admin/user/rules/add/$account->hostname/host", array('query' => $qs));
-    $rows[] = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
+    $rows[]   = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
   }
 
   if (empty($rows)) {
@@ -142,29 +144,29 @@ function statistics_access_log($aid) {
   if ($access = db_fetch_object($result)) {
     $rows[] = array(
       array('data' => t('URL'), 'header' => TRUE),
-      l(url($access->path, array('absolute' => TRUE)), $access->path)
+      l(url($access->path, array('absolute' => TRUE)), $access->path),
     );
     // It is safe to avoid filtering $access->title through check_plain because
     // it comes from drupal_get_title().
     $rows[] = array(
       array('data' => t('Title'), 'header' => TRUE),
-      $access->title
+      $access->title,
     );
     $rows[] = array(
       array('data' => t('Referrer'), 'header' => TRUE),
-      ($access->url ? l($access->url, $access->url) : '')
+      ($access->url ? l($access->url, $access->url) : ''),
     );
     $rows[] = array(
       array('data' => t('Date'), 'header' => TRUE),
-      format_date($access->timestamp, 'large')
+      format_date($access->timestamp, 'large'),
     );
     $rows[] = array(
       array('data' => t('User'), 'header' => TRUE),
-      theme('username', $access)
+      theme('username', $access),
     );
     $rows[] = array(
       array('data' => t('Hostname'), 'header' => TRUE),
-      check_plain($access->hostname)
+      check_plain($access->hostname),
     );
 
     return theme('table', array(), $rows);
@@ -185,31 +187,37 @@ function statistics_access_logging_setti
   $options = array('1' => t('Enabled'), '0' => t('Disabled'));
   $form['access'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Access log settings'));
+    '#title' => t('Access log settings'),
+  );
   $form['access']['statistics_enable_access_log'] = array(
     '#type' => 'radios',
     '#title' => t('Enable access log'),
     '#default_value' => variable_get('statistics_enable_access_log', 0),
     '#options' => $options,
-    '#description' => t('Log each page access. Required for referrer statistics.'));
+    '#description' => t('Log each page access. Required for referrer statistics.'),
+  );
   $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
   $form['access']['statistics_flush_accesslog_timer'] = array(
     '#type' => 'select',
     '#title' => t('Discard access logs older than'),
-    '#default_value'   => variable_get('statistics_flush_accesslog_timer', 259200),
+    '#default_value' => variable_get('statistics_flush_accesslog_timer', 259200),
     '#options' => $period,
-    '#description' => t('Older access log entries (including referrer statistics) will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))));
+    '#description' => t('Older access log entries (including referrer statistics) will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))),
+  );
 
   // count content views settings
   $form['content'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Content viewing counter settings'));
+    '#title' => t('Content viewing counter settings'),
+  );
   $form['content']['statistics_count_content_views'] = array(
     '#type' => 'radios',
     '#title' => t('Count content views'),
     '#default_value' => variable_get('statistics_count_content_views', 0),
     '#options' => $options,
-    '#description' => t('Increment a counter each time content is viewed.'));
+    '#description' => t('Increment a counter each time content is viewed.'),
+  );
 
   return system_settings_form($form);
 }
+
Index: modules/statistics/statistics.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v
retrieving revision 1.13
diff -u -p -r1.13 statistics.install
--- modules/statistics/statistics.install	18 Dec 2007 12:59:22 -0000	1.13
+++ modules/statistics/statistics.install	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: statistics.install,v 1.13 2007/12/18 12:59:22 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -20,6 +21,7 @@ function statistics_update_1000() {
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {accesslog} CHANGE COLUMN sid sid varchar(64) NOT NULL default ''");
       break;
+
     case 'pgsql':
       db_change_column($ret, 'accesslog', 'sid', 'sid', 'varchar(64)', array('not null' => TRUE, 'default' => "''"));
       break;
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.272
diff -u -p -r1.272 statistics.module
--- modules/statistics/statistics.module	4 Jan 2008 09:31:48 -0000	1.272
+++ modules/statistics/statistics.module	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: statistics.module,v 1.272 2008/01/04 09:31:48 goba Exp $
 
+
 /**
  * @file
  * Logs access statistics for your site.
@@ -26,12 +27,16 @@ function statistics_help($path, $arg) {
       $output .= '<li>'. t('The <em>Count content views</em> setting on the <a href="@accesslog">access log settings page</a> enables a counter for each post on your site that increments each time the post is viewed. This option must be enabled to provide post-specific access counts. Enabling this option adds one additional database call per each post displayed by Drupal.', array('@accesslog' => url('admin/reports/settings'))) .'</li></ul>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@statistics">Statistics module</a>.', array('@statistics' => 'http://drupal.org/handbook/modules/statistics/')) .'</p>';
       return $output;
+
     case 'admin/reports/settings':
       return '<p>'. t('Settings for the statistical information that Drupal will keep about the site. See <a href="@statistics">site statistics</a> for the actual information.', array('@statistics' => url('admin/reports/hits'))) .'</p>';
+
     case 'admin/reports/hits':
       return '<p>'. t("This page displays the site's most recent hits.") .'</p>';
+
     case 'admin/reports/referrers':
       return '<p>'. t('This page displays all external referrers, or external references to your website.') .'</p>';
+
     case 'admin/reports/visitors':
       return '<p>'. t("When you ban a visitor, you prevent the visitor's IP address from accessing your site. Unlike blocking a user, banning a visitor works even for anonymous users. This is most commonly used to block resource-intensive bots or web crawlers.") .'</p>';
   }
@@ -212,7 +217,6 @@ function statistics_title_list($dbfield,
   return FALSE;
 }
 
-
 /**
  * Retrieves a node's "view statistics".
  *
@@ -304,7 +308,7 @@ function _statistics_link($path, $width 
 
 function _statistics_format_item($title, $path) {
   $path = ($path ? $path : '/');
-  $output  = ($title ? "$title<br />" : '');
+  $output = ($title ? "$title<br />" : '');
   $output .= _statistics_link($path);
   return $output;
 }
@@ -319,3 +323,4 @@ function statistics_nodeapi(&$node, $op,
       db_query('DELETE FROM {node_counter} WHERE nid = %d', $node->nid);
   }
 }
+
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	20 Oct 2007 21:57:50 -0000	1.2
+++ modules/statistics/statistics.pages.inc	21 Jan 2008 21:58:58 -0000
@@ -1,19 +1,20 @@
 <?php
 // $Id: statistics.pages.inc,v 1.2 2007/10/20 21:57:50 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the statistics module.
  */
-
 function statistics_node_tracker() {
   if ($node = node_load(arg(1))) {
 
     $header = array(
-        array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),
-        array('data' => t('Referrer'), 'field' => 'a.url'),
-        array('data' => t('User'), 'field' => 'u.name'),
-        array('data' => t('Operations')));
+      array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),
+      array('data' => t('Referrer'), 'field' => 'a.url'),
+      array('data' => t('User'), 'field' => 'u.name'),
+      array('data' => t('Operations')),
+    );
 
     $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\''. tablesort_sql($header), 30, 0, NULL, $node->nid);
     $rows = array();
@@ -22,7 +23,8 @@ function statistics_node_tracker() {
         array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
         _statistics_link($log->url),
         theme('username', $log),
-        l(t('details'), "admin/reports/access/$log->aid"));
+        l(t('details'), "admin/reports/access/$log->aid"),
+      );
     }
 
     if (empty($rows)) {
@@ -43,9 +45,10 @@ function statistics_user_tracker() {
   if ($account = user_load(array('uid' => arg(1)))) {
 
     $header = array(
-        array('data' => t('Timestamp'), 'field' => 'timestamp', 'sort' => 'desc'),
-        array('data' => t('Page'), 'field' => 'path'),
-        array('data' => t('Operations')));
+      array('data' => t('Timestamp'), 'field' => 'timestamp', 'sort' => 'desc'),
+      array('data' => t('Page'), 'field' => 'path'),
+      array('data' => t('Operations')),
+    );
 
     $result = pager_query('SELECT aid, timestamp, path, title FROM {accesslog} WHERE uid = %d'. tablesort_sql($header), 30, 0, NULL, $account->uid);
     $rows = array();
@@ -53,7 +56,8 @@ function statistics_user_tracker() {
       $rows[] = array(
         array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
         _statistics_format_item($log->title, $log->path),
-        l(t('details'), "admin/reports/access/$log->aid"));
+        l(t('details'), "admin/reports/access/$log->aid"),
+      );
     }
 
     if (empty($rows)) {
@@ -69,3 +73,4 @@ function statistics_user_tracker() {
     drupal_not_found();
   }
 }
+
Index: modules/syslog/syslog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/syslog/syslog.module,v
retrieving revision 1.14
diff -u -p -r1.14 syslog.module
--- modules/syslog/syslog.module	14 Dec 2007 18:08:48 -0000	1.14
+++ modules/syslog/syslog.module	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: syslog.module,v 1.14 2007/12/14 18:08:48 goba Exp $
 
+
 /**
  * @file
  * Redirects logging messages to syslog.
@@ -28,9 +29,9 @@ function syslog_help($path, $arg) {
 
 function syslog_menu() {
   $items['admin/settings/logging/syslog'] = array(
-    'title'          => 'Syslog',
-    'description'    => 'Settings for syslog logging. Syslog is an operating system administrative logging tool used in systems management and security auditing. Most suited to medium and large sites, syslog provides filtering tools that allow messages to be routed by type and severity.',
-    'page callback'  => 'drupal_get_form',
+    'title' => 'Syslog',
+    'description' => 'Settings for syslog logging. Syslog is an operating system administrative logging tool used in systems management and security auditing. Most suited to medium and large sites, syslog provides filtering tools that allow messages to be routed by type and severity.',
+    'page callback' => 'drupal_get_form',
     'page arguments' => array('syslog_admin_settings'),
   );
   return $items;
@@ -38,21 +39,22 @@ function syslog_menu() {
 
 function syslog_admin_settings() {
   $form['syslog_facility'] = array(
-    '#type'          => 'select',
-    '#title'         => t('Send events to this syslog facility'),
+    '#type' => 'select',
+    '#title' => t('Send events to this syslog facility'),
     '#default_value' => variable_get('syslog_facility', DEFAULT_SYSLOG_FACILITY),
-    '#options'       => syslog_facility_list(),
-    '#description'   => t('Select the syslog facility code under which Drupal\'s messages should be sent. On UNIX/Linux systems, Drupal can flag its messages with the code LOG_LOCAL0 through LOG_LOCAL7; for Microsoft Windows, all messages are flagged with the code LOG_USER. Depending on the system configuration, syslog and other logging tools use this code to identify or filter Drupal messages from within the entire system log. For more information on syslog, see <a href="@syslog_help">Syslog help</a>.', array(
-      '@syslog_help' => url('admin/help/syslog'),
-      '!php'         => l("PHP's syslog", 'http://www.php.net/manual/en/function.openlog.php', array('external' => TRUE)),
-      '!syslog_conf' => l('UNIX/Linux syslog.conf', 'http://www.rt.com/man/syslog.5.html', array('external' => TRUE)))),
+    '#options' => syslog_facility_list(),
+    '#description' => t('Select the syslog facility code under which Drupal\'s messages should be sent. On UNIX/Linux systems, Drupal can flag its messages with the code LOG_LOCAL0 through LOG_LOCAL7; for Microsoft Windows, all messages are flagged with the code LOG_USER. Depending on the system configuration, syslog and other logging tools use this code to identify or filter Drupal messages from within the entire system log. For more information on syslog, see <a href="@syslog_help">Syslog help</a>.', array(
+        '@syslog_help' => url('admin/help/syslog'),
+        '!php' => l("PHP's syslog", 'http://www.php.net/manual/en/function.openlog.php', array('external' => TRUE)),
+        '!syslog_conf' => l('UNIX/Linux syslog.conf', 'http://www.rt.com/man/syslog.5.html', array('external' => TRUE)),
+      )),
   );
   return system_settings_form($form);
 }
 
 function syslog_facility_list() {
   $facility_list = array(
-    LOG_USER   => t('LOG_USER - User level messages. Use this for Windows.'),
+    LOG_USER => t('LOG_USER - User level messages. Use this for Windows.'),
   );
   if (defined('LOG_LOCAL0')) {
     $facility_list += array(
@@ -96,7 +98,7 @@ function syslog_theme() {
 function theme_syslog_format($entry) {
   global $base_url;
 
-  $message  = $base_url;
+  $message = $base_url;
   $message .= '|'. $entry['timestamp'];
   $message .= '|'. $entry['type'];
   $message .= '|'. $entry['ip'];
@@ -108,3 +110,4 @@ function theme_syslog_format($entry) {
 
   return $message;
 }
+
Index: modules/system/block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/block.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 block.tpl.php
--- modules/system/block.tpl.php	1 Sep 2007 05:42:48 -0000	1.4
+++ modules/system/block.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: block.tpl.php,v 1.4 2007/09/01 05:42:48 dries Exp $
 
+
 /**
  * @file block.tpl.php
  *
@@ -26,12 +27,14 @@
  * @see template_preprocess_block()
  */
 ?>
-<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>">
-<?php if ($block->subject): ?>
-  <h2><?php print $block->subject ?></h2>
-<?php endif;?>
+<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module?>">
+<?php if ($block->subject):
+?>
+  <h2><?php print $block->subject?></h2>
+<?php endif; ?>
 
   <div class="content">
-    <?php print $block->content ?>
+    <?php print $block->content?>
   </div>
 </div>
+
Index: modules/system/box.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/box.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 box.tpl.php
--- modules/system/box.tpl.php	16 Dec 2007 21:01:45 -0000	1.3
+++ modules/system/box.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: box.tpl.php,v 1.3 2007/12/16 21:01:45 goba Exp $
 
+
 /**
  * @file box.tpl.php
  *
@@ -15,9 +16,11 @@
 ?>
 <div class="box">
 
-<?php if ($title): ?>
-  <h2><?php print $title ?></h2>
+<?php if ($title):
+?>
+  <h2><?php print $title?></h2>
 <?php endif; ?>
 
-  <div class="content"><?php print $content ?></div>
+  <div class="content"><?php print $content?></div>
 </div>
+
Index: modules/system/maintenance-page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/maintenance-page.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 maintenance-page.tpl.php
--- modules/system/maintenance-page.tpl.php	30 Nov 2007 12:19:10 -0000	1.1
+++ modules/system/maintenance-page.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: maintenance-page.tpl.php,v 1.1 2007/11/30 12:19:10 goba Exp $
 
+
 /**
  * @file maintenance-page.tpl.php
  *
@@ -16,40 +17,49 @@
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language?>" lang="<?php print $language->language?>">
 
 <head>
   <title><?php print $head_title; ?></title>
   <?php print $head; ?>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
+
+<?php print $styles; ?>
+
+<?php print $scripts; ?>
+/* Needed to avoid Flash of Unstyled Content in IE */
+  <script type="text/javascript"><?php
+?> </script>
 </head>
 <body class="<?php print $body_classes; ?>">
   <div id="page">
     <div id="header">
       <div id="logo-title">
 
-        <?php if (!empty($logo)): ?>
+        <?php if (!empty($logo)):
+?>
           <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
             <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
           </a>
         <?php endif; ?>
 
         <div id="name-and-slogan">
-          <?php if (!empty($site_name)): ?>
+          <?php if (!empty($site_name)):
+?>
             <h1 id="site-name">
-              <a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              <a href="<?php print $base_path?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
             </h1>
           <?php endif; ?>
 
-          <?php if (!empty($site_slogan)): ?>
+
+<?php if (!empty($site_slogan)):
+?>
             <div id="site-slogan"><?php print $site_slogan; ?></div>
           <?php endif; ?>
         </div> <!-- /name-and-slogan -->
       </div> <!-- /logo-title -->
 
-      <?php if (!empty($header)): ?>
+      <?php if (!empty($header)):
+?>
         <div id="header-region">
           <?php print $header; ?>
         </div>
@@ -59,7 +69,8 @@
 
     <div id="container" class="clear-block">
 
-      <?php if (!empty($left)): ?>
+      <?php if (!empty($left)):
+?>
         <div id="sidebar-left" class="column sidebar">
           <?php print $left; ?>
         </div> <!-- /sidebar-left -->
@@ -68,8 +79,11 @@
       <div id="main" class="column"><div id="main-squeeze">
 
         <div id="content">
-          <?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
-          <?php if (!empty($messages)): print $messages; endif; ?>
+          <?php if (!empty($title)):
+?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+
+<?php if (!empty($messages)):
+print $messages; endif; ?>
           <div id="content-content" class="clear-block">
             <?php print $content; ?>
           </div> <!-- /content-content -->
@@ -77,7 +91,8 @@
 
       </div></div> <!-- /main-squeeze /main -->
 
-      <?php if (!empty($right)): ?>
+      <?php if (!empty($right)):
+?>
         <div id="sidebar-right" class="column sidebar">
           <?php print $right; ?>
         </div> <!-- /sidebar-right -->
@@ -88,7 +103,9 @@
     <div id="footer-wrapper">
       <div id="footer">
         <?php print $footer_message; ?>
-        <?php if (!empty($footer)): print $footer; endif; ?>
+
+<?php if (!empty($footer)):
+print $footer; endif; ?>
       </div> <!-- /footer -->
     </div> <!-- /footer-wrapper -->
 
@@ -96,3 +113,4 @@
 
 </body>
 </html>
+
Index: modules/system/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v
retrieving revision 1.10
diff -u -p -r1.10 page.tpl.php
--- modules/system/page.tpl.php	8 Dec 2007 14:06:22 -0000	1.10
+++ modules/system/page.tpl.php	21 Jan 2008 21:58:58 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: page.tpl.php,v 1.10 2007/12/08 14:06:22 goba Exp $
 
+
 /**
  * @file page.tpl.php
  *
@@ -76,44 +77,55 @@
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language?>" lang="<?php print $language->language?>">
 
 <head>
   <title><?php print $head_title; ?></title>
   <?php print $head; ?>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
+
+<?php print $styles; ?>
+
+<?php print $scripts; ?>
+/* Needed to avoid Flash of Unstyled Content in IE */
+  <script type="text/javascript"><?php
+?> </script>
 </head>
 <body class="<?php print $body_classes; ?>">
   <div id="page">
     <div id="header">
       <div id="logo-title">
 
-        <?php if (!empty($logo)): ?>
+        <?php if (!empty($logo)):
+?>
           <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
             <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
           </a>
         <?php endif; ?>
 
         <div id="name-and-slogan">
-          <?php if (!empty($site_name)): ?>
+          <?php if (!empty($site_name)):
+?>
             <h1 id="site-name">
-              <a href="<?php print $front_page ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              <a href="<?php print $front_page?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
             </h1>
           <?php endif; ?>
 
-          <?php if (!empty($site_slogan)): ?>
+
+<?php if (!empty($site_slogan)):
+?>
             <div id="site-slogan"><?php print $site_slogan; ?></div>
           <?php endif; ?>
         </div> <!-- /name-and-slogan -->
       </div> <!-- /logo-title -->
 
-      <?php if (!empty($search_box)): ?>
+      <?php if (!empty($search_box)):
+?>
         <div id="search-box"><?php print $search_box; ?></div>
       <?php endif; ?>
 
-      <?php if (!empty($header)): ?>
+
+<?php if (!empty($header)):
+?>
         <div id="header-region">
           <?php print $header; ?>
         </div>
@@ -123,35 +135,55 @@
 
     <div id="container" class="clear-block">
 
-      <div id="navigation" class="menu <?php if (!empty($primary_links)) { print "withprimary"; } if (!empty($secondary_links)) { print " withsecondary"; } ?> ">
-        <?php if (!empty($primary_links)): ?>
+      <div id="navigation" class="menu <?php if (!empty($primary_links)) {
+  print "withprimary";
+}
+if (!empty($secondary_links)) {
+  print " withsecondary";
+}
+?> ">
+        <?php if (!empty($primary_links)):
+?>
           <div id="primary" class="clear-block">
             <?php print theme('links', $primary_links, array('class' => 'links primary-links')); ?>
           </div>
         <?php endif; ?>
 
-        <?php if (!empty($secondary_links)): ?>
+
+<?php if (!empty($secondary_links)):
+?>
           <div id="secondary" class="clear-block">
             <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')); ?>
           </div>
         <?php endif; ?>
       </div> <!-- /navigation -->
 
-      <?php if (!empty($left)): ?>
+      <?php if (!empty($left)):
+?>
         <div id="sidebar-left" class="column sidebar">
           <?php print $left; ?>
         </div> <!-- /sidebar-left -->
       <?php endif; ?>
 
       <div id="main" class="column"><div id="main-squeeze">
-        <?php if (!empty($breadcrumb)): ?><div id="breadcrumb"><?php print $breadcrumb; ?></div><?php endif; ?>
-        <?php if (!empty($mission)): ?><div id="mission"><?php print $mission; ?></div><?php endif; ?>
+        <?php if (!empty($breadcrumb)):
+?><div id="breadcrumb"><?php print $breadcrumb; ?></div><?php endif; ?>
+
+<?php if (!empty($mission)):
+?><div id="mission"><?php print $mission; ?></div><?php endif; ?>
 
         <div id="content">
-          <?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
-          <?php if (!empty($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
-          <?php if (!empty($messages)): print $messages; endif; ?>
-          <?php if (!empty($help)): print $help; endif; ?>
+          <?php if (!empty($title)):
+?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+
+<?php if (!empty($tabs)):
+?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
+
+<?php if (!empty($messages)):
+print $messages; endif; ?>
+
+<?php if (!empty($help)):
+print $help; endif; ?>
           <div id="content-content" class="clear-block">
             <?php print $content; ?>
           </div> <!-- /content-content -->
@@ -160,7 +192,8 @@
 
       </div></div> <!-- /main-squeeze /main -->
 
-      <?php if (!empty($right)): ?>
+      <?php if (!empty($right)):
+?>
         <div id="sidebar-right" class="column sidebar">
           <?php print $right; ?>
         </div> <!-- /sidebar-right -->
@@ -171,7 +204,9 @@
     <div id="footer-wrapper">
       <div id="footer">
         <?php print $footer_message; ?>
-        <?php if (!empty($footer)): print $footer; endif; ?>
+
+<?php if (!empty($footer)):
+print $footer; endif; ?>
       </div> <!-- /footer -->
     </div> <!-- /footer-wrapper -->
 
@@ -181,3 +216,4 @@
 
 </body>
 </html>
+
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.58
diff -u -p -r1.58 system.admin.inc
--- modules/system/system.admin.inc	17 Jan 2008 16:08:35 -0000	1.58
+++ modules/system/system.admin.inc	21 Jan 2008 21:58:59 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: system.admin.inc,v 1.58 2008/01/17 16:08:35 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the system module.
@@ -59,7 +60,6 @@ function system_main_admin_page($arg = N
   }
 }
 
-
 /**
  * Provide a single block from the administration menu as a page.
  * This function is often a destination for these blocks.
@@ -98,9 +98,9 @@ function system_admin_compact_page($mode
  */
 function system_admin_by_module() {
 
-  $modules = module_rebuild_cache();
+  $modules    = module_rebuild_cache();
   $menu_items = array();
-  $help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
+  $help_arg   = module_exists('help') ? drupal_help_arg() : FALSE;
 
   foreach ($modules as $file) {
     $module = $file->name;
@@ -192,9 +192,9 @@ function system_themes_form() {
 
   uasort($themes, 'system_sort_modules_by_info_name');
 
-  $status = array();
+  $status            = array();
   $incompatible_core = array();
-  $incompatible_php = array();
+  $incompatible_php  = array();
 
   foreach ($themes as $theme) {
     $screenshot = NULL;
@@ -216,7 +216,7 @@ function system_themes_form() {
     $options[$theme->name] = '';
 
     if (!empty($theme->status) || $theme->name == variable_get('admin_theme', '0')) {
-      $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/'. $theme->name) );
+      $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/'. $theme->name));
     }
     else {
       // Dummy element for drupal_render. Cleaner than adding a check in the theme function.
@@ -286,10 +286,10 @@ function system_themes_form_submit($form
     }
     if (($admin_theme = variable_get('admin_theme', '0')) != '0' && $admin_theme != $form_state['values']['theme_default']) {
       drupal_set_message(t('Please note that the <a href="!admin_theme_page">administration theme</a> is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', array(
-        '!admin_theme_page' => url('admin/settings/admin'),
-        '%admin_theme' => $admin_theme,
-        '%selected_theme' => $form_state['values']['theme_default'],
-      )));
+            '!admin_theme_page' => url('admin/settings/admin'),
+            '%admin_theme' => $admin_theme,
+            '%selected_theme' => $form_state['values']['theme_default'],
+          )));
     }
     variable_set('theme_default', $form_state['values']['theme_default']);
   }
@@ -319,6 +319,7 @@ function system_themes_form_submit($form
  *
  * @param $key
  *   A theme name.
+ *
  * @return
  *   The form structure.
  * @ingroup forms
@@ -331,8 +332,8 @@ function system_theme_settings(&$form_st
   // Default settings are defined in theme_get_settings() in includes/theme.inc
   if ($key) {
     $settings = theme_get_settings($key);
-    $var = str_replace('/', '_', 'theme_'. $key .'_settings');
-    $themes = system_theme_data();
+    $var      = str_replace('/', '_', 'theme_'. $key .'_settings');
+    $themes   = system_theme_data();
     $features = $themes[$key]->info['features'];
   }
   else {
@@ -374,16 +375,16 @@ function system_theme_settings(&$form_st
 
   // Toggle settings
   $toggles = array(
-    'logo'                 => t('Logo'),
-    'name'                 => t('Site name'),
-    'slogan'               => t('Site slogan'),
-    'mission'              => t('Mission statement'),
-    'node_user_picture'    => t('User pictures in posts'),
+    'logo' => t('Logo'),
+    'name' => t('Site name'),
+    'slogan' => t('Site slogan'),
+    'mission' => t('Mission statement'),
+    'node_user_picture' => t('User pictures in posts'),
     'comment_user_picture' => t('User pictures in comments'),
-    'search'               => t('Search box'),
-    'favicon'              => t('Shortcut icon'),
-    'primary_links'        => t('Primary links'),
-    'secondary_links'      => t('Secondary links'),
+    'search' => t('Search box'),
+    'favicon' => t('Shortcut icon'),
+    'primary_links' => t('Primary links'),
+    'secondary_links' => t('Secondary links'),
   );
 
   // Some features are not always available
@@ -453,19 +454,20 @@ function system_theme_settings(&$form_st
       '#title' => t('Use the default logo'),
       '#default_value' => $settings['default_logo'],
       '#tree' => FALSE,
-      '#description' => t('Check here if you want the theme to use the logo supplied with it.')
+      '#description' => t('Check here if you want the theme to use the logo supplied with it.'),
     );
     $form['logo']['logo_path'] = array(
       '#type' => 'textfield',
       '#title' => t('Path to custom logo'),
       '#default_value' => $settings['logo_path'],
-      '#description' => t('The path to the file you would like to use as your logo file instead of the default logo.'));
+      '#description' => t('The path to the file you would like to use as your logo file instead of the default logo.'),
+    );
 
     $form['logo']['logo_upload'] = array(
       '#type' => 'file',
       '#title' => t('Upload logo image'),
       '#maxlength' => 40,
-      '#description' => t("If you don't have direct file access to the server, use this field to upload your logo.")
+      '#description' => t("If you don't have direct file access to the server, use this field to upload your logo."),
     );
   }
 
@@ -473,25 +475,25 @@ function system_theme_settings(&$form_st
     $form['favicon'] = array(
       '#type' => 'fieldset',
       '#title' => t('Shortcut icon settings'),
-      '#description' => t("Your shortcut icon, or 'favicon', is displayed in the address bar and bookmarks of most browsers.")
+      '#description' => t("Your shortcut icon, or 'favicon', is displayed in the address bar and bookmarks of most browsers."),
     );
     $form['favicon']['default_favicon'] = array(
       '#type' => 'checkbox',
       '#title' => t('Use the default shortcut icon.'),
       '#default_value' => $settings['default_favicon'],
-      '#description' => t('Check here if you want the theme to use the default shortcut icon.')
+      '#description' => t('Check here if you want the theme to use the default shortcut icon.'),
     );
     $form['favicon']['favicon_path'] = array(
       '#type' => 'textfield',
       '#title' => t('Path to custom icon'),
       '#default_value' => $settings['favicon_path'],
-      '#description' => t('The path to the image file you would like to use as your custom shortcut icon.')
+      '#description' => t('The path to the image file you would like to use as your custom shortcut icon.'),
     );
 
     $form['favicon']['favicon_upload'] = array(
       '#type' => 'file',
       '#title' => t('Upload icon image'),
-      '#description' => t("If you don't have direct file access to the server, use this field to upload your shortcut icon.")
+      '#description' => t("If you don't have direct file access to the server, use this field to upload your shortcut icon."),
     );
   }
 
@@ -567,6 +569,7 @@ function system_theme_settings_submit($f
  *   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.
  */
@@ -582,7 +585,7 @@ function _system_is_incompatible(&$incom
   }
   // The 'dependencies' key in .info files was a string in Drupal 5, but changed
   // to an array in Drupal 6. If it is not an array, the module is not
-  // compatible and we can skip the check below which requires an array. 
+  // compatible and we can skip the check below which requires an array.
   if (!is_array($file->info['dependencies'])) {
     $file->info['dependencies'] = array();
     $incompatible[$file->name] = TRUE;
@@ -614,6 +617,7 @@ function _system_is_incompatible(&$incom
  * @ingroup forms
  * @see theme_system_modules()
  * @see system_modules_submit()
+ *
  * @return
  *   The form array.
  */
@@ -787,6 +791,7 @@ function system_sort_modules_by_info_nam
  * @param $edit
  *   Not used.
  * @ingroup forms
+ *
  * @return
  *   The form structure.
  */
@@ -842,7 +847,8 @@ function system_modules_confirm_form($mo
       'admin/build/modules',
       t('Would you like to continue with enabling the above?'),
       t('Continue'),
-      t('Cancel'));
+      t('Cancel')
+    );
     return $form;
   }
 }
@@ -949,7 +955,6 @@ function system_modules_submit($form, &$
   return;
 }
 
-
 /**
  * Generate a list of dependencies for modules that are going to be switched on.
  *
@@ -957,6 +962,7 @@ function system_modules_submit($form, &$
  *   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.
  */
@@ -992,8 +998,10 @@ function system_module_build_dependencie
  * @ingroup forms
  * @see system_modules_uninstall_validate()
  * @see system_modules_uninstall_submit()
+ *
  * @param $form_state['values']
  *   Submitted form values.
+ *
  * @return
  *   A form array representing the currently disabled modules.
  */
@@ -1048,8 +1056,10 @@ function system_modules_uninstall($form_
  * Confirm uninstall of selected modules.
  *
  * @ingroup forms
+ *
  * @param $storage
  *   An associative array of modules selected to be uninstalled.
+ *
  * @return
  *   A form array representing modules to confirm.
  */
@@ -1079,7 +1089,8 @@ function system_modules_uninstall_confir
       'admin/build/modules/uninstall',
       t('Would you like to continue with uninstalling the above?'),
       t('Uninstall'),
-      t('Cancel'));
+      t('Cancel')
+    );
     return $form;
   }
 }
@@ -1129,7 +1140,7 @@ function system_site_information_setting
     '#title' => t('Name'),
     '#default_value' => variable_get('site_name', 'Drupal'),
     '#description' => t('The name of this website.'),
-    '#required' => TRUE
+    '#required' => TRUE,
   );
   $form['site_mail'] = array(
     '#type' => 'textfield',
@@ -1142,19 +1153,19 @@ function system_site_information_setting
     '#type' => 'textfield',
     '#title' => t('Slogan'),
     '#default_value' => variable_get('site_slogan', ''),
-    '#description' => t("Your site's motto, tag line, or catchphrase (often displayed alongside the title of the site).")
+    '#description' => t("Your site's motto, tag line, or catchphrase (often displayed alongside the title of the site)."),
   );
   $form['site_mission'] = array(
     '#type' => 'textarea',
     '#title' => t('Mission'),
     '#default_value' => variable_get('site_mission', ''),
-    '#description' => t("Your site's mission or focus statement (often prominently displayed on the front page).")
+    '#description' => t("Your site's mission or focus statement (often prominently displayed on the front page)."),
   );
   $form['site_footer'] = array(
     '#type' => 'textarea',
     '#title' => t('Footer message'),
     '#default_value' => variable_get('site_footer', ''),
-    '#description' => t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.')
+    '#description' => t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.'),
   );
   $form['anonymous'] = array(
     '#type' => 'textfield',
@@ -1211,7 +1222,7 @@ function system_error_reporting_settings
     '#default_value' => variable_get('site_403', ''),
     '#size' => 40,
     '#description' => t('This page is displayed when the requested document is denied to the current user. If unsure, specify nothing.'),
-    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
   );
 
   $form['site_404'] = array(
@@ -1220,13 +1231,13 @@ function system_error_reporting_settings
     '#default_value' => variable_get('site_404', ''),
     '#size' => 40,
     '#description' => t('This page is displayed when no other content matches the requested document. If unsure, specify nothing.'),
-    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
   );
 
   $form['error_level'] = array(
     '#type' => 'select', '#title' => t('Error reporting'), '#default_value' => variable_get('error_level', 1),
     '#options' => array(t('Write errors to the log'), t('Write errors to the log and to the screen')),
-    '#description' => t('Specify where Drupal, PHP and SQL errors are logged. While it is recommended that a site running in a production environment write errors to the log only, in a development or testing environment it may be helpful to write errors both to the log and to the screen.')
+    '#description' => t('Specify where Drupal, PHP and SQL errors are logged. While it is recommended that a site running in a production environment write errors to the log only, in a development or testing environment it may be helpful to write errors both to the log and to the screen.'),
   );
 
   return system_settings_form($form);
@@ -1274,7 +1285,7 @@ function system_performance_settings() {
     '#title' => t('Caching mode'),
     '#default_value' => variable_get('cache', CACHE_DISABLED),
     '#options' => array(CACHE_DISABLED => t('Disabled'), CACHE_NORMAL => t('Normal (recommended for production sites, no side effects)'), CACHE_AGGRESSIVE => t('Aggressive (experts only, possible side effects)')),
-    '#description' => $description
+    '#description' => $description,
   );
 
   $period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), 'format_interval');
@@ -1284,7 +1295,7 @@ function system_performance_settings() {
     '#title' => t('Minimum cache lifetime'),
     '#default_value' => variable_get('cache_lifetime', 0),
     '#options' => $period,
-    '#description' => t('On high-traffic sites, it may be necessary to enforce a minimum cache lifetime. The minimum cache lifetime is the minimum amount of time that will elapse before the cache is emptied and recreated, and is applied to both page and block caches. A larger minimum cache lifetime offers better performance, but users will not see new content for a longer period of time.')
+    '#description' => t('On high-traffic sites, it may be necessary to enforce a minimum cache lifetime. The minimum cache lifetime is the minimum amount of time that will elapse before the cache is emptied and recreated, and is applied to both page and block caches. A larger minimum cache lifetime offers better performance, but users will not see new content for a longer period of time.'),
   );
   $form['page_cache']['page_compression'] = array(
     '#type' => 'radios',
@@ -1312,7 +1323,7 @@ function system_performance_settings() {
   $form['bandwidth_optimizations'] = array(
     '#type' => 'fieldset',
     '#title' => t('Bandwidth optimizations'),
-    '#description' => t('<p>Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.</p><p>These options are disabled if you have not set up your files directory, or if your download method is set to private.</p>')
+    '#description' => t('<p>Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.</p><p>These options are disabled if you have not set up your files directory, or if your download method is set to private.</p>'),
   );
 
   $directory = file_directory_path();
@@ -1393,7 +1404,7 @@ function system_file_system_settings() {
     '#title' => t('Download method'),
     '#default_value' => variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC),
     '#options' => array(FILE_DOWNLOADS_PUBLIC => t('Public - files are available using HTTP directly.'), FILE_DOWNLOADS_PRIVATE => t('Private - files are transferred by Drupal.')),
-    '#description' => t('Choose the <em>Public download</em> method unless you wish to enforce fine-grained access controls over file downloads. Changing the download method will modify all download paths and may cause unexpected problems on an existing site.')
+    '#description' => t('Choose the <em>Public download</em> method unless you wish to enforce fine-grained access controls over file downloads. Changing the download method will modify all download paths and may cause unexpected problems on an existing site.'),
   );
 
   return system_settings_form($form);
@@ -1412,7 +1423,7 @@ function system_image_toolkit_settings()
       '#type' => 'radios',
       '#title' => t('Select an image processing toolkit'),
       '#default_value' => variable_get('image_toolkit', image_get_toolkit()),
-      '#options' => $toolkits_available
+      '#options' => $toolkits_available,
     );
   }
   elseif (count($toolkits_available) == 1) {
@@ -1437,14 +1448,14 @@ function system_rss_feeds_settings() {
     '#title' => t('Number of items in each feed'),
     '#default_value' => variable_get('feed_default_items', 10),
     '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
-    '#description' => t('Default number of items to include in each feed.')
+    '#description' => t('Default number of items to include in each feed.'),
   );
   $form['feed_item_length'] = array(
     '#type' => 'select',
     '#title' => t('Feed content'),
     '#default_value' => variable_get('feed_item_length', 'teaser'),
     '#options' => array('title' => t('Titles only'), 'teaser' => t('Titles plus teaser'), 'fulltext' => t('Full text')),
-    '#description' => t('Global setting for the default display of content items in each feed.')
+    '#description' => t('Global setting for the default display of content items in each feed.'),
   );
 
   return system_settings_form($form);
@@ -1466,15 +1477,18 @@ function system_date_time_settings() {
 
   // Date settings: possible date formats
   $date_short = array('Y-m-d H:i', 'm/d/Y - H:i', 'd/m/Y - H:i', 'Y/m/d - H:i',
-           'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia',
-           'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i',
-           'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia');
+    'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia',
+    'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i',
+    'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia',
+  );
   $date_medium = array('D, Y-m-d H:i', 'D, m/d/Y - H:i', 'D, d/m/Y - H:i',
-          'D, Y/m/d - H:i', 'F j, Y - H:i', 'j F, Y - H:i', 'Y, F j - H:i',
-          'D, m/d/Y - g:ia', 'D, d/m/Y - g:ia', 'D, Y/m/d - g:ia',
-          'F j, Y - g:ia', 'j F Y - g:ia', 'Y, F j - g:ia', 'j. F Y - G:i');
+    'D, Y/m/d - H:i', 'F j, Y - H:i', 'j F, Y - H:i', 'Y, F j - H:i',
+    'D, m/d/Y - g:ia', 'D, d/m/Y - g:ia', 'D, Y/m/d - g:ia',
+    'F j, Y - g:ia', 'j F Y - g:ia', 'Y, F j - g:ia', 'j. F Y - G:i',
+  );
   $date_long = array('l, F j, Y - H:i', 'l, j F, Y - H:i', 'l, Y, F j - H:i',
-        'l, F j, Y - g:ia', 'l, j F Y - g:ia', 'l, Y, F j - g:ia', 'l, j. F Y - G:i');
+    'l, F j, Y - g:ia', 'l, j F Y - g:ia', 'l, Y, F j - g:ia', 'l, j. F Y - G:i',
+  );
 
   // Date settings: construct choices for user
   foreach ($date_short as $f) {
@@ -1499,7 +1513,7 @@ function system_date_time_settings() {
     '#title' => t('Default time zone'),
     '#default_value' => variable_get('date_default_timezone', 0),
     '#options' => $zones,
-    '#description' => t('Select the default site time zone.')
+    '#description' => t('Select the default site time zone.'),
   );
 
   $form['locale']['configurable_timezones'] = array(
@@ -1507,7 +1521,7 @@ function system_date_time_settings() {
     '#title' => t('User-configurable time zones'),
     '#default_value' => variable_get('configurable_timezones', 1),
     '#options' => array(t('Disabled'), t('Enabled')),
-    '#description' => t('When enabled, users can set their own time zone and dates will be displayed accordingly.')
+    '#description' => t('When enabled, users can set their own time zone and dates will be displayed accordingly.'),
   );
 
   $form['locale']['date_first_day'] = array(
@@ -1515,7 +1529,7 @@ function system_date_time_settings() {
     '#title' => t('First day of week'),
     '#default_value' => variable_get('date_first_day', 0),
     '#options' => array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')),
-    '#description' => t('The first day of the week for calendar views.')
+    '#description' => t('The first day of the week for calendar views.'),
   );
 
   $form['date_formats'] = array(
@@ -1578,7 +1592,7 @@ function system_date_time_settings() {
     '#attributes' => array('class' => 'date-format'),
     '#default_value' => (isset($date_long_choices[$date_format_long]) ? $date_format_long : 'custom'),
     '#options' => $date_long_choices,
-    '#description' => t('Longer date format used for detailed display.')
+    '#description' => t('Longer date format used for detailed display.'),
   );
 
   $default_long_custom = variable_get('date_format_long_custom', (isset($date_long_choices[$date_format_long]) ? $date_format_long : ''));
@@ -1643,7 +1657,7 @@ function system_site_maintenance_setting
     '#type' => 'textarea',
     '#title' => t('Site off-line message'),
     '#default_value' => variable_get('site_offline_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))),
-    '#description' => t('Message to show visitors when the site is in off-line mode.')
+    '#description' => t('Message to show visitors when the site is in off-line mode.'),
   );
 
   return system_settings_form($form);
@@ -1735,6 +1749,7 @@ function system_php() {
  *   The actual table data.
  * @param $keys
  *   Data keys and descriptions.
+ *
  * @return
  *   The output HTML.
  */
@@ -1761,33 +1776,33 @@ function system_sql() {
     $data[$entry->Variable_name] = $entry->Value;
   }
 
-  $output  = '<h2>'. t('Command counters') .'</h2>';
+  $output = '<h2>'. t('Command counters') .'</h2>';
   $output .= _system_sql($data, array(
-   'Com_select' => t('The number of <code>SELECT</code>-statements.'),
-   'Com_insert' => t('The number of <code>INSERT</code>-statements.'),
-   'Com_update' => t('The number of <code>UPDATE</code>-statements.'),
-   'Com_delete' => t('The number of <code>DELETE</code>-statements.'),
-   'Com_lock_tables' => t('The number of table locks.'),
-   'Com_unlock_tables' => t('The number of table unlocks.')
-  ));
+      'Com_select' => t('The number of <code>SELECT</code>-statements.'),
+      'Com_insert' => t('The number of <code>INSERT</code>-statements.'),
+      'Com_update' => t('The number of <code>UPDATE</code>-statements.'),
+      'Com_delete' => t('The number of <code>DELETE</code>-statements.'),
+      'Com_lock_tables' => t('The number of table locks.'),
+      'Com_unlock_tables' => t('The number of table unlocks.'),
+    ));
 
   $output .= '<h2>'. t('Query performance') .'</h2>';
   $output .= _system_sql($data, array(
-   'Select_full_join' => t('The number of joins without an index; should be zero.'),
-   'Select_range_check' => t('The number of joins without an index; should be zero.'),
-   'Sort_scan' => t('The number of sorts done without using an index; should be zero.'),
-   'Table_locks_immediate' => t('The number of times a lock could be acquired immediately.'),
-   'Table_locks_waited' => t('The number of times the server had to wait for a lock.')
-  ));
+      'Select_full_join' => t('The number of joins without an index; should be zero.'),
+      'Select_range_check' => t('The number of joins without an index; should be zero.'),
+      'Sort_scan' => t('The number of sorts done without using an index; should be zero.'),
+      'Table_locks_immediate' => t('The number of times a lock could be acquired immediately.'),
+      'Table_locks_waited' => t('The number of times the server had to wait for a lock.'),
+    ));
 
   $output .= '<h2>'. t('Query cache information') .'</h2>';
   $output .= '<p>'. t('The MySQL query cache can improve performance of your site by storing the result of queries. Then, if an identical query is received later, the MySQL server retrieves the result from the query cache rather than parsing and executing the statement again.') .'</p>';
   $output .= _system_sql($data, array(
-   'Qcache_queries_in_cache' => t('The number of queries in the query cache.'),
-   'Qcache_hits' => t('The number of times MySQL found previous results in the cache.'),
-   'Qcache_inserts' => t('The number of times MySQL added a query to the cache (misses).'),
-   'Qcache_lowmem_prunes' => t('The number of times MySQL had to remove queries from the cache because it ran out of memory. Ideally should be zero.')
-  ));
+      'Qcache_queries_in_cache' => t('The number of queries in the query cache.'),
+      'Qcache_hits' => t('The number of times MySQL found previous results in the cache.'),
+      'Qcache_inserts' => t('The number of times MySQL added a query to the cache (misses).'),
+      'Qcache_lowmem_prunes' => t('The number of times MySQL had to remove queries from the cache because it ran out of memory. Ideally should be zero.'),
+    ));
 
   return $output;
 }
@@ -1927,11 +1942,11 @@ function theme_admin_page($blocks) {
  * @ingroup themeable
  */
 function theme_system_admin_by_module($menu_items) {
-  $stripe = 0;
-  $output = '';
+  $stripe    = 0;
+  $output    = '';
   $container = array('left' => '', 'right' => '');
-  $flip = array('left' => 'right', 'right' => 'left');
-  $position = 'left';
+  $flip      = array('left' => 'right', 'right' => 'left');
+  $position  = 'left';
 
   // Iterate over all modules
   foreach ($menu_items as $module => $block) {
@@ -2072,8 +2087,8 @@ function theme_system_modules($form) {
         $row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
       }
 
-      $row[] = drupal_render($form['version'][$key]);
-      $row[] = array('data' => $description, 'class' => 'description');
+      $row[]  = drupal_render($form['version'][$key]);
+      $row[]  = array('data' => $description, 'class' => 'description');
       $rows[] = $row;
     }
     $fieldset = array(
@@ -2093,8 +2108,10 @@ function theme_system_modules($form) {
  * Themes a table of currently disabled modules.
  *
  * @ingroup themeable
+ *
  * @param $form
  *   The form array representing the currently disabled modules.
+ *
  * @return
  *   An HTML string representing the table.
  */
@@ -2125,7 +2142,7 @@ function theme_system_modules_uninstall(
     $rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => 'message'));
   }
 
-  $output  = theme('table', $header, $rows);
+  $output = theme('table', $header, $rows);
   $output .= drupal_render($form);
 
   return $output;
@@ -2133,6 +2150,7 @@ function theme_system_modules_uninstall(
 
 /**
  * Theme the theme select form.
+ *
  * @param $form
  *   An associative array containing the structure of the form.
  * @ingroup themeable
@@ -2194,7 +2212,7 @@ function theme_system_themes_form($form)
     $theme = '<div class="theme-info"><h2>'. $info['name'] .'</h2><div class="description">'. $description .'</div></div>';
 
     // Build rows
-    $row = array();
+    $row   = array();
     $row[] = drupal_render($form[$key]['screenshot']);
     $row[] = $theme;
     $row[] = isset($info['version']) ? $info['version'] : '';
@@ -2211,3 +2229,4 @@ function theme_system_themes_form($form)
   $output .= drupal_render($form);
   return $output;
 }
+
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.234
diff -u -p -r1.234 system.install
--- modules/system/system.install	21 Jan 2008 20:04:35 -0000	1.234
+++ modules/system/system.install	21 Jan 2008 21:59:00 -0000
@@ -1,11 +1,13 @@
 <?php
 // $Id: system.install,v 1.234 2008/01/21 20:04:35 goba Exp $
 
+
 /**
  * Test and report Drupal installation requirements.
  *
  * @param $phase
  *   The current system installation phase.
+ *
  * @return
  *   An array of system requirements.
  */
@@ -68,7 +70,7 @@ function system_requirements($phase) {
     'title' => $t('PHP register globals'),
   );
   $register_globals = trim(ini_get('register_globals'));
-  // Unfortunately, ini_get() may return many different values, and we can't 
+  // Unfortunately, ini_get() may return many different values, and we can't
   // be certain which values mean 'on', so we instead check for 'not off'
   // since we never want to tell the user that their site is secure
   // (register_globals off), when it is in fact on. We can only guarantee
@@ -123,7 +125,7 @@ function system_requirements($phase) {
   // Test settings.php file writability
   if ($phase == 'runtime') {
     $conf_dir = drupal_verify_install_file(conf_path(), FILE_NOT_WRITABLE, 'dir');
-    $conf_file = drupal_verify_install_file(conf_path() .'/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE);
+    $conf_file = drupal_verify_install_file(conf_path() .'/settings.php', FILE_EXIST | FILE_READABLE | FILE_NOT_WRITABLE);
     if (!$conf_dir || !$conf_file) {
       $requirements['settings.php'] = array(
         'value' => $t('Not protected'),
@@ -208,7 +210,8 @@ function system_requirements($phase) {
 
   // For installer, create the directory if possible.
   if ($phase == 'install' && !is_dir($directory) && @mkdir($directory)) {
-    @chmod($directory, 0775); // Necessary for non-webserver users.
+    // Necessary for non-webserver users.
+    @chmod($directory, 0775);
   }
 
   $is_writable = is_writable($directory);
@@ -443,15 +446,17 @@ function system_schema() {
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'value' => array(
         'description' => t('The value of the variable.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'big'),
+        'size' => 'big',
       ),
+    ),
     'primary key' => array('name'),
-    );
+  );
 
   $schema['actions'] = array(
     'description' => t('Stores action information.'),
@@ -461,33 +466,38 @@ function system_schema() {
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => '0'),
+        'default' => '0',
+      ),
       'type' => array(
         'description' => t('The object that that action acts on (node, user, comment, system or custom types.)'),
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'callback' => array(
         'description' => t('The callback function that executes when the action runs.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'parameters' => array(
         'description' => t('Parameters to be passed to the callback function.'),
         'type' => 'text',
         'not null' => TRUE,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'description' => array(
         'description' => t('Description of the action.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => '0'),
+        'default' => '0',
       ),
+    ),
     'primary key' => array('aid'),
-    );
+  );
 
   $schema['actions_aid'] = array(
     'description' => t('Stores action IDs for non-default actions.'),
@@ -496,10 +506,11 @@ function system_schema() {
         'description' => t('Primary Key: Unique actions ID.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
       ),
+    ),
     'primary key' => array('aid'),
-    );
+  );
 
   $schema['batch'] = array(
     'description' => t('Stores details about batches (processes that run in multiple HTTP requests).'),
@@ -508,25 +519,29 @@ function system_schema() {
         'description' => t('Primary Key: Unique batch ID.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'token' => array(
         'description' => t("A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it."),
         'type' => 'varchar',
         'length' => 64,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'timestamp' => array(
         'description' => t('A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.'),
         'type' => 'int',
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'batch' => array(
         'description' => t('A serialized array containing the processing data for the batch.'),
         'type' => 'text',
         'not null' => FALSE,
-        'size' => 'big')
+        'size' => 'big',
       ),
+    ),
     'primary key' => array('bid'),
     'indexes' => array('token' => array('token')),
-    );
+  );
 
   $schema['cache'] = array(
     'description' => t('Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.'),
@@ -536,36 +551,42 @@ function system_schema() {
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'data' => array(
         'description' => t('A collection of data to cache.'),
         'type' => 'blob',
         'not null' => FALSE,
-        'size' => 'big'),
+        'size' => 'big',
+      ),
       'expire' => array(
         'description' => t('A Unix timestamp indicating when the cache entry should expire, or 0 for never.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'created' => array(
         'description' => t('A Unix timestamp indicating when the cache entry was created.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'headers' => array(
         'description' => t('Any custom HTTP headers to be added to cached data.'),
         'type' => 'text',
-        'not null' => FALSE),
+        'not null' => FALSE,
+      ),
       'serialized' => array(
         'description' => t('A flag to indicate whether content is serialized (1) or not (0).'),
         'type' => 'int',
         'size' => 'small',
         'not null' => TRUE,
-        'default' => 0)
+        'default' => 0,
       ),
+    ),
     'indexes' => array('expire' => array('expire')),
     'primary key' => array('cid'),
-    );
+  );
 
   $schema['cache_form'] = $schema['cache'];
   $schema['cache_form']['description'] = t('Cache table for the form system to store recently built forms and their storage data, to be used in subsequent page requests.');
@@ -581,56 +602,64 @@ function system_schema() {
         'description' => t('Primary Key: Unique files ID.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'uid' => array(
         'description' => t('The {users}.uid of the user who is associated with the file.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'filename' => array(
         'description' => t('Name of the file.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'filepath' => array(
         'description' => t('Path of the file relative to Drupal root.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'filemime' => array(
         'description' => t('The file MIME type.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'filesize' => array(
         'description' => t('The size of the file in bytes.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'status' => array(
         'description' => t('A flag indicating whether file is temporary (1) or permanent (0).'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'timestamp' => array(
         'description' => t('UNIX timestamp for when the file was added.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
       ),
+    ),
     'indexes' => array(
       'uid' => array('uid'),
       'status' => array('status'),
       'timestamp' => array('timestamp'),
-      ),
+    ),
     'primary key' => array('fid'),
-    );
+  );
 
   $schema['flood'] = array(
     'description' => t('Flood controls the threshold of events, such as the number of contact attempts.'),
@@ -638,30 +667,34 @@ function system_schema() {
       'fid' => array(
         'description' => t('Unique flood event ID.'),
         'type' => 'serial',
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'event' => array(
         'description' => t('Name of event (e.g. contact).'),
         'type' => 'varchar',
         'length' => 64,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'hostname' => array(
         'description' => t('Hostname of the visitor.'),
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'timestamp' => array(
         'description' => t('Timestamp of the event.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0)
+        'default' => 0,
       ),
+    ),
     'primary key' => array('fid'),
     'indexes' => array(
       'allow' => array('event', 'hostname', 'timestamp'),
     ),
-    );
+  );
 
   $schema['history'] = array(
     'description' => t('A record of which {users} have read which {node}s.'),
@@ -670,23 +703,26 @@ function system_schema() {
         'description' => t('The {users}.uid that read the {node} nid.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'nid' => array(
         'description' => t('The {node}.nid that was read.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'timestamp' => array(
         'description' => t('The Unix timestamp at which the read occurred.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0)
+        'default' => 0,
       ),
+    ),
     'primary key' => array('uid', 'nid'),
     'indexes' => array(
       'nid' => array('nid'),
     ),
-    );
+  );
   $schema['menu_router'] = array(
     'description' => t('Maps paths to various callbacks (access, page and title)'),
     'fields' => array(
@@ -695,278 +731,325 @@ function system_schema() {
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'load_functions' => array(
         'description' => t('A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'to_arg_functions' => array(
         'description' => t('A serialized array of function names (like user_current_to_arg) to be called to replace a part of the router path with another string.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'access_callback' => array(
         'description' => t('The callback which determines the access to this router path. Defaults to user_access.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'access_arguments' => array(
         'description' => t('A serialized array of arguments for the access callback.'),
         'type' => 'text',
-        'not null' => FALSE),
+        'not null' => FALSE,
+      ),
       'page_callback' => array(
         'description' => t('The name of the function that renders the page.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'page_arguments' => array(
         'description' => t('A serialized array of arguments for the page callback.'),
         'type' => 'text',
-        'not null' => FALSE),
+        'not null' => FALSE,
+      ),
       'fit' => array(
         'description' => t('A numeric representation of how specific the path is.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'number_parts' => array(
         'description' => t('Number of parts in this router path.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'tab_parent' => array(
         'description' => t('Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'tab_root' => array(
         'description' => t('Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'title' => array(
         'description' => t('The title for the current page, or the title for the tab if this is a local task.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'title_callback' => array(
         'description' => t('A function which will alter the title. Defaults to t()'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'title_arguments' => array(
         'description' => t('A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'type' => array(
         'description' => t('Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'block_callback' => array(
         'description' => t('Name of a function used to render the block on the system administration page for this item.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'description' => array(
         'description' => t('A description of this item.'),
         'type' => 'text',
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'position' => array(
         'description' => t('The position of the block (left or right) on the system administration page for this item.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'weight' => array(
         'description' => t('Weight of the element. Lighter weights are higher up, heavier weights go down.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'file' => array(
         'description' => t('The file to include for this element, usually the page callback function lives in this file.'),
         'type' => 'text',
-        'size' => 'medium')
+        'size' => 'medium',
       ),
+    ),
     'indexes' => array(
       'fit' => array('fit'),
-      'tab_parent' => array('tab_parent')
-      ),
+      'tab_parent' => array('tab_parent'),
+    ),
     'primary key' => array('path'),
-    );
+  );
 
   $schema['menu_links'] = array(
     'description' => t('Contains the individual links within a menu.'),
     'fields' => array(
-     'menu_name' => array(
+      'menu_name' => array(
         'description' => t("The menu name. All links with the same menu name (such as 'navigation') are part of the same menu."),
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'mlid' => array(
         'description' => t('The menu link ID (mlid) is the integer primary key.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'plid' => array(
         'description' => t('The parent link ID (plid) is the mlid of the link above in the hierarchy, or zero if the link is at the top level in its menu.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'link_path' => array(
         'description' => t('The Drupal path or external path this link points to.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'router_path' => array(
         'description' => t('For links corresponding to a Drupal path (external = 0), this connects the link to a {menu_router}.path for joins.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'link_title' => array(
-      'description' => t('The text displayed for the link, which may be modified by a title callback stored in {menu_router}.'),
+        'description' => t('The text displayed for the link, which may be modified by a title callback stored in {menu_router}.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'options' => array(
         'description' => t('A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.'),
         'type' => 'text',
-        'not null' => FALSE),
+        'not null' => FALSE,
+      ),
       'module' => array(
         'description' => t('The name of the module that generated this link.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => 'system'),
+        'default' => 'system',
+      ),
       'hidden' => array(
         'description' => t('A flag for whether the link should be rendered in menus. (1 = a disabled menu item that may be shown on admin screens, -1 = a menu callback, 0 = a normal, visible link)'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'external' => array(
         'description' => t('A flag to indicate if the link points to a full URL starting with a protocol, like http:// (1 = external, 0 = internal).'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'has_children' => array(
         'description' => t('Flag indicating whether any links have this link as a parent (1 = children exist, 0 = no children).'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'expanded' => array(
         'description' => t('Flag for whether this link should be rendered as expanded in menus - expanded links always have their child links displayed, instead of only when the link is in the active trail (1 = expanded, 0 = not expanded)'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'weight' => array(
         'description' => t('Link weight among links in the same menu at the same depth.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'depth' => array(
         'description' => t('The depth relative to the top level. A link with plid == 0 will have depth == 1.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'customized' => array(
         'description' => t('A flag to indicate that the user has manually created or edited the link (1 = customized, 0 = not customized).'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'p1' => array(
         'description' => t('The first mlid in the materialized path. If N = depth, then pN must equal the mlid. If depth > 1 then p(N-1) must equal the plid. All pX where X > depth must equal zero. The columns p1 .. p9 are also called the parents.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p2' => array(
         'description' => t('The second mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p3' => array(
         'description' => t('The third mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p4' => array(
         'description' => t('The fourth mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p5' => array(
         'description' => t('The fifth mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p6' => array(
         'description' => t('The sixth mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p7' => array(
         'description' => t('The seventh mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p8' => array(
         'description' => t('The eighth mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'p9' => array(
         'description' => t('The ninth mlid in the materialized path. See p1.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'updated' => array(
         'description' => t('Flag that indicates that this link was generated during the update from Drupal 5.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'small'),
+        'size' => 'small',
       ),
+    ),
     'indexes' => array(
       'path_menu' => array(array('link_path', 128), 'menu_name'),
       'menu_plid_expand_child' => array(
-        'menu_name', 'plid', 'expanded', 'has_children'),
+        'menu_name', 'plid', 'expanded', 'has_children',
+      ),
       'menu_parents' => array(
-        'menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9'),
-      'router_path' => array(array('router_path', 128)),
+        'menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9',
       ),
+      'router_path' => array(array('router_path', 128)),
+    ),
     'primary key' => array('mlid'),
-    );
+  );
 
   $schema['sessions'] = array(
     'description' => t("Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated."),
@@ -975,41 +1058,47 @@ function system_schema() {
         'description' => t('The {users}.uid corresponding to a session, or 0 for anonymous user.'),
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'sid' => array(
         'description' => t("Primary key: A session ID. The value is generated by PHP's Session API."),
         'type' => 'varchar',
         'length' => 64,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'hostname' => array(
         'description' => t('The IP address that last used this session ID (sid).'),
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'timestamp' => array(
         'description' => t('The Unix timestamp when this session last requested a page. Old records are purged by PHP automatically.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'cache' => array(
         'description' => t("The time of this user's last post. This is used when the site has specified a minimum_cache_lifetime. See cache_get()."),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'session' => array(
         'description' => t('The serialized contents of $_SESSION, an array of name/value pairs that persists across page requests by this session ID. Drupal loads $_SESSION from here at the start of each request and saves it at the end.'),
         'type' => 'text',
         'not null' => FALSE,
-        'size' => 'big')
+        'size' => 'big',
       ),
+    ),
     'primary key' => array('sid'),
     'indexes' => array(
       'timestamp' => array('timestamp'),
-      'uid' => array('uid')
-      ),
-    );
+      'uid' => array('uid'),
+    ),
+  );
 
   $schema['system'] = array(
     'description' => t("A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system."),
@@ -1019,64 +1108,74 @@ function system_schema() {
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'name' => array(
         'description' => t('The name of the item; e.g. node.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'type' => array(
         'description' => t('The type of the item, either module, theme, or theme_engine.'),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'owner' => array(
         'description' => t("A theme's 'parent'. Can be either a theme or an engine."),
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'status' => array(
         'description' => t('Boolean indicating whether or not this item is enabled.'),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'throttle' => array(
         'description' => t('Boolean indicating whether this item is disabled when the throttle.module disables throttleable items.'),
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'),
+        'size' => 'tiny',
+      ),
       'bootstrap' => array(
         'description' => t("Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted)."),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'schema_version' => array(
         'description' => t("The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed."),
         'type' => 'int',
         'not null' => TRUE,
         'default' => -1,
-        'size' => 'small'),
+        'size' => 'small',
+      ),
       'weight' => array(
         'description' => t("The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name."),
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 0),
+        'default' => 0,
+      ),
       'info' => array(
         'description' => t("A serialized array containing information from the module's .info file; keys can include name, description, package, version, core, dependencies, dependents, and php."),
         'type' => 'text',
-        'not null' => FALSE)
+        'not null' => FALSE,
       ),
+    ),
     'primary key' => array('filename'),
     'indexes' =>
-      array(
-        'modules' => array(array('type', 12), 'status', 'weight', 'filename'),
-        'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'),
-      ),
-    );
+    array(
+      'modules' => array(array('type', 12), 'status', 'weight', 'filename'),
+      'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'),
+    ),
+  );
 
   $schema['url_alias'] = array(
     'description' => t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'),
@@ -1085,36 +1184,39 @@ function system_schema() {
         'description' => t('A unique path alias identifier.'),
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE),
+        'not null' => TRUE,
+      ),
       'src' => array(
         'description' => t('The Drupal path this alias is for; e.g. node/12.'),
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'dst' => array(
         'description' => t('The alias for this path; e.g. title-of-the-story.'),
         'type' => 'varchar',
         'length' => 128,
         'not null' => TRUE,
-        'default' => ''),
+        'default' => '',
+      ),
       'language' => array(
         'description' => t('The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.'),
         'type' => 'varchar',
         'length' => 12,
         'not null' => TRUE,
-        'default' => '')
+        'default' => '',
       ),
+    ),
     'unique keys' => array('dst_language' => array('dst', 'language')),
     'primary key' => array('pid'),
     'indexes' => array('src' => array('src')),
-    );
+  );
 
   return $schema;
 }
 
 // Updates for core.
-
 function system_update_last_removed() {
   return 1021;
 }
@@ -1153,7 +1255,7 @@ function system_update_6000() {
   switch ($GLOBALS['db_type']) {
     case 'mysql':
     case 'mysqli':
-      $max = (int)db_result(db_query('SELECT MAX(bid) FROM {boxes}'));
+      $max   = (int)db_result(db_query('SELECT MAX(bid) FROM {boxes}'));
       $ret[] = update_sql('ALTER TABLE {boxes} CHANGE COLUMN bid bid int NOT NULL');
       $ret[] = update_sql("REPLACE INTO {sequences} VALUES ('{boxes}_bid', $max)");
       break;
@@ -1237,19 +1339,20 @@ function system_update_6005() {
       $err = error_reporting(0);
       $ret1 = update_sql('DROP INDEX {url_alias}_dst_idx');
       if ($ret1['success']) {
-  $ret[] = $ret1;
+        $ret[] = $ret1;
       }
       $ret1 = array();
       db_drop_unique_key($ret, 'url_alias', 'dst');
       foreach ($ret1 as $r) {
-  if ($r['success']) {
-    $ret[] = $r;
-  }
+        if ($r['success']) {
+          $ret[] = $r;
+        }
       }
       error_reporting($err);
 
       $ret[] = update_sql('CREATE UNIQUE INDEX {url_alias}_dst_language_idx ON {url_alias}(dst, language)');
       break;
+
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {url_alias} ADD language varchar(12) NOT NULL default ''");
@@ -1271,6 +1374,7 @@ function system_update_6006() {
       $ret[] = update_sql('DROP INDEX {node_counter}_totalcount_idx');
       $ret[] = update_sql('DROP INDEX {node_counter}_timestamp_idx');
       break;
+
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX daycount");
@@ -1285,7 +1389,7 @@ function system_update_6006() {
  * Change the severity column in the watchdog table to the new values.
  */
 function system_update_6007() {
-  $ret = array();
+  $ret   = array();
   $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_NOTICE ." WHERE severity = 0");
   $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_WARNING ." WHERE severity = 1");
   $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_ERROR ." WHERE severity = 2");
@@ -1355,6 +1459,7 @@ function system_update_6011() {
     case 'pgsql':
       db_add_column($ret, 'node', 'language', 'varchar(12)', array('default' => "''", 'not null' => TRUE));
       break;
+
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {node} ADD language varchar(12) NOT NULL default ''");
@@ -1411,6 +1516,7 @@ function system_update_6015() {
     )");
       $ret[] = update_sql("CREATE INDEX {cache_form}_expire_idx ON {cache_form} (expire)");
       break;
+
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql("CREATE TABLE {cache_form} (
@@ -1452,6 +1558,7 @@ function system_update_6016() {
       db_add_column($ret, 'term_synonym', 'tsid', 'serial');
       $ret[] = update_sql("ALTER TABLE {term_synonym} ADD PRIMARY KEY (tsid)");
       break;
+
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql('ALTER TABLE {node} ADD UNIQUE KEY nid_vid (nid, vid)');
@@ -1474,10 +1581,10 @@ function system_update_6017() {
   $ret = array();
   // Maps old names to new ones.
   $var_names = array(
-    'admin'    => 'register_admin_created',
+    'admin' => 'register_admin_created',
     'approval' => 'register_pending_approval',
-    'welcome'  => 'register_no_approval_required',
-    'pass'     => 'password_reset',
+    'welcome' => 'register_no_approval_required',
+    'pass' => 'password_reset',
   );
   foreach ($var_names as $old => $new) {
     foreach (array('_subject', '_body') as $suffix) {
@@ -1573,7 +1680,8 @@ function system_update_6019() {
       if (db_table_exists('url_alias')) {
         db_drop_index($ret, 'url_alias', 'dst_language');
         db_add_unique_key($ret, 'url_alias', 'dst_language',
-          array('dst', 'language'));
+          array('dst', 'language')
+        );
       }
 
       // Fix term_node pkey: mysql and pgsql code had different orders.
@@ -1589,7 +1697,6 @@ function system_update_6019() {
       // Fix primary key
       db_drop_primary_key($ret, 'node');
       db_add_primary_key($ret, 'node', array('nid'));
-
       break;
 
     case 'mysql':
@@ -1634,7 +1741,6 @@ function system_update_6019() {
         db_drop_primary_key($ret, $table);
         db_change_field($ret, $table, $field, $field, array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array($field)));
       }
-
       break;
   }
 
@@ -1649,67 +1755,67 @@ function system_update_6020() {
 
   $schema['menu_router'] = array(
     'fields' => array(
-      'path'             => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'load_functions'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'load_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'to_arg_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'access_callback'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'access_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'access_arguments' => array('type' => 'text', 'not null' => FALSE),
-      'page_callback'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'page_arguments'   => array('type' => 'text', 'not null' => FALSE),
-      'fit'              => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'number_parts'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'tab_parent'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'tab_root'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title'            => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title_arguments'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type'             => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'block_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description'      => array('type' => 'text', 'not null' => TRUE),
-      'position'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'weight'           => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'file'             => array('type' => 'text', 'size' => 'medium')
+      'page_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'page_arguments' => array('type' => 'text', 'not null' => FALSE),
+      'fit' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'number_parts' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'tab_parent' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'tab_root' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title_arguments' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'type' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'block_callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => TRUE),
+      'position' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'file' => array('type' => 'text', 'size' => 'medium'),
     ),
     'indexes' => array(
-      'fit'        => array('fit'),
-      'tab_parent' => array('tab_parent')
+      'fit' => array('fit'),
+      'tab_parent' => array('tab_parent'),
     ),
     'primary key' => array('path'),
   );
 
   $schema['menu_links'] = array(
     'fields' => array(
-      'menu_name'    => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'mlid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'plid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'link_path'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'router_path'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'link_title'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'options'      => array('type' => 'text', 'not null' => FALSE),
-      'module'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'),
-      'hidden'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'external'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'menu_name' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'mlid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'plid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'link_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'router_path' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'link_title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'options' => array('type' => 'text', 'not null' => FALSE),
+      'module' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'),
+      'hidden' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'external' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
       'has_children' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'expanded'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'weight'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'depth'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'customized'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'p1'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p2'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p3'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p4'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p5'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p6'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p7'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p8'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p9'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'updated'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'expanded' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'depth' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'customized' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'p1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p3' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p4' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p5' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p6' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p7' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p8' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p9' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'updated' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
     ),
     'indexes' => array(
-      'path_menu'              => array(array('link_path', 128), 'menu_name'),
+      'path_menu' => array(array('link_path', 128), 'menu_name'),
       'menu_plid_expand_child' => array('menu_name', 'plid', 'expanded', 'has_children'),
-      'menu_parents'           => array('menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9'),
-      'router_path'            => array(array('router_path', 128)),
+      'menu_parents' => array('menu_name', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9'),
+      'router_path' => array(array('router_path', 128)),
     ),
     'primary key' => array('mlid'),
   );
@@ -1745,8 +1851,8 @@ function system_update_6021() {
     }
     $table = array(
       'fields' => array(
-        'menu_name'   => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-        'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'menu_name' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+        'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
         'description' => array('type' => 'text', 'not null' => FALSE),
       ),
       'primary key' => array('menu_name'),
@@ -1772,7 +1878,7 @@ function system_update_6021() {
     // Save user-defined titles.
     foreach (array($primary, $secondary) as $mid) {
       if ($item = db_fetch_array(db_query('SELECT * FROM {menu} WHERE mid = %d', $mid))) {
-        $menus[$_SESSION['menu_menu_map'][$mid]]['title']  = $item['title'];
+        $menus[$_SESSION['menu_menu_map'][$mid]]['title'] = $item['title'];
       }
     }
     foreach ($menus as $menu) {
@@ -1824,24 +1930,24 @@ function system_update_6021() {
       }
       // Items created via the menu module need to be assigned to it.
       if ($item['type'] & MENU_CREATED_BY_ADMIN) {
-        $item['module'] = 'menu';
+        $item['module']      = 'menu';
         $item['router_path'] = '';
-        $item['updated'] = TRUE;
+        $item['updated']     = TRUE;
       }
       else {
-        $item['module'] = 'system';
+        $item['module']      = 'system';
         $item['router_path'] = $item['path'];
-        $item['updated'] = FALSE;
+        $item['updated']     = FALSE;
       }
       // Save the link.
       menu_link_save($item);
       $_SESSION['menu_item_map'][$item['mid']] = array('mlid' => $item['mlid'], 'menu_name' => $item['menu_name']);
     }
     elseif (!isset($_SESSION['menu_menu_map'][$item['mid']])) {
-      $item['menu_name'] = 'menu-'. preg_replace('/[^a-zA-Z0-9]/', '-', strtolower($item['title']));
-      $item['menu_name'] = substr($item['menu_name'], 0, 20);
+      $item['menu_name']  = 'menu-'. preg_replace('/[^a-zA-Z0-9]/', '-', strtolower($item['title']));
+      $item['menu_name']  = substr($item['menu_name'], 0, 20);
       $original_menu_name = $item['menu_name'];
-      $i = 0;
+      $i                  = 0;
       while (db_result(db_query("SELECT menu_name FROM {menu_custom} WHERE menu_name = '%s'", $item['menu_name']))) {
         $item['menu_name'] = $original_menu_name . ($i++);
       }
@@ -2176,10 +2282,10 @@ function system_update_6036() {
     // Create the search_node_links Table.
     $search_node_links_schema = array(
       'fields' => array(
-        'sid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-        'type'     => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
-        'nid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-        'caption'    => array('type' => 'text', 'size' => 'big', 'not null' => FALSE),
+        'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+        'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
+        'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+        'caption' => array('type' => 'text', 'size' => 'big', 'not null' => FALSE),
       ),
       'primary key' => array('sid', 'type', 'nid'),
       'indexes' => array('nid' => array('nid')),
@@ -2279,10 +2385,10 @@ function system_update_6040() {
  */
 function system_update_6041() {
   $weight = intval((db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'"))) + 1);
-  $ret = array();
-  $vid = intval(variable_get('forum_nav_vocabulary', ''));
+  $ret    = array();
+  $vid    = intval(variable_get('forum_nav_vocabulary', ''));
   if (db_table_exists('vocabulary') && $vid) {
-    $ret[] = update_sql("UPDATE {vocabulary} SET required = 0 WHERE vid = " . $vid);
+    $ret[] = update_sql("UPDATE {vocabulary} SET required = 0 WHERE vid = ". $vid);
     $ret[] = update_sql("UPDATE {system} SET weight = ". $weight ." WHERE name = 'forum'");
   }
   return $ret;
@@ -2313,9 +2419,12 @@ function system_update_6043() {
   db_add_index($ret, 'history', 'nid', array('nid'));
   // Change length of theme field in {blocks} to be consistent with module, and
   // to avoid a MySQL error regarding a too-long index.  Also add new indices.
-  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
-                  'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
-                  'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
+  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), array(
+      'unique keys' => array('tmd' => array('theme', 'module', 'delta'),
+      ),
+      'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),
+      ),
+    ));
   db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
   // Improve filter module indices.
   db_drop_index($ret, 'filters', 'weight');
@@ -2357,8 +2466,11 @@ function system_update_6043() {
   if (db_table_exists('profile_values')) {
     db_drop_index($ret, 'profile_values', 'uid');
     db_drop_index($ret, 'profile_values', 'fid');
-    db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
-    db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
+    db_change_field($ret, 'profile_values', 'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,
+      ), array('indexes' => array('fid' => array('fid'),
+        )));
+    db_change_field($ret, 'profile_values', 'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,
+      ));
     db_add_primary_key($ret, 'profile_values', array('uid', 'fid'));
   }
   // Alter a statistics module table to add an index.
@@ -2483,3 +2595,4 @@ function system_update_6046() {
  * @} End of "defgroup updates-5.x-to-6.x"
  * The next series of updates should start at 7000.
  */
+
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.578
diff -u -p -r1.578 system.module
--- modules/system/system.module	10 Jan 2008 23:14:58 -0000	1.578
+++ modules/system/system.module	21 Jan 2008 21:59:01 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: system.module,v 1.578 2008/01/10 23:14:58 goba Exp $
 
+
 /**
  * @file
  * Configuration system that lets administrators modify the workings of the site.
@@ -19,22 +20,22 @@ define('DRUPAL_CORE_COMPATIBILITY', '6.x
 /**
  * Minimum supported version of PHP.
  */
-define('DRUPAL_MINIMUM_PHP',    '4.3.5');
+define('DRUPAL_MINIMUM_PHP', '4.3.5');
 
 /**
  * Minimum recommended value of PHP memory_limit.
  */
-define('DRUPAL_MINIMUM_PHP_MEMORY_LIMIT',    '16M');
+define('DRUPAL_MINIMUM_PHP_MEMORY_LIMIT', '16M');
 
 /**
  * Minimum supported version of MySQL, if it is used.
  */
-define('DRUPAL_MINIMUM_MYSQL',  '4.1.0');
+define('DRUPAL_MINIMUM_MYSQL', '4.1.0');
 
 /**
  * Minimum supported version of PostgreSQL, if it is used.
  */
-define('DRUPAL_MINIMUM_PGSQL',  '7.4');
+define('DRUPAL_MINIMUM_PGSQL', '7.4');
 
 /**
  * Minimum supported version of Apache, if it is used.
@@ -63,20 +64,26 @@ function system_help($path, $arg) {
       $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'</p>';
       return $output;
+
     case 'admin':
       return '<p>'. t('Welcome to the administration section. Here you may control how your site functions.') .'</p>';
+
     case 'admin/by-module':
       return '<p>'. t('This page shows you all available administration tasks for each module.') .'</p>';
+
     case 'admin/build/themes':
       $output = '<p>'. t('Select which themes are available to your users and specify the default theme. To configure site-wide display settings, click the "configure" task above. Alternatively, to override these settings in a specific theme, click the "configure" link for that theme. Note that different themes may have different regions available for displaying content; for consistency in presentation, you may wish to enable only one theme.') .'</p>';
       $output .= '<p>'. t('To change the appearance of your site, a number of <a href="@themes">contributed themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) .'</p>';
       return $output;
+
     case 'admin/build/themes/settings/'. $arg[4]:
       $reference = explode('.', $arg[4], 2);
       $theme = array_pop($reference);
       return '<p>'. t('These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="@global">global settings</a> for this theme.', array('%template' => $theme, '@global' => url('admin/build/themes/settings'))) .'</p>';
+
     case 'admin/build/themes/settings':
       return '<p>'. t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') .'</p>';
+
     case 'admin/build/modules':
       $output = '<p>'. t('Modules are plugins that extend Drupal\'s core functionality. Enable modules by selecting the <em>Enabled</em> checkboxes below and clicking the <em>Save configuration</em> button. Once a module is enabled, new <a href="@permissions">permissions</a> may be available. To reduce server load, modules with their <em>Throttle</em> checkbox selected are temporarily disabled when your site becomes extremely busy. (Note that the <em>Throttle</em> checkbox is only available if the Throttle module is enabled.)', array('@permissions' => url('admin/user/permissions')));
       if (module_exists('throttle')) {
@@ -87,13 +94,16 @@ function system_help($path, $arg) {
       $output .= '<p>'. t('You can find all administration tasks belonging to a particular module on the <a href="@by-module">administration by module page</a>.', array('@by-module' => url('admin/by-module'))) .'</p>';
       $output .= '<p>'. t('To extend the functionality of your site, a number of <a href="@modules">contributed modules</a> are available.', array('@modules' => 'http://drupal.org/project/modules')) .'</p>';
       return $output;
+
     case 'admin/build/modules/uninstall':
       return '<p>'. t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it. Not all modules support this feature.') .'</p>';
+
     case 'admin/build/block/configure':
       if ($arg[4] == 'system' && $arg[5] == 0) {
         return '<p>'. t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') .'</p>';
       }
       break;
+
     case 'admin/settings/actions':
     case 'admin/settings/actions/manage':
       $output = '<p>'. t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the trigger module, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions.') .'</p>';
@@ -102,8 +112,10 @@ function system_help($path, $arg) {
         $output .= '<p>'. t('You may proceed to the <a href="@url">Triggers</a> page to assign these actions to system events.', array('@url' => url('admin/build/trigger'))) .'</p>';
       }
       return $output;
+
     case 'admin/settings/actions/configure':
       return t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended, in order to better identify the precise action taking place. This description will be displayed in modules such as the trigger module when assigning actions to system events, so it is best if it is as descriptive as possible (for example, "Send e-mail to Moderation Team" rather than simply "Send e-mail").');
+
     case 'admin/reports/status':
       return '<p>'. t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on drupal.org's support forums and project issue queues.") .'</p>';
   }
@@ -114,46 +126,46 @@ function system_help($path, $arg) {
  */
 function system_theme() {
   return array_merge(drupal_common_theme(), array(
-    'system_theme_select_form' => array(
-      'arguments' => array('form' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'system_themes_form' => array(
-      'arguments' => array('form' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'system_modules' => array(
-      'arguments' => array('form' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'system_modules_uninstall' => array(
-      'arguments' => array('form' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'status_report' => array(
-      'arguments' => array('requirements' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'admin_page' => array(
-      'arguments' => array('blocks' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'admin_block' => array(
-      'arguments' => array('block' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'admin_block_content' => array(
-      'arguments' => array('content' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'system_admin_by_module' => array(
-      'arguments' => array('menu_items' => NULL),
-      'file' => 'system.admin.inc',
-    ),
-    'system_powered_by' => array(
-      'arguments' => array('image_path' => NULL),
-    ),
-  ));
+      'system_theme_select_form' => array(
+        'arguments' => array('form' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'system_themes_form' => array(
+        'arguments' => array('form' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'system_modules' => array(
+        'arguments' => array('form' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'system_modules_uninstall' => array(
+        'arguments' => array('form' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'status_report' => array(
+        'arguments' => array('requirements' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'admin_page' => array(
+        'arguments' => array('blocks' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'admin_block' => array(
+        'arguments' => array('block' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'admin_block_content' => array(
+        'arguments' => array('content' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'system_admin_by_module' => array(
+        'arguments' => array('menu_items' => NULL),
+        'file' => 'system.admin.inc',
+      ),
+      'system_powered_by' => array(
+        'arguments' => array('image_path' => NULL),
+      ),
+    ));
 }
 
 /**
@@ -188,12 +200,12 @@ function system_elements() {
   $type['file'] = array('#input' => TRUE, '#size' => 60);
 
   // Form structure
-  $type['item'] = array('#value' => '');
-  $type['hidden'] = array('#input' => TRUE, '#process' => array('form_expand_ahah'));
-  $type['value'] = array('#input' => TRUE);
-  $type['markup'] = array('#prefix' => '', '#suffix' => '');
+  $type['item']     = array('#value' => '');
+  $type['hidden']   = array('#input' => TRUE, '#process' => array('form_expand_ahah'));
+  $type['value']    = array('#input' => TRUE);
+  $type['markup']   = array('#prefix' => '', '#suffix' => '');
   $type['fieldset'] = array('#collapsible' => FALSE, '#collapsed' => FALSE, '#value' => NULL, '#process' => array('form_expand_ahah'));
-  $type['token'] = array('#input' => TRUE);
+  $type['token']    = array('#input' => TRUE);
   return $type;
 }
 
@@ -338,7 +350,7 @@ function system_menu() {
     'title' => 'Actions',
     'description' => 'Manage the actions defined for your site.',
     'access arguments' => array('administer actions'),
-    'page callback' => 'system_actions_manage'
+    'page callback' => 'system_actions_manage',
   );
   $items['admin/settings/actions/manage'] = array(
     'title' => 'Manage actions',
@@ -582,6 +594,7 @@ function system_block($op = 'list', $del
         'weight' => '10',
       );
       return $blocks;
+
     case 'configure':
       // Compile a list of fields to show
       $form['wrapper']['color'] = array(
@@ -597,13 +610,16 @@ function system_block($op = 'list', $del
         '#options' => array('80x15' => t('Small'), '88x31' => t('Medium'), '135x42' => t('Large')),
       );
       return $form;
+
     case 'save':
       variable_set('drupal_badge_color', $edit['color']);
       variable_set('drupal_badge_size', $edit['size']);
       break;
+
     case 'view':
       $image_path = 'misc/'. variable_get('drupal_badge_color', 'powered-blue') .'-'. variable_get('drupal_badge_size', '80x15') .'.png';
-      $block['subject'] = NULL; // Don't display a title
+      // Don't display a title
+      $block['subject'] = NULL;
       $block['content'] = theme('system_powered_by', $image_path);
       return $block;
   }
@@ -665,6 +681,7 @@ function system_admin_theme_submit($form
  *    default value of theme radios
  * @param $weight
  *    weight of the fieldset
+ *
  * @return
  *    a form array
  */
@@ -687,7 +704,7 @@ function system_theme_select_form($descr
         '#title' => t('Theme configuration'),
         '#description' => $description,
         '#collapsible' => TRUE,
-        '#theme' => 'system_theme_select_form'
+        '#theme' => 'system_theme_select_form',
       );
 
       foreach ($enabled as $info) {
@@ -785,7 +802,7 @@ function system_theme_default() {
       'secondary_links',
     ),
     'stylesheets' => array(
-      'all' => array('style.css')
+      'all' => array('style.css'),
     ),
     'scripts' => array('script.js'),
     'screenshot' => 'screenshot.png',
@@ -922,6 +939,7 @@ function _system_theme_data() {
  *   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.
  */
@@ -950,6 +968,7 @@ function system_find_base_theme($themes,
  *
  * @param $theme_key
  *   The name of a theme.
+ *
  * @return
  *   An array of regions in the form $region['name'] = 'description'.
  */
@@ -969,6 +988,7 @@ function system_region_list($theme_key) 
  *
  * @param $theme
  *   The name of a theme.
+ *
  * @return
  *   A string that is the region name.
  */
@@ -992,15 +1012,16 @@ function system_initialize_theme_blocks(
   // Initialize theme's blocks if none already registered.
   if (!(db_result(db_query("SELECT COUNT(*) FROM {blocks} WHERE theme = '%s'", $theme)))) {
     $default_theme = variable_get('theme_default', 'garland');
-    $regions = system_region_list($theme);
-    $result = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $default_theme);
+    $regions       = system_region_list($theme);
+    $result        = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $default_theme);
     while ($block = db_fetch_array($result)) {
       // If the region isn't supported by the theme, assign the block to the theme's default region.
       if (!array_key_exists($block['region'], $regions)) {
         $block['region'] = system_default_region($theme);
       }
       db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, visibility, pages, custom, throttle, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', %d, '%s', %d, %d, %d)",
-          $block['module'], $block['delta'], $theme, $block['status'], $block['weight'], $block['region'], $block['visibility'], $block['pages'], $block['custom'], $block['throttle'], $block['cache']);
+        $block['module'], $block['delta'], $theme, $block['status'], $block['weight'], $block['region'], $block['visibility'], $block['pages'], $block['custom'], $block['throttle'], $block['cache']
+      );
     }
   }
 }
@@ -1010,14 +1031,16 @@ function system_initialize_theme_blocks(
  *
  * @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') );
-  $form['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );
+  $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+  $form['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults'));
 
   if (!empty($_POST) && form_get_errors()) {
     drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
@@ -1069,7 +1092,7 @@ function _system_sort_requirements($a, $
     if (!isset($b['weight'])) {
       return strcmp($a['title'], $b['title']);
     }
-    return -$b['weight'];
+    return - $b['weight'];
   }
   return isset($b['weight']) ? $a['weight'] - $b['weight'] : $a['weight'];
 }
@@ -1105,6 +1128,7 @@ function system_node_type($op, $info) {
  * action was confirmed.
  *
  * @ingroup forms
+ *
  * @param $form
  *   Additional elements to inject into the form, for example hidden elements.
  * @param $question
@@ -1122,6 +1146,7 @@ function system_node_type($op, $info) {
  *   A caption for the link which denies the action (e.g. "Cancel").
  * @param $name
  *   The internal name used to refer to the confirmation item.
+ *
  * @return
  *   The form.
  */
@@ -1131,9 +1156,9 @@ function confirm_form($form, $question, 
   // Prepare cancel link
   $query = $fragment = NULL;
   if (is_array($path)) {
-    $query = isset($path['query']) ? $path['query'] : NULL;
+    $query    = isset($path['query']) ? $path['query'] : NULL;
     $fragment = isset($path['fragment']) ? $path['fragment'] : NULL;
-    $path = isset($path['path']) ? $path['path'] : NULL;
+    $path     = isset($path['path']) ? $path['path'] : NULL;
   }
   $cancel = l($no ? $no : t('Cancel'), $path, array('query' => $query, 'fragment' => $fragment));
 
@@ -1144,7 +1169,7 @@ function confirm_form($form, $question, 
 
   $form['#attributes'] = array('class' => 'confirmation');
   $form['description'] = array('#value' => $description);
-  $form[$name] = array('#type' => 'hidden', '#value' => 1);
+  $form[$name]         = array('#type' => 'hidden', '#value' => 1);
 
   $form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
   $form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
@@ -1166,6 +1191,7 @@ function system_admin_compact_mode() {
  *
  * @param $module
  *   Module name.
+ *
  * @return
  *   An array of task links.
  */
@@ -1191,14 +1217,14 @@ function system_get_module_admin_tasks($
   $admin_task_count = 0;
   // Check for permissions.
   if (module_hook($module, 'perm') && $admin_access) {
-    $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-'. $module));
+    $admin_tasks[ - 1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-'. $module));
   }
 
   // Check for menu items that are admin links.
   if ($menu = module_invoke($module, 'menu')) {
     foreach (array_keys($menu) as $path) {
       if (isset($items[$path])) {
-        $admin_tasks[$items[$path]['title'] . $admin_task_count ++] = l($items[$path]['title'], $path);
+        $admin_tasks[$items[$path]['title'] . $admin_task_count++] = l($items[$path]['title'], $path);
       }
     }
   }
@@ -1272,7 +1298,7 @@ function system_action_info() {
         'comment' => array('view', 'insert', 'update', 'delete'),
         'user' => array('view', 'insert', 'update', 'delete', 'login'),
         'taxonomy' => array('insert', 'update', 'delete'),
-      )
+      ),
     ),
     'system_goto_action' => array(
       'description' => t('Redirect to URL'),
@@ -1282,8 +1308,8 @@ function system_action_info() {
         'nodeapi' => array('view', 'insert', 'update', 'delete'),
         'comment' => array('view', 'insert', 'update', 'delete'),
         'user' => array('view', 'insert', 'update', 'delete', 'login'),
-      )
-    )
+      ),
+    ),
   );
 }
 
@@ -1294,8 +1320,8 @@ function system_actions_manage() {
   $output = '';
   $actions = actions_list();
   actions_synchronize($actions);
-  $actions_map = actions_actions_map($actions);
-  $options = array(t('Choose an advanced action'));
+  $actions_map    = actions_actions_map($actions);
+  $options        = array(t('Choose an advanced action'));
   $unconfigurable = array();
 
   foreach ($actions_map as $key => $array) {
@@ -1307,12 +1333,12 @@ function system_actions_manage() {
     }
   }
 
-  $row = array();
+  $row               = array();
   $instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters != ''"));
-  $header = array(
+  $header            = array(
     array('data' => t('Action type'), 'field' => 'type'),
     array('data' => t('Description'), 'field' => 'description'),
-    array('data' => $instances_present ? t('Operations') : '', 'colspan' => '2')
+    array('data' => $instances_present ? t('Operations') : '', 'colspan' => '2'),
   );
   $sql = 'SELECT * FROM {actions}';
   $result = pager_query($sql . tablesort_sql($header), 50);
@@ -1321,7 +1347,7 @@ function system_actions_manage() {
       array('data' => $action->type),
       array('data' => $action->description),
       array('data' => $action->parameters ? l(t('configure'), "admin/settings/actions/configure/$action->aid") : ''),
-      array('data' => $action->parameters ? l(t('delete'), "admin/settings/actions/delete/$action->aid") : '')
+      array('data' => $action->parameters ? l(t('delete'), "admin/settings/actions/delete/$action->aid") : ''),
     );
   }
 
@@ -1346,10 +1372,12 @@ function system_actions_manage() {
  *
  * @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
  *   Form definition.
  */
@@ -1392,10 +1420,12 @@ function system_actions_manage_form_subm
  *
  * @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
  *   an existing instance.
+ *
  * @return
  *   Form definition.
  */
@@ -1436,7 +1466,7 @@ function system_actions_configure($form_
     '#default_value' => $edit['actions_description'],
     '#maxlength' => '255',
     '#description' => t('A unique description for this advanced action. This description will be displayed in the interface of modules that integrate with actions, such as Trigger module.'),
-    '#weight' => -10
+    '#weight' => -10,
   );
   $action_form = $function .'_form';
   $form = array_merge($form, $action_form($edit));
@@ -1462,7 +1492,7 @@ function system_actions_configure($form_
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
-    '#weight' => 13
+    '#weight' => 13,
   );
 
   return $form;
@@ -1556,8 +1586,10 @@ function system_actions_remove_orphans()
  *
  * @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
  *   Form definition.
  */
@@ -1619,8 +1651,8 @@ function system_send_email_action_submit
   // we return will be serialized to the database.
   $params = array(
     'recipient' => $form_values['recipient'],
-    'subject'   => $form_values['subject'],
-    'message'   => $form_values['message'],
+    'subject' => $form_values['subject'],
+    'message' => $form_values['message'],
   );
   return $params;
 }
@@ -1639,6 +1671,7 @@ function system_send_email_action($objec
       $node = $context['node'];
       break;
     // The comment hook provides nid, in $context.
+
     case 'comment':
       $comment = $context['comment'];
       $node = node_load($comment->nid);
@@ -1656,6 +1689,7 @@ function system_send_email_action($objec
         return;
       }
       break;
+
     default:
       // We are being called directly.
       $node = $object;
@@ -1674,7 +1708,6 @@ function system_send_email_action($objec
 
   if (!isset($account)) {
     $account = $user;
-
   }
   $language = user_preferred_language($account);
   $params = array('account' => $account, 'object' => $object, 'context' => $context);
@@ -1694,8 +1727,8 @@ function system_send_email_action($objec
  * Implementation of hook_mail().
  */
 function system_mail($key, &$message, $params) {
-  $account = $params['account'];
-  $context = $params['context'];
+  $account   = $params['account'];
+  $context   = $params['context'];
   $variables = array(
     '%site_name' => variable_get('site_name', 'Drupal'),
     '%username' => $account->name,
@@ -1768,22 +1801,25 @@ function system_message_action(&$object,
       $node = $context['node'];
       break;
     // The comment hook also provides the node, in context.
+
     case 'comment':
       $comment = $context['comment'];
       $node = node_load($comment->nid);
       break;
+
     case 'taxonomy':
       $vocabulary = taxonomy_vocabulary_load($object->vid);
       $variables = array_merge($variables, array(
-        '%term_name' => $object->name,
-        '%term_description' => $object->description,
-        '%term_id' => $object->tid,
-        '%vocabulary_name' => $vocabulary->name,
-        '%vocabulary_description' => $vocabulary->description,
-        '%vocabulary_id' => $vocabulary->vid,
+          '%term_name' => $object->name,
+          '%term_description' => $object->description,
+          '%term_id' => $object->tid,
+          '%vocabulary_name' => $vocabulary->name,
+          '%vocabulary_description' => $vocabulary->description,
+          '%vocabulary_id' => $vocabulary->vid,
         )
       );
       break;
+
     default:
       // We are being called directly.
       $node = $object;
@@ -1791,12 +1827,12 @@ function system_message_action(&$object,
 
   if (isset($node) && is_object($node)) {
     $variables = array_merge($variables, array(
-      '%uid' => $node->uid,
-      '%node_url' => url('node/'. $node->nid, array('absolute' => TRUE)),
-      '%node_type' => check_plain(node_get_types('name', $node)),
-      '%title' => filter_xss($node->title),
-      '%teaser' => filter_xss($node->teaser),
-      '%body' => filter_xss($node->body),
+        '%uid' => $node->uid,
+        '%node_url' => url('node/'. $node->nid, array('absolute' => TRUE)),
+        '%node_type' => check_plain(node_get_types('name', $node)),
+        '%title' => filter_xss($node->title),
+        '%teaser' => filter_xss($node->teaser),
+        '%body' => filter_xss($node->body),
       )
     );
   }
@@ -1820,7 +1856,7 @@ function system_goto_action_form($contex
 
 function system_goto_action_submit($form, $form_state) {
   return array(
-    'url' => $form_state['values']['url']
+    'url' => $form_state['values']['url'],
   );
 }
 
@@ -1833,8 +1869,8 @@ function system_goto_action($object, $co
  */
 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);
-  $zones = array();
+  $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);
+  $zones     = array();
   foreach ($zonelist as $offset) {
     $zone = $offset * 3600;
     $zones[$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') .' O', $zone);
@@ -1877,3 +1913,4 @@ function theme_system_powered_by($image_
   $image = theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'));
   return l($image, 'http://drupal.org', array('html' => TRUE, 'absolute' => TRUE, 'external' => TRUE));
 }
+
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.21
diff -u -p -r1.21 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	8 Jan 2008 10:35:42 -0000	1.21
+++ modules/taxonomy/taxonomy.admin.inc	21 Jan 2008 21:59:01 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: taxonomy.admin.inc,v 1.21 2008/01/08 10:35:42 goba Exp $
 
+
 /**
  * @file
  * Administrative page callbacks for the taxonomy module.
@@ -68,16 +69,16 @@ function theme_taxonomy_overview_vocabul
     if (isset($form[$key]['name'])) {
       $vocabulary = &$form[$key];
 
-      $row = array();
+      $row   = array();
       $row[] = drupal_render($vocabulary['name']);
       $row[] = drupal_render($vocabulary['types']);
       if (isset($vocabulary['weight'])) {
         $vocabulary['weight']['#attributes']['class'] = 'vocabulary-weight';
         $row[] = drupal_render($vocabulary['weight']);
       }
-      $row[] = drupal_render($vocabulary['edit']);
-      $row[] = drupal_render($vocabulary['list']);
-      $row[] = drupal_render($vocabulary['add']);
+      $row[]  = drupal_render($vocabulary['edit']);
+      $row[]  = drupal_render($vocabulary['list']);
+      $row[]  = drupal_render($vocabulary['add']);
       $rows[] = array('data' => $row, 'class' => 'draggable');
     }
   }
@@ -185,7 +186,7 @@ function taxonomy_form_vocabulary(&$form
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save'));
   if (isset($edit['vid'])) {
     $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
-    $form['vid'] = array('#type' => 'value', '#value' => $edit['vid']);
+    $form['vid']    = array('#type' => 'value', '#value' => $edit['vid']);
     $form['module'] = array('#type' => 'value', '#value' => $edit['module']);
   }
   return $form;
@@ -202,6 +203,7 @@ function taxonomy_form_vocabulary_submit
       drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_state['values']['name'])));
       watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_state['values']['vid']));
       break;
+
     case SAVED_UPDATED:
       drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_state['values']['name'])));
       watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_state['values']['vid']));
@@ -258,17 +260,22 @@ function taxonomy_overview_terms(&$form_
     '#parent_fields' => FALSE,
   );
 
-  $page            = isset($_GET['page']) ? $_GET['page'] : 0;
-  $page_increment  = 10;  // Number of terms per page.
-  $page_entries    = 0;   // Elements shown on this page.
-  $before_entries  = 0;   // Elements at the root level before this page.
-  $after_entries   = 0;   // Elements at the root level after this page.
-  $root_entries    = 0;   // Elements at the root level on this page.
+  $page = isset($_GET['page']) ? $_GET['page'] : 0;
+  // Number of terms per page.
+  $page_increment = 10;
+  // Elements shown on this page.
+  $page_entries = 0;
+  // Elements at the root level before this page.
+  $before_entries = 0;
+  // Elements at the root level after this page.
+  $after_entries = 0;
+  // Elements at the root level on this page.
+  $root_entries = 0;
 
   // Terms from previous and next pages are shown if the term tree would have
   // been cut in the middle. Keep track of how many extra terms we show on each
   // page of terms.
-  $back_peddle    = NULL;
+  $back_peddle = NULL;
   $forward_peddle = 0;
 
   // An array of the terms to be displayed on this page.
@@ -289,8 +296,8 @@ function taxonomy_overview_terms(&$form_
   // Case for restricted vocabulary.
   else {
     $term_deltas = array();
-    $tree = taxonomy_get_tree($vocabulary->vid);
-    $term = current($tree);
+    $tree        = taxonomy_get_tree($vocabulary->vid);
+    $term        = current($tree);
     do {
       // In case this tree is completely empty.
       if (empty($term)) {
@@ -315,7 +322,8 @@ function taxonomy_overview_terms(&$form_
           $back_peddle++;
           if ($pterm->depth == 0) {
             prev($tree);
-            continue 2; // Jump back to the start of the root level parent.
+            // Jump back to the start of the root level parent.
+            continue 2;
           }
         }
       }
@@ -358,8 +366,10 @@ function taxonomy_overview_terms(&$form_
   // If this form was already submitted once, it's probably hit a validation
   // error. Ensure the form is rebuilt in the same order as the user submitted.
   if (!empty($form_state['post'])) {
-    $order = array_flip(array_keys($form_state['post'])); // Get the $_POST order.
-    $current_page = array_merge($order, $current_page); // Update our form with the new order.
+    // Get the $_POST order.
+    $order = array_flip(array_keys($form_state['post']));
+    // Update our form with the new order.
+    $current_page = array_merge($order, $current_page);
     foreach ($current_page as $key => $term) {
       // Verify this is a term for the current page and set at the current depth.
       if (is_array($form_state['post'][$key]) && is_numeric($form_state['post'][$key]['tid'])) {
@@ -385,7 +395,7 @@ function taxonomy_overview_terms(&$form_
       $form['#parent_fields'] = TRUE;
       $form[$key]['tid'] = array(
         '#type' => 'hidden',
-        '#value' => $term->tid
+        '#value' => $term->tid,
       );
       $form[$key]['parent'] = array(
         '#type' => 'hidden',
@@ -411,15 +421,15 @@ function taxonomy_overview_terms(&$form_
   if (!$vocabulary->tags && $vocabulary->hierarchy < 2 && count($tree) > 1) {
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save')
+      '#value' => t('Save'),
     );
     $form['reset_alphabetical'] = array(
       '#type' => 'submit',
-      '#value' => t('Reset to alphabetical')
+      '#value' => t('Reset to alphabetical'),
     );
     $form['destination'] = array(
       '#type' => 'hidden',
-      '#value' => $_GET['q'] . (isset($_GET['page']) ? '?page='. $_GET['page'] : '')
+      '#value' => $_GET['q'] . (isset($_GET['page']) ? '?page='. $_GET['page'] : ''),
     );
   }
 
@@ -453,11 +463,14 @@ function taxonomy_overview_terms_submit(
     return;
   }
 
-  $order = array_flip(array_keys($form['#post'])); // Get the $_POST order.
-  $form_state['values'] = array_merge($order, $form_state['values']); // Update our original form with the new order.
+  // Get the $_POST order.
+  $order = array_flip(array_keys($form['#post']));
+  // Update our original form with the new order.
+  $form_state['values'] = array_merge($order, $form_state['values']);
 
   $vocabulary = $form['#vocabulary'];
-  $hierarchy = 0; // Update the current hierarchy type as we go.
+  // Update the current hierarchy type as we go.
+  $hierarchy = 0;
 
   $changed_terms = array();
   $tree = taxonomy_get_tree($vocabulary['vid']);
@@ -538,10 +551,10 @@ function taxonomy_overview_terms_submit(
  * @see taxonomy_overview_terms()
  */
 function theme_taxonomy_overview_terms($form) {
-  $page_increment  = $form['#page_increment'];
-  $page_entries    = $form['#page_entries'];
-  $back_peddle     = $form['#back_peddle'];
-  $forward_peddle  = $form['#forward_peddle'];
+  $page_increment = $form['#page_increment'];
+  $page_entries   = $form['#page_entries'];
+  $back_peddle    = $form['#back_peddle'];
+  $forward_peddle = $form['#forward_peddle'];
 
   // Add drag and drop if parent fields are present in the form.
   if ($form['#parent_fields']) {
@@ -622,7 +635,7 @@ function theme_taxonomy_overview_terms($
  */
 function taxonomy_add_term_page($vocabulary) {
   drupal_set_title(t('Add term to %vocabulary', array('%vocabulary' => $vocabulary->name)));
-  return drupal_get_form('taxonomy_form_term' , $vocabulary);
+  return drupal_get_form('taxonomy_form_term', $vocabulary);
 }
 
 /**
@@ -664,12 +677,14 @@ function taxonomy_form_term(&$form_state
     '#default_value' => $edit['name'],
     '#maxlength' => 255,
     '#description' => t('The name of this term.'),
-    '#required' => TRUE);
+    '#required' => TRUE,
+  );
   $form['identification']['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
     '#default_value' => $edit['description'],
-    '#description' => t('A description of the term. To be displayed on taxonomy/term pages and RSS feeds.'));
+    '#description' => t('A description of the term. To be displayed on taxonomy/term pages and RSS feeds.'),
+  );
 
   $form['advanced'] = array(
     '#type' => 'fieldset',
@@ -699,28 +714,34 @@ function taxonomy_form_term(&$form_state
     '#type' => 'textarea',
     '#title' => t('Synonyms'),
     '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])),
-    '#description' => t('Synonyms of this term, one synonym per line.'));
+    '#description' => t('Synonyms of this term, one synonym per line.'),
+  );
   $form['advanced']['weight'] = array(
     '#type' => 'textfield',
     '#title' => t('Weight'),
     '#size' => 6,
     '#default_value' => $edit['weight'],
     '#description' => t('Terms are displayed in ascending order by weight.'),
-    '#required' => TRUE);
+    '#required' => TRUE,
+  );
   $form['vid'] = array(
     '#type' => 'value',
-    '#value' => $vocabulary->vid);
+    '#value' => $vocabulary->vid,
+  );
   $form['submit'] = array(
     '#type' => 'submit',
-    '#value' => t('Save'));
+    '#value' => t('Save'),
+  );
 
   if ($edit['tid']) {
     $form['delete'] = array(
       '#type' => 'submit',
-      '#value' => t('Delete'));
+      '#value' => t('Delete'),
+    );
     $form['tid'] = array(
       '#type' => 'value',
-      '#value' => $edit['tid']);
+      '#value' => $edit['tid'],
+    );
   }
   else {
     $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']);
@@ -768,6 +789,7 @@ function taxonomy_form_term_submit($form
       drupal_set_message(t('Created new term %term.', array('%term' => $form_state['values']['name'])));
       watchdog('taxonomy', 'Created new term %term.', array('%term' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_state['values']['tid']));
       break;
+
     case SAVED_UPDATED:
       drupal_set_message(t('Updated term %term.', array('%term' => $form_state['values']['name'])));
       watchdog('taxonomy', 'Updated term %term.', array('%term' => $form_state['values']['name']), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_state['values']['tid']));
@@ -830,17 +852,19 @@ function taxonomy_term_confirm_parents(&
 function taxonomy_term_confirm_delete(&$form_state, $tid) {
   $term = taxonomy_get_term($tid);
 
-  $form['type'] = array('#type' => 'value', '#value' => 'term');
-  $form['name'] = array('#type' => 'value', '#value' => $term->name);
-  $form['tid'] = array('#type' => 'value', '#value' => $tid);
+  $form['type']   = array('#type' => 'value', '#value' => 'term');
+  $form['name']   = array('#type' => 'value', '#value' => $term->name);
+  $form['tid']    = array('#type' => 'value', '#value' => $tid);
   $form['delete'] = array('#type' => 'value', '#value' => TRUE);
   return confirm_form($form,
-                  t('Are you sure you want to delete the term %title?',
-                  array('%title' => $term->name)),
-                  'admin/content/taxonomy',
-                  t('Deleting a term will delete all its children if there are any. This action cannot be undone.'),
-                  t('Delete'),
-                  t('Cancel'));
+    t('Are you sure you want to delete the term %title?',
+      array('%title' => $term->name)
+    ),
+    'admin/content/taxonomy',
+    t('Deleting a term will delete all its children if there are any. This action cannot be undone.'),
+    t('Delete'),
+    t('Cancel')
+  );
 }
 
 /**
@@ -867,15 +891,17 @@ function taxonomy_vocabulary_confirm_del
   $vocabulary = taxonomy_vocabulary_load($vid);
 
   $form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
-  $form['vid'] = array('#type' => 'value', '#value' => $vid);
+  $form['vid']  = array('#type' => 'value', '#value' => $vid);
   $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
   return confirm_form($form,
-                  t('Are you sure you want to delete the vocabulary %title?',
-                  array('%title' => $vocabulary->name)),
-                  'admin/content/taxonomy',
-                  t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'),
-                  t('Delete'),
-                  t('Cancel'));
+    t('Are you sure you want to delete the vocabulary %title?',
+      array('%title' => $vocabulary->name)
+    ),
+    'admin/content/taxonomy',
+    t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'),
+    t('Delete'),
+    t('Cancel')
+  );
 }
 
 /**
@@ -905,12 +931,14 @@ function taxonomy_vocabulary_confirm_res
   $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
   $form['reset_alphabetical'] = array('#type' => 'value', '#value' => TRUE);
   return confirm_form($form,
-                  t('Are you sure you want to reset the vocabulary %title to alphabetical order?',
-                  array('%title' => $vocabulary->name)),
-                  'admin/content/taxonomy/'. $vid,
-                  t('Resetting a vocabulary will discard all custom ordering and sort items alphabetically.'),
-                  t('Reset to alphabetical'),
-                  t('Cancel'));
+    t('Are you sure you want to reset the vocabulary %title to alphabetical order?',
+      array('%title' => $vocabulary->name)
+    ),
+    'admin/content/taxonomy/'. $vid,
+    t('Resetting a vocabulary will discard all custom ordering and sort items alphabetically.'),
+    t('Reset to alphabetical'),
+    t('Cancel')
+  );
 }
 
 /**
@@ -924,3 +952,4 @@ function taxonomy_vocabulary_confirm_res
   watchdog('taxonomy', 'Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
   $form_state['redirect'] = 'admin/content/taxonomy/'. $form_state['values']['vid'];
 }
+
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.7
diff -u -p -r1.7 taxonomy.install
--- modules/taxonomy/taxonomy.install	8 Jan 2008 07:46:41 -0000	1.7
+++ modules/taxonomy/taxonomy.install	21 Jan 2008 21:59:01 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: taxonomy.install,v 1.7 2008/01/08 07:46:41 goba Exp $
 
+
 /**
  * Implementation of hook_schema().
  */
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.413
diff -u -p -r1.413 taxonomy.module
--- modules/taxonomy/taxonomy.module	15 Jan 2008 08:00:24 -0000	1.413
+++ modules/taxonomy/taxonomy.module	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: taxonomy.module,v 1.413 2008/01/15 08:00:24 dries Exp $
 
+
 /**
  * @file
  * Enables the organization of content into categories.
@@ -61,7 +62,7 @@ function taxonomy_link($type, $node = NU
           $links['taxonomy_term_'. $term->tid] = array(
             'title' => $term->name,
             'href' => taxonomy_term_path($term),
-            'attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))
+            'attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description)),
           );
         }
         // Previewing free tagging terms; we don't link them because the
@@ -93,10 +94,10 @@ function taxonomy_link($type, $node = NU
  *
  * @param $term
  *   A term object.
+ *
  * @return
  *   An internal Drupal path.
  */
-
 function taxonomy_term_path($term) {
   $vocabulary = taxonomy_vocabulary_load($term->vid);
   if ($vocabulary->module != 'taxonomy' && $path = module_invoke($vocabulary->module, 'term_path', $term)) {
@@ -229,6 +230,7 @@ function taxonomy_save_vocabulary(&$edit
  *
  * @param $vid
  *   A vocabulary ID.
+ *
  * @return
  *   Constant indicating items were deleted.
  */
@@ -294,13 +296,14 @@ function taxonomy_check_vocabulary_hiera
  * Helper function for taxonomy_form_term_submit().
  *
  * @param $form_state['values']
+ *
  * @return
  *   Status constant indicating if term was inserted or updated.
  */
 function taxonomy_save_term(&$form_values) {
   $form_values += array(
     'description' => '',
-    'weight' => 0
+    'weight' => 0,
   );
 
   if (!empty($form_values['tid']) && $form_values['name']) {
@@ -348,7 +351,7 @@ function taxonomy_save_term(&$form_value
 
   db_query('DELETE FROM {term_synonym} WHERE tid = %d', $form_values['tid']);
   if (!empty($form_values['synonyms'])) {
-    foreach (explode ("\n", str_replace("\r", '', $form_values['synonyms'])) as $synonym) {
+    foreach (explode("\n", str_replace("\r", '', $form_values['synonyms'])) as $synonym) {
       if ($synonym) {
         db_query("INSERT INTO {term_synonym} (tid, name) VALUES (%d, '%s')", $form_values['tid'], chop($synonym));
       }
@@ -369,6 +372,7 @@ function taxonomy_save_term(&$form_value
  *
  * @param $tid
  *   The term ID.
+ *
  * @return
  *   Status constant indicating deletion.
  */
@@ -431,7 +435,9 @@ function taxonomy_form_all($free_tags = 
   $vocabularies = taxonomy_get_vocabularies();
   $options = array();
   foreach ($vocabularies as $vid => $vocabulary) {
-    if ($vocabulary->tags && !$free_tags) { continue; }
+    if ($vocabulary->tags && !$free_tags) {
+      continue;
+    }
     $tree = taxonomy_get_tree($vid);
     if ($tree && (count($tree) > 0)) {
       $options[$vocabulary->name] = array();
@@ -660,7 +666,8 @@ function taxonomy_node_save($node, $term
         // See if the term exists in the chosen vocabulary
         // and return the tid; otherwise, add a new record.
         $possibilities = taxonomy_get_term_by_name($typed_term);
-        $typed_term_tid = NULL; // tid match, if any.
+        // tid match, if any.
+        $typed_term_tid = NULL;
         foreach ($possibilities as $possibility) {
           if ($possibility->vid == $vid) {
             $typed_term_tid = $possibility->tid;
@@ -668,8 +675,8 @@ function taxonomy_node_save($node, $term
         }
 
         if (!$typed_term_tid) {
-          $edit = array('vid' => $vid, 'name' => $typed_term);
-          $status = taxonomy_save_term($edit);
+          $edit           = array('vid' => $vid, 'name' => $typed_term);
+          $status         = taxonomy_save_term($edit);
           $typed_term_tid = $edit['tid'];
         }
 
@@ -1024,9 +1031,9 @@ function _taxonomy_term_select($title, $
   if ($tree) {
     foreach ($tree as $term) {
       if (!in_array($term->tid, $exclude)) {
-        $choice = new stdClass();
+        $choice         = new stdClass();
         $choice->option = array($term->tid => str_repeat('-', $term->depth) . $term->name);
-        $options[] = $choice;
+        $options[]      = $choice;
       }
     }
   }
@@ -1068,6 +1075,7 @@ function theme_taxonomy_term_select($ele
  *   pages) or not (in an XML feed, for example).
  * @param $order
  *   The order clause for the query that retrieve the nodes.
+ *
  * @return
  *   A resource identifier pointing to the query results.
  */
@@ -1079,21 +1087,21 @@ function taxonomy_select_nodes($tids = a
       $depth = NULL;
     }
     foreach ($tids as $index => $tid) {
-      $term = taxonomy_get_term($tid);
-      $tree = taxonomy_get_tree($term->vid, $tid, -1, $depth);
+      $term              = taxonomy_get_term($tid);
+      $tree              = taxonomy_get_tree($term->vid, $tid, -1, $depth);
       $descendant_tids[] = array_merge(array($tid), array_map('_taxonomy_get_tid_from_term', $tree));
     }
 
     if ($operator == 'or') {
-      $args = call_user_func_array('array_merge', $descendant_tids);
+      $args         = call_user_func_array('array_merge', $descendant_tids);
       $placeholders = db_placeholders($args, 'int');
-      $sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1 ORDER BY '. $order;
-      $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1';
+      $sql          = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1 ORDER BY '. $order;
+      $sql_count    = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $placeholders .') AND n.status = 1';
     }
     else {
-      $joins = '';
+      $joins  = '';
       $wheres = '';
-      $args = array();
+      $args   = array();
       foreach ($descendant_tids as $index => $tids) {
         $joins .= ' INNER JOIN {term_node} tn'. $index .' ON n.vid = tn'. $index .'.vid';
         $wheres .= ' AND tn'. $index .'.tid IN ('. db_placeholders($tids, 'int') .')';
@@ -1220,9 +1228,10 @@ function taxonomy_terms_parse_string($st
 function taxonomy_rss_item($node) {
   $output = array();
   foreach ($node->taxonomy as $term) {
-    $output[] = array('key'   => 'category',
-                      'value' => check_plain($term->name),
-                      'attributes' => array('domain' => url('taxonomy/term/'. $term->tid, array('absolute' => TRUE))));
+    $output[] = array('key' => 'category',
+      'value' => check_plain($term->name),
+      'attributes' => array('domain' => url('taxonomy/term/'. $term->tid, array('absolute' => TRUE))),
+    );
   }
   return $output;
 }
@@ -1242,21 +1251,26 @@ function taxonomy_help($path, $arg) {
       $output .= '<p>'. t('The taxonomy module supports the use of both synonyms and related terms, but does not directly use this functionality. However, optional contributed or custom modules may make full use of these advanced features.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@taxonomy">Taxonomy module</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'</p>';
       return $output;
+
     case 'admin/content/taxonomy':
       return '<p>'. t("The taxonomy module allows you to categorize your content using both tags and administrator defined terms. It is a flexible tool for classifying content with many advanced features. To begin, create a 'Vocabulary' to hold one set of terms or tags. You can create one free-tagging vocabulary for everything, or separate controlled vocabularies to define the various properties of your content, for example 'Countries' or 'Colors'.") .'</p>';
+
     case 'admin/content/taxonomy/%':
       $vocabulary = taxonomy_vocabulary_load($arg[3]);
       if ($vocabulary->tags) {
         return '<p>'. t('%capital_name is a free-tagging vocabulary. To change the name or description of a term, click the <em>edit</em> link next to the term.', array('%capital_name' => drupal_ucfirst($vocabulary->name))) .'</p>';
       }
       switch ($vocabulary->hierarchy) {
-        case 0:
-          return '<p>'. t('%capital_name is a flat vocabulary. You may organize the terms in the %name vocabulary by using the handles on the left side of the table. To change the name or description of a term, click the <em>edit</em> link next to the term.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) .'</p>';
-        case 1:
-          return '<p>'. t('%capital_name is a single hierarchy vocabulary. You may organize the terms in the %name vocabulary by using the handles on the left side of the table. To change the name or description of a term, click the <em>edit</em> link next to the term.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) .'</p>';
-        case 2:
-          return '<p>'. t('%capital_name is a multiple hierarchy vocabulary. To change the name or description of a term, click the <em>edit</em> link next to the term. Drag and drop of multiple hierarchies is not supported, but you can re-enable drag and drop support by editing each term to include only a single parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name))) .'</p>';
-      }
+      case 0:
+        return '<p>'. t('%capital_name is a flat vocabulary. You may organize the terms in the %name vocabulary by using the handles on the left side of the table. To change the name or description of a term, click the <em>edit</em> link next to the term.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) .'</p>';
+
+      case 1:
+        return '<p>'. t('%capital_name is a single hierarchy vocabulary. You may organize the terms in the %name vocabulary by using the handles on the left side of the table. To change the name or description of a term, click the <em>edit</em> link next to the term.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) .'</p>';
+
+      case 2:
+        return '<p>'. t('%capital_name is a multiple hierarchy vocabulary. To change the name or description of a term, click the <em>edit</em> link next to the term. Drag and drop of multiple hierarchies is not supported, but you can re-enable drag and drop support by editing each term to include only a single parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name))) .'</p>';
+    }
+
     case 'admin/content/taxonomy/add/vocabulary':
       return '<p>'. t('Define how your vocabulary will be presented to administrators and users, and which content types to categorize with it. Tags allows users to create terms when submitting posts by typing a comma separated list. Otherwise terms are chosen from a select list and can only be created by users with the "administer taxonomy" permission.') .'</p>';
   }
@@ -1303,9 +1317,10 @@ function taxonomy_hook_info() {
           'runs when' => t('After saving an updated term to the database'),
         ),
         'delete' => array(
-          'runs when' => t('After deleting a term')
+          'runs when' => t('After deleting a term'),
         ),
       ),
     ),
   );
 }
+
Index: modules/taxonomy/taxonomy.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.pages.inc,v
retrieving revision 1.9
diff -u -p -r1.9 taxonomy.pages.inc
--- modules/taxonomy/taxonomy.pages.inc	18 Jan 2008 16:23:57 -0000	1.9
+++ modules/taxonomy/taxonomy.pages.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: taxonomy.pages.inc,v 1.9 2008/01/18 16:23:57 goba Exp $
 
+
 /**
  * @file
  * Page callbacks for the taxonomy module.
@@ -17,7 +18,8 @@ function taxonomy_term_page($str_tids = 
 
   if ($terms['tids']) {
     $result = db_query(db_rewrite_sql('SELECT t.tid, t.name FROM {term_data} t WHERE t.tid IN ('. db_placeholders($terms['tids']) .')', 't', 'tid'), $terms['tids']);
-    $tids = array(); // we rebuild the $tids-array so it only contains terms the user has access to.
+    // we rebuild the $tids-array so it only contains terms the user has access to.
+    $tids = array();
     $names = array();
     while ($term = db_fetch_object($result)) {
       $tids[] = $term->tid;
@@ -44,7 +46,7 @@ function taxonomy_term_page($str_tids = 
           $output = theme('taxonomy_term_page', $tids, taxonomy_select_nodes($tids, $terms['operator'], $depth, TRUE));
           drupal_add_feed(url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'), 'RSS - '. $title);
           return $output;
-          break;
+        break;
 
         case 'feed':
           $channel['link'] = url('taxonomy/term/'. $str_tids .'/'. $depth, array('absolute' => TRUE));
@@ -57,7 +59,7 @@ function taxonomy_term_page($str_tids = 
           }
 
           $result = taxonomy_select_nodes($tids, $terms['operator'], $depth, FALSE);
-          $items = array(); 
+          $items = array();
           while ($row = db_fetch_object($result)) {
             $items[] = $row->nid;
           }
@@ -135,3 +137,4 @@ function taxonomy_autocomplete($vid, $st
 
   drupal_json($matches);
 }
+
Index: modules/throttle/throttle.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/throttle/throttle.admin.inc,v
retrieving revision 1.2
diff -u -p -r1.2 throttle.admin.inc
--- modules/throttle/throttle.admin.inc	8 Jan 2008 10:35:43 -0000	1.2
+++ modules/throttle/throttle.admin.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: throttle.admin.inc,v 1.2 2008/01/08 10:35:43 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the throttle module.
@@ -22,7 +23,7 @@ function throttle_admin_settings() {
     '#default_value' => variable_get('throttle_anonymous', 0),
     '#size' => 5,
     '#maxlength' => 6,
-    '#description' => t('The congestion control throttle can be automatically enabled when the number of anonymous users currently visiting your site exceeds the specified threshold. For example, to start the throttle when your site has 250 anonymous users online at once, enter \'250\' in this field. Leave this value blank or set to "0" if you do not wish to auto-throttle on anonymous users. You can inspect the current number of anonymous users using the "Who\'s online" block.')
+    '#description' => t('The congestion control throttle can be automatically enabled when the number of anonymous users currently visiting your site exceeds the specified threshold. For example, to start the throttle when your site has 250 anonymous users online at once, enter \'250\' in this field. Leave this value blank or set to "0" if you do not wish to auto-throttle on anonymous users. You can inspect the current number of anonymous users using the "Who\'s online" block.'),
   );
   $form['throttle_user'] = array(
     '#type' => 'textfield',
@@ -30,14 +31,14 @@ function throttle_admin_settings() {
     '#default_value' => variable_get('throttle_user', 0),
     '#size' => 5,
     '#maxlength' => 6,
-    '#description' => t('The congestion control throttle can be automatically enabled when the number of authenticated users currently visiting your site exceeds the specified threshold. For example, to start the throttle when your site has 50 registered users online at once, enter \'50\' in this field. Leave this value blank or set to "0" if you do not wish to auto-throttle on authenticated users. You can inspect the current number of authenticated users using the "Who\'s online" block.')
+    '#description' => t('The congestion control throttle can be automatically enabled when the number of authenticated users currently visiting your site exceeds the specified threshold. For example, to start the throttle when your site has 50 registered users online at once, enter \'50\' in this field. Leave this value blank or set to "0" if you do not wish to auto-throttle on authenticated users. You can inspect the current number of authenticated users using the "Who\'s online" block.'),
   );
   $form['throttle_probability_limiter'] = array(
     '#type' => 'select',
     '#title' => t('Auto-throttle probability limiter'),
     '#default_value' => variable_get('throttle_probability_limiter', 9),
     '#options' => $probabilities,
-    '#description' => t('The auto-throttle probability limiter is an efficiency mechanism to statistically reduce the overhead of the auto-throttle. The limiter is expressed as a percentage of page views, so for example if set to the default of 10% we only perform the extra database queries to update the throttle status 1 out of every 10 page views. The busier your site, the lower you should set the limiter value.')
+    '#description' => t('The auto-throttle probability limiter is an efficiency mechanism to statistically reduce the overhead of the auto-throttle. The limiter is expressed as a percentage of page views, so for example if set to the default of 10% we only perform the extra database queries to update the throttle status 1 out of every 10 page views. The busier your site, the lower you should set the limiter value.'),
   );
 
   $form['#validate'] = array('throttle_admin_settings_validate');
@@ -53,3 +54,4 @@ function throttle_admin_settings_validat
     form_set_error('throttle_user', t("%value is not a valid auto-throttle setting. Please enter a positive numeric value.", array('%value' => $form_state['values']['throttle_user'])));
   }
 }
+
Index: modules/throttle/throttle.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/throttle/throttle.module,v
retrieving revision 1.83
diff -u -p -r1.83 throttle.module
--- modules/throttle/throttle.module	14 Dec 2007 18:08:49 -0000	1.83
+++ modules/throttle/throttle.module	21 Jan 2008 21:59:02 -0000
@@ -1,11 +1,11 @@
 <?php
 // $Id: throttle.module,v 1.83 2007/12/14 18:08:49 goba Exp $
 
+
 /**
  * @file
  * Allows configuration of congestion control auto-throttle mechanism.
  */
-
 function throttle_menu() {
   $items['admin/settings/throttle'] = array(
     'title' => 'Throttle',
@@ -85,16 +85,18 @@ function throttle_exit() {
       if (!$throttle) {
         variable_set('throttle_level', 1);
         $message = format_plural($users,
-                                 '1 user accessing site; throttle enabled.',
-                                 '@count users accessing site; throttle enabled.');
+          '1 user accessing site; throttle enabled.',
+          '@count users accessing site; throttle enabled.'
+        );
       }
     }
     elseif ($max_guests && $guests > $max_guests) {
       if (!$throttle) {
         variable_set('throttle_level', 1);
         $message = format_plural($guests,
-                                 '1 guest accessing site; throttle enabled.',
-                                 '@count guests accessing site; throttle enabled.');
+          '1 guest accessing site; throttle enabled.',
+          '@count guests accessing site; throttle enabled.'
+        );
       }
     }
     else {
@@ -122,7 +124,9 @@ function throttle_help($path, $arg) {
       $output .= '<p>'. t('The congestion control throttle can be automatically enabled when the number of anonymous or authenticated users currently visiting the site exceeds a specified threshold.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@throttle">Throttle module</a>.', array('@throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'</p>';
       return $output;
+
     case 'admin/settings/throttle':
       return '<p>'. t('The throttle module provides a congestion control mechanism that automatically adjusts to a surge in incoming traffic. If your site is referenced by a popular website, or experiences a "Denial of Service" (DoS) attack, your webserver might become overwhelmed. The throttle mechanism is utilized by modules to temporarily disable CPU-intensive functionality, increasing performance.') .'</p>';
   }
 }
+
Index: modules/tracker/tracker.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
retrieving revision 1.154
diff -u -p -r1.154 tracker.module
--- modules/tracker/tracker.module	14 Dec 2007 18:08:49 -0000	1.154
+++ modules/tracker/tracker.module	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: tracker.module,v 1.154 2007/12/14 18:08:49 goba Exp $
 
+
 /**
  * @file
  * Enables tracking of recent posts for users.
@@ -55,3 +56,4 @@ function tracker_menu() {
   );
   return $items;
 }
+
Index: modules/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.5
diff -u -p -r1.5 tracker.pages.inc
--- modules/tracker/tracker.pages.inc	28 Nov 2007 10:29:20 -0000	1.5
+++ modules/tracker/tracker.pages.inc	21 Jan 2008 21:59:02 -0000
@@ -1,12 +1,12 @@
 <?php
 // $Id: tracker.pages.inc,v 1.5 2007/11/28 10:29:20 dries Exp $
 
+
 /**
  * @file
  * User page callbacks for the tracker module.
  */
 
-
 /**
  * Menu callback. Prints a listing of active nodes on the site.
  */
@@ -21,19 +21,19 @@ function tracker_page($account = NULL, $
       // here and not in the menu definiton.
       drupal_set_title(check_plain($account->name));
     }
-  // TODO: These queries are very expensive, see http://drupal.org/node/105639
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
-    $sql = db_rewrite_sql($sql);
+    // TODO: These queries are very expensive, see http://drupal.org/node/105639
+    $sql       = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
+    $sql       = db_rewrite_sql($sql);
     $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)';
     $sql_count = db_rewrite_sql($sql_count);
-    $result = pager_query($sql, 25, 0, $sql_count, COMMENT_PUBLISHED, $account->uid, $account->uid);
+    $result    = pager_query($sql, 25, 0, $sql_count, COMMENT_PUBLISHED, $account->uid, $account->uid);
   }
   else {
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
-    $sql = db_rewrite_sql($sql);
+    $sql       = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
+    $sql       = db_rewrite_sql($sql);
     $sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1';
     $sql_count = db_rewrite_sql($sql_count);
-    $result = pager_query($sql, 25, 0, $sql_count);
+    $result    = pager_query($sql, 25, 0, $sql_count);
   }
 
   $rows = array();
@@ -54,7 +54,7 @@ function tracker_page($account = NULL, $
       l($node->title, "node/$node->nid") .' '. theme('mark', node_mark($node->nid, $node->changed)),
       theme('username', $node),
       array('class' => 'replies', 'data' => $comments),
-      t('!time ago', array('!time' => format_interval(time() - $node->last_updated)))
+      t('!time ago', array('!time' => format_interval(time() - $node->last_updated))),
     );
   }
 
@@ -71,3 +71,4 @@ function tracker_page($account = NULL, $
 
   return $output;
 }
+
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.22
diff -u -p -r1.22 translation.module
--- modules/translation/translation.module	9 Jan 2008 11:51:54 -0000	1.22
+++ modules/translation/translation.module	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: translation.module,v 1.22 2008/01/09 11:51:54 goba Exp $
 
+
 /**
  * @file
  *   Manages content translations.
@@ -23,7 +24,7 @@
 /**
  * Identifies a content type which has translation support enabled.
  */
-define ('TRANSLATION_ENABLED', 2);
+define('TRANSLATION_ENABLED', 2);
 
 /**
  * Implementation of hook_help().
@@ -44,6 +45,7 @@ function translation_help($path, $arg) {
       $output .= '<p>'. t('Use the <a href="@blocks">language switcher block</a> provided by locale module to allow users to select a language. If available, both the site interface and site content are presented in the language selected.', array('@blocks' => url('admin/build/block'))) .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@translation">Translation module</a>.', array('@translation' => 'http://drupal.org/handbook/modules/translation/')) .'</p>';
       return $output;
+
     case 'node/%/translate':
       $output = '<p>'. t('Translations of a piece of content are managed with translation sets. Each translation set has one source post and any number of translations in any of the <a href="!languages">enabled languages</a>. All translations are tracked to be up to date or outdated based on whether the source post was modified significantly.', array('!languages' => url('admin/settings/language'))) .'</p>';
       return $output;
@@ -170,7 +172,7 @@ function translation_link($type, $node =
         'title' => $languages[$language]->native,
         'href' => "node/$translation->nid",
         'language' => $languages[$language],
-        'attributes' => array('title' => $translation->title, 'class' => 'translation-link')
+        'attributes' => array('title' => $translation->title, 'class' => 'translation-link'),
       );
     }
   }
@@ -191,8 +193,9 @@ function translation_nodeapi(&$node, $op
   switch ($op) {
     case 'prepare':
       if (empty($node->nid) && isset($_GET['translation']) && isset($_GET['language']) &&
-          ($source_nid = $_GET['translation']) && ($language = $_GET['language']) &&
-          (user_access('translate content'))) {
+        ($source_nid = $_GET['translation']) && ($language = $_GET['language']) &&
+        (user_access('translate content'))
+      ) {
         // We are translating a node from a source node, so
         // load the node to be translated and populate fields.
         $node->language = $language;
@@ -265,6 +268,7 @@ function translation_remove_from_set($no
  * @param $tnid
  *   The translation source nid of the translation set, the identifier
  *   of the node used to derive all translations in the set.
+ *
  * @return
  *   Array of partial node objects (nid, title, language) representing
  *   all nodes in the translation set, in effect all translations
@@ -303,6 +307,7 @@ function translation_supported_type($typ
  *
  * @param $path
  *   A Drupal path, for example node/432.
+ *
  * @return
  *   An array of paths of translations of the node accessible
  *   to the current user keyed with language codes.
Index: modules/translation/translation.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 translation.pages.inc
--- modules/translation/translation.pages.inc	7 Jan 2008 13:18:40 -0000	1.2
+++ modules/translation/translation.pages.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: translation.pages.inc,v 1.2 2008/01/07 13:18:40 goba Exp $
 
+
 /**
  * @file
  * User page callbacks for the translation module.
@@ -57,3 +58,4 @@ function translation_node_overview($node
   drupal_set_title(t('Translations of %title', array('%title' => $node->title)));
   return theme('table', $header, $rows);
 }
+
Index: modules/trigger/trigger.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.admin.inc,v
retrieving revision 1.5
diff -u -p -r1.5 trigger.admin.inc
--- modules/trigger/trigger.admin.inc	8 Jan 2008 10:35:43 -0000	1.5
+++ modules/trigger/trigger.admin.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: trigger.admin.inc,v 1.5 2008/01/08 10:35:43 goba Exp $
 
+
 /**
  * @file
  * Admin page callbacks for the trigger module.
@@ -11,6 +12,7 @@
  *
  * @param $type
  *   Name of hook.
+ *
  * @return
  *   HTML form.
  */
@@ -84,7 +86,7 @@ function trigger_unassign_submit($form, 
     $aid = actions_function_lookup($form_values['aid']);
     db_query("DELETE FROM {trigger_assignments} WHERE hook = '%s' AND op = '%s' AND aid = '%s'", $form_values['hook'], $form_values['operation'], $aid);
     $actions = actions_get_all_actions();
-    watchdog('actions', 'Action %action has been unassigned.',  array('%action' => check_plain($actions[$aid]['description'])));
+    watchdog('actions', 'Action %action has been unassigned.', array('%action' => check_plain($actions[$aid]['description'])));
     drupal_set_message(t('Action %action has been unassigned.', array('%action' => $actions[$aid]['description'])));
     $hook = $form_values['hook'] == 'nodeapi' ? 'node' : $form_values['hook'];
     $form_state['redirect'] = 'admin/build/trigger/'. $hook;
@@ -105,6 +107,7 @@ function trigger_unassign_submit($form, 
  *   The name of the hook operation, e.g., 'insert'.
  * @param $description
  *   A plain English description of what this hook operation does.
+ *
  * @return
  *
  * @ingoup forms
@@ -142,8 +145,8 @@ function trigger_assign_form($form_state
   $form[$op] = array(
     '#type' => 'fieldset',
     '#title' => t('Trigger: ') . $description,
-    '#theme' => 'trigger_display'
-    );
+    '#theme' => 'trigger_display',
+  );
   // Retrieve actions that are already assigned to this hook-op combination.
   $actions = _trigger_get_hook_actions($hook, $op);
   $form[$op]['assigned']['#type'] = 'value';
@@ -151,7 +154,7 @@ function trigger_assign_form($form_state
   foreach ($actions as $aid => $description) {
     $form[$op]['assigned']['#value'][$aid] = array(
       'description' => $description,
-      'link' => l(t('unassign'), "admin/build/trigger/unassign/$hook/$op/". md5($aid))
+      'link' => l(t('unassign'), "admin/build/trigger/unassign/$hook/$op/". md5($aid)),
     );
   }
 
@@ -168,12 +171,12 @@ function trigger_assign_form($form_state
     );
     $form[$op]['parent']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Assign')
+      '#value' => t('Assign'),
     );
   }
   else {
     $form[$op]['none'] = array(
-      '#value' => t('No available actions for this trigger.')
+      '#value' => t('No available actions for this trigger.'),
     );
   }
   return $form;
@@ -226,6 +229,7 @@ function trigger_assign_form_submit($for
  *
  * @param array $element
  *   The fieldset including all assigned actions.
+ *
  * @return
  *   The rendered form with the table prepended.
  *
@@ -240,7 +244,7 @@ function theme_trigger_display($element)
     foreach ($element['assigned']['#value'] as $aid => $info) {
       $rows[] = array(
         $info['description'],
-        $info['link']
+        $info['link'],
       );
     }
   }
@@ -254,7 +258,6 @@ function theme_trigger_display($element)
   return $output;
 }
 
-
 /**
  * Get the actions that have already been defined for this
  * type-hook-op combination.
@@ -267,6 +270,7 @@ function theme_trigger_display($element)
  * @param $op
  *   The hook operation for which the actions have been assigned,
  *   e.g., 'view'.
+ *
  * @return
  *   An array of action descriptions keyed by action IDs.
  */
@@ -283,3 +287,4 @@ function _trigger_get_hook_actions($hook
   }
   return $actions;
 }
+
Index: modules/trigger/trigger.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.install,v
retrieving revision 1.5
diff -u -p -r1.5 trigger.install
--- modules/trigger/trigger.install	28 Dec 2007 12:02:52 -0000	1.5
+++ modules/trigger/trigger.install	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: trigger.install,v 1.5 2007/12/28 12:02:52 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -60,4 +61,3 @@ function trigger_schema() {
   return $schema;
 }
 
-
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.13
diff -u -p -r1.13 trigger.module
--- modules/trigger/trigger.module	21 Jan 2008 20:08:15 -0000	1.13
+++ modules/trigger/trigger.module	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: trigger.module,v 1.13 2008/01/21 20:08:15 goba Exp $
 
+
 /**
  * @file
  * Enables functions to be stored and executed at a later time when
@@ -15,14 +16,19 @@ function trigger_help($path, $arg) {
   switch ($path) {
     case 'admin/build/trigger/comment':
       return $explanation .'<p>'. t('Below you can assign actions to run when certain comment-related triggers happen. For example, you could promote a post to the front page when a comment is added.') .'</p>';
+
     case 'admin/build/trigger/node':
       return $explanation .'<p>'. t('Below you can assign actions to run when certain content-related triggers happen. For example, you could send an e-mail to an administrator when a post is created or updated.') .'</p>';
+
     case 'admin/build/trigger/cron':
       return $explanation .'<p>'. t('Below you can assign actions to run during each pass of a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status'))) .'</p>';
+
     case 'admin/build/trigger/taxonomy':
       return $explanation .'<p>'. t('Below you can assign actions to run when certain taxonomy-related triggers happen. For example, you could send an e-mail to an administrator when a term is deleted.') .'</p>';
+
     case 'admin/build/trigger/user':
       return $explanation .'<p>'. t("Below you can assign actions to run when certain user-related triggers happen. For example, you could send an e-mail to an administrator when a user account is deleted.") .'</p>';
+
     case 'admin/help#trigger':
       $output = '<p>'. t('The Trigger module provides the ability to trigger <a href="@actions">actions</a> upon system events, such as when new content is added or when a user logs in.', array('@actions' => url('admin/settings/actions'))) .'</p>';
       $output .= '<p>'. t('The combination of actions and triggers can perform many useful tasks, such as e-mailing an administrator if a user account is deleted, or automatically unpublishing comments that contain certain words. By default, there are five "contexts" of events (Comments, Content, Cron, Taxonomy, and Users), but more may be added by additional modules.') .'</p>';
@@ -134,6 +140,7 @@ function trigger_access_check($module) {
  * @param $op
  *   The name of the operation being executed. Defaults to an empty string
  *   because some hooks (e.g., hook_cron()) do not have operations.
+ *
  * @return
  *   An array of action IDs.
  */
@@ -186,6 +193,7 @@ function trigger_forms() {
  *   The type of action that is about to be called.
  * @param $node
  *   The node that was passed via the nodeapi hook.
+ *
  * @return
  *   The object expected by the action that is about to be called.
  */
@@ -198,6 +206,7 @@ function _trigger_normalize_node_context
 
     // An action that works on users is being called in a node context.
     // Load the user object of the node's author.
+
     case 'user':
       return user_load(array('uid' => $node->uid));
   }
@@ -255,16 +264,19 @@ function trigger_nodeapi(&$node, $op, $a
  *   The type of action that is about to be called.
  * @param $comment
  *   The comment that was passed via the comment hook.
+ *
  * @return
  *   The object expected by the action that is about to be called.
  */
 function _trigger_normalize_comment_context($type, $comment) {
   switch ($type) {
     // An action that works with nodes is being called in a comment context.
+
     case 'node':
       return node_load(is_array($comment) ? $comment['nid'] : $comment->nid);
 
     // An action that works on users is being called in a comment context.
+
     case 'user':
       return user_load(array('uid' => is_array($comment) ? $comment['uid'] : $comment->uid));
   }
@@ -330,6 +342,7 @@ function trigger_cron() {
  *   The type of action that is about to be called.
  * @param $account
  *   The account object that was passed via the user hook.
+ *
  * @return
  *   The object expected by the action that is about to be called.
  */
@@ -342,6 +355,7 @@ function _trigger_normalize_user_context
 
     // An action that works with nodes is being called in a user context.
     // If a single node is being viewed, return the node.
+
     case 'node':
       // If we are viewing an individual node, return the node.
       if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
@@ -364,7 +378,7 @@ function trigger_user($op, &$edit, &$acc
   $context = array(
     'hook' => 'user',
     'op' => $op,
-    'form_values' => &$edit,
+    'form_values' => & $edit,
   );
   foreach ($aids as $aid => $action_info) {
     if ($action_info['type'] != 'user') {
@@ -390,7 +404,7 @@ function trigger_taxonomy($op, $type, $a
   $aids = _trigger_get_hook_aids('taxonomy', $op);
   $context = array(
     'hook' => 'taxonomy',
-    'op' => $op
+    'op' => $op,
   );
   foreach ($aids as $aid => $action_info) {
     $taxonomy_object = (object) $array;
@@ -404,6 +418,7 @@ function trigger_taxonomy($op, $type, $a
  *
  * @param $type
  *   One of 'node', 'user', 'comment'.
+ *
  * @return
  *   Array keyed by action ID.
  */
@@ -429,3 +444,4 @@ function trigger_options($type = 'all') 
 function trigger_actions_delete($aid) {
   db_query("DELETE FROM {trigger_assignments} WHERE aid = '%s'", $aid);
 }
+
Index: modules/update/update.compare.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v
retrieving revision 1.4
diff -u -p -r1.4 update.compare.inc
--- modules/update/update.compare.inc	17 Jan 2008 12:03:21 -0000	1.4
+++ modules/update/update.compare.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.compare.inc,v 1.4 2008/01/17 12:03:21 goba Exp $
 
+
 /**
  * @file
  * Code required only when comparing available updates to existing data.
@@ -152,9 +153,9 @@ function update_process_project_info(&$p
     }
     else {
       // No version info available at all.
-      $install_type = 'unknown';
+      $install_type    = 'unknown';
       $info['version'] = t('Unknown');
-      $info['major'] = -1;
+      $info['major']   = -1;
     }
 
     // Finally, save the results we care about into the $projects array.
@@ -253,6 +254,7 @@ function update_calculate_project_data($
               'data' => t('This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately disabling everything included by this project is strongly recommended!'),
             );
             break;
+
           case 'unpublished':
           case 'revoked':
             $projects[$project]['status'] = UPDATE_REVOKED;
@@ -265,6 +267,7 @@ function update_calculate_project_data($
               'data' => t('This project has been revoked, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
             );
             break;
+
           case 'unsupported':
             $projects[$project]['status'] = UPDATE_NOT_SUPPORTED;
             if (empty($projects[$project]['extra'])) {
@@ -276,6 +279,7 @@ function update_calculate_project_data($
               'data' => t('This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
             );
             break;
+
           default:
             // Assume anything else (e.g. 'published') is valid and we should
             // perform the rest of the logic in this function.
@@ -346,7 +350,8 @@ function update_calculate_project_data($
         // First, if this is the existing release, check a few conditions.
         if ($projects[$project]['existing_version'] == $version) {
           if (isset($release['terms']['Release type']) &&
-              in_array('Insecure', $release['terms']['Release type'])) {
+            in_array('Insecure', $release['terms']['Release type'])
+          ) {
             $projects[$project]['status'] = UPDATE_NOT_SECURE;
           }
           elseif ($release['status'] == 'unpublished') {
@@ -361,7 +366,8 @@ function update_calculate_project_data($
             );
           }
           elseif (isset($release['terms']['Release type']) &&
-                  in_array('Unsupported', $release['terms']['Release type'])) {
+            in_array('Unsupported', $release['terms']['Release type'])
+          ) {
             $projects[$project]['status'] = UPDATE_NOT_SUPPORTED;
             if (empty($projects[$project]['extra'])) {
               $projects[$project]['extra'] = array();
@@ -376,16 +382,20 @@ function update_calculate_project_data($
 
         // Otherwise, ignore unpublished, insecure, or unsupported releases.
         if ($release['status'] == 'unpublished' ||
-            (isset($release['terms']['Release type']) &&
-             (in_array('Insecure', $release['terms']['Release type']) ||
-              in_array('Unsupported', $release['terms']['Release type'])))) {
+          (isset($release['terms']['Release type']) &&
+            (in_array('Insecure', $release['terms']['Release type']) ||
+              in_array('Unsupported', $release['terms']['Release type'])
+            )
+          )
+        ) {
           continue;
         }
 
         // See if this is a higher major version than our target and yet still
         // supported. If so, record it as an "Also available" release.
         if ($release['version_major'] > $target_major &&
-            in_array($release['version_major'], $supported_majors)) {
+          in_array($release['version_major'], $supported_majors)
+        ) {
           if (!isset($available[$project]['also'])) {
             $available[$project]['also'] = array();
           }
@@ -405,23 +415,26 @@ function update_calculate_project_data($
         // Look for the 'latest version' if we haven't found it yet. Latest is
         // defined as the most recent version for the target major version.
         if (!isset($available[$project]['latest_version'])
-            && $release['version_major'] == $target_major) {
+          && $release['version_major'] == $target_major
+        ) {
           $available[$project]['latest_version'] = $version;
         }
 
         // Look for the development snapshot release for this branch.
         if (!isset($available[$project]['dev_version'])
-            && $release['version_major'] == $target_major
-            && isset($release['version_extra'])
-            && $release['version_extra'] == 'dev') {
+          && $release['version_major'] == $target_major
+          && isset($release['version_extra'])
+          && $release['version_extra'] == 'dev'
+        ) {
           $available[$project]['dev_version'] = $version;
         }
 
         // Look for the 'recommended' version if we haven't found it yet (see
         // phpdoc at the top of this function for the definition).
         if (!isset($available[$project]['recommended'])
-            && $release['version_major'] == $target_major
-            && isset($release['version_patch'])) {
+          && $release['version_major'] == $target_major
+          && isset($release['version_patch'])
+        ) {
           if ($patch != $release['version_patch']) {
             $patch = $release['version_patch'];
             $version_patch_changed = $release['version'];
@@ -455,7 +468,8 @@ function update_calculate_project_data($
 
         // See if this release is a security update.
         if (isset($release['terms']['Release type'])
-            && in_array('Security update', $release['terms']['Release type'])) {
+          && in_array('Security update', $release['terms']['Release type'])
+        ) {
           $projects[$project]['security updates'][] = $release;
         }
       }
@@ -545,3 +559,4 @@ function update_calculate_project_data($
   drupal_alter('update_status', $projects);
   return $projects;
 }
+
Index: modules/update/update.fetch.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.fetch.inc,v
retrieving revision 1.5
diff -u -p -r1.5 update.fetch.inc
--- modules/update/update.fetch.inc	20 Dec 2007 08:57:55 -0000	1.5
+++ modules/update/update.fetch.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.fetch.inc,v 1.5 2007/12/20 08:57:55 goba Exp $
 
+
 /**
  * @file
  * Code required only when fetching information about available updates.
@@ -27,9 +28,9 @@ function _update_refresh() {
   include_once './modules/update/update.compare.inc';
 
   $available = array();
-  $data = array();
-  $site_key = md5($base_url . drupal_get_private_key());
-  $projects = update_get_projects();
+  $data      = array();
+  $site_key  = md5($base_url . drupal_get_private_key());
+  $projects  = update_get_projects();
 
   foreach ($projects as $key => $project) {
     $url = _update_build_fetch_url($project, $site_key);
@@ -107,7 +108,8 @@ function _update_cron_notify() {
   foreach (array('core', 'contrib') as $report_type) {
     $type = 'update_'. $report_type;
     if (isset($status[$type]['severity'])
-        && $status[$type]['severity'] == REQUIREMENT_ERROR) {
+      && $status[$type]['severity'] == REQUIREMENT_ERROR
+    ) {
       $params[$report_type] = $status[$type]['reason'];
     }
   }
@@ -163,11 +165,13 @@ class update_xml_parser {
         $this->current_project = array();
         $this->current_object = &$this->current_project;
         break;
+
       case 'RELEASE':
         unset($this->current_object);
         $this->current_release = array();
         $this->current_object = &$this->current_release;
         break;
+
       case 'TERM':
         unset($this->current_object);
         $this->current_term = array();
@@ -183,13 +187,16 @@ class update_xml_parser {
         $this->projects[$this->current_project['short_name']] = $this->current_project;
         $this->current_project = array();
         break;
+
       case 'RELEASE':
         unset($this->current_object);
         $this->current_project['releases'][$this->current_release['version']] = $this->current_release;
         break;
+
       case 'RELEASES':
         $this->current_object = &$this->current_project;
         break;
+
       case 'TERM':
         unset($this->current_object);
         $term_name = $this->current_term['name'];
@@ -201,9 +208,11 @@ class update_xml_parser {
         }
         $this->current_release['terms'][$term_name][] = $this->current_term['value'];
         break;
+
       case 'TERMS':
         $this->current_object = &$this->current_release;
         break;
+
       default:
         $this->current_object[strtolower($this->current_tag)] = trim($this->current_object[strtolower($this->current_tag)]);
         $this->current_tag = '';
@@ -222,3 +231,4 @@ class update_xml_parser {
     }
   }
 }
+
Index: modules/update/update.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.install,v
retrieving revision 1.3
diff -u -p -r1.3 update.install
--- modules/update/update.install	10 Oct 2007 11:39:34 -0000	1.3
+++ modules/update/update.install	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.install,v 1.3 2007/10/10 11:39:34 goba Exp $
 
+
 /**
  * Implementation of hook_install().
  */
Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.14
diff -u -p -r1.14 update.module
--- modules/update/update.module	17 Jan 2008 12:03:21 -0000	1.14
+++ modules/update/update.module	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.module,v 1.14 2008/01/17 12:03:21 goba Exp $
 
+
 /**
  * @file
  * The "Update status" module checks for available updates of Drupal core and
@@ -51,7 +52,6 @@ define('UPDATE_NOT_CHECKED', -1);
  */
 define('UPDATE_UNKNOWN', -2);
 
-
 /**
  * Implementation of hook_help().
  */
@@ -61,6 +61,7 @@ function update_help($path, $arg) {
       $output = '<p>'. t('Here you can find information about available updates for your installed modules and themes. Note that each module or theme is part of a "project", which may or may not have the same name, and might include multiple modules or themes within it.') .'</p>';
       $output .= '<p>'. t('To extend the functionality or to change the look of your site, a number of contributed <a href="@modules">modules</a> and <a href="@themes">themes</a> are available.', array('@modules' => 'http://drupal.org/project/modules', '@themes' => 'http://drupal.org/project/themes')) .'</p>';
       return $output;
+
     case 'admin/build/themes':
     case 'admin/build/modules':
       include_once './includes/install.inc';
@@ -94,19 +95,20 @@ function update_help($path, $arg) {
       // Otherwise, if we're on *any* admin page and there's a security
       // update missing, print an error message about it.
       if (arg(0) == 'admin' && strpos($path, '#') === FALSE
-          && user_access('administer site configuration')) {
+        && user_access('administer site configuration')
+      ) {
         include_once './includes/install.inc';
         $status = update_requirements('runtime');
         foreach (array('core', 'contrib') as $report_type) {
           $type = 'update_'. $report_type;
           if (isset($status[$type])
-              && isset($status[$type]['reason'])
-              && $status[$type]['reason'] === UPDATE_NOT_SECURE) {
+            && isset($status[$type]['reason'])
+            && $status[$type]['reason'] === UPDATE_NOT_SECURE
+          ) {
             drupal_set_message($status[$type]['description'], 'error');
           }
         }
       }
-
   }
 }
 
@@ -255,21 +257,26 @@ function _update_requirement_check($proj
     case UPDATE_NOT_SECURE:
       $requirement['value'] = t('Not secure!');
       break;
+
     case UPDATE_REVOKED:
       $requirement['value'] = t('Revoked!');
       break;
+
     case UPDATE_NOT_SUPPORTED:
       $requirement['value'] = t('Unsupported release');
       break;
+
     case UPDATE_NOT_CURRENT:
       $requirement['value'] = t('Out of date');
       $requirement['severity'] = variable_get('update_notification_threshold', 'all') == 'all' ? REQUIREMENT_ERROR : REQUIREMENT_WARNING;
       break;
+
     case UPDATE_UNKNOWN:
     case UPDATE_NOT_CHECKED:
       $requirement['value'] = isset($project['reason']) ? $project['reason'] : t('Can not determine status');
       $requirement['severity'] = REQUIREMENT_WARNING;
       break;
+
     default:
       $requirement['value'] = t('Up to date');
   }
@@ -300,7 +307,7 @@ function update_cron() {
  * @see update_invalidate_cache()
  */
 function update_form_alter(&$form, $form_state, $form_id) {
-  if ($form_id == 'system_modules' || $form_id == 'system_themes' ) {
+  if ($form_id == 'system_modules' || $form_id == 'system_themes') {
     $form['#submit'][] = 'update_invalidate_cache';
   }
 }
@@ -311,9 +318,9 @@ function update_form_alter(&$form, $form
 function _update_no_data() {
   $destination = drupal_get_destination();
   return t('No information is available about potential new releases for currently installed modules and themes. To check for updates, you may need to <a href="@run_cron">run cron</a> or you can <a href="@check_manually">check manually</a>. Please note that checking for available updates can take a long time, so please be patient.', array(
-    '@run_cron' => url('admin/reports/status/run-cron', array('query' => $destination)),
-    '@check_manually' => url('admin/reports/updates/check', array('query' => $destination)),
-  ));
+      '@run_cron' => url('admin/reports/status/run-cron', array('query' => $destination)),
+      '@check_manually' => url('admin/reports/updates/check', array('query' => $destination)),
+    ));
 }
 
 /**
@@ -342,8 +349,8 @@ function update_get_available($refresh =
   // First, make sure that none of the .info files have a change time
   // newer than the last time we checked for available updates.
   $needs_refresh = FALSE;
-  $last_check = variable_get('update_last_check', 0);
-  $projects = update_get_projects();
+  $last_check    = variable_get('update_last_check', 0);
+  $projects      = update_get_projects();
   foreach ($projects as $key => $project) {
     if ($project['info']['_info_file_ctime'] > $last_check) {
       $needs_refresh = TRUE;
@@ -351,7 +358,8 @@ function update_get_available($refresh =
     }
   }
   if (!$needs_refresh && ($cache = cache_get('update_info', 'cache_update'))
-       && $cache->expire > time()) {
+    && $cache->expire > time()
+  ) {
     $available = $cache->data;
   }
   elseif ($needs_refresh || $refresh) {
@@ -435,6 +443,7 @@ function update_mail($key, &$message, $p
  *   Boolean that controls if a link to the updates report should be added.
  * @param $language
  *   An optional language object to use.
+ *
  * @return
  *   The properly translated error message for the given key.
  */
@@ -511,3 +520,4 @@ function _update_project_status_sort($a,
   $b_status = $b['status'] > 0 ? $b['status'] : (-10 * $b['status']);
   return $a_status - $b_status;
 }
+
Index: modules/update/update.report.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.report.inc,v
retrieving revision 1.8
diff -u -p -r1.8 update.report.inc
--- modules/update/update.report.inc	10 Jan 2008 14:14:54 -0000	1.8
+++ modules/update/update.report.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.report.inc,v 1.8 2008/01/10 14:14:54 goba Exp $
 
+
 /**
  * @file
  * Code required only when rendering the available updates report.
@@ -47,12 +48,14 @@ function theme_update_report($data) {
         $class = 'ok';
         $icon = theme('image', 'misc/watchdog-ok.png');
         break;
+
       case UPDATE_NOT_SECURE:
       case UPDATE_REVOKED:
       case UPDATE_NOT_SUPPORTED:
       case UPDATE_NOT_CURRENT:
         if ($notification_level == 'all'
-            || $project['status'] != UPDATE_NOT_CURRENT) {
+          || $project['status'] != UPDATE_NOT_CURRENT
+        ) {
           $class = 'error';
           $icon = theme('image', 'misc/watchdog-error.png');
           break;
@@ -69,18 +72,23 @@ function theme_update_report($data) {
       case UPDATE_NOT_SECURE:
         $row .= '<span class="security-error">'. t('Security update required!') .'</span>';
         break;
+
       case UPDATE_REVOKED:
         $row .= '<span class="revoked">'. t('Revoked!') .'</span>';
         break;
+
       case UPDATE_NOT_SUPPORTED:
         $row .= '<span class="not-supported">'. t('Not supported!') .'</span>';
         break;
+
       case UPDATE_NOT_CURRENT:
         $row .= '<span class="not-current">'. t('Update available') .'</span>';
         break;
+
       case UPDATE_CURRENT:
         $row .= '<span class="current">'. t('Up to date') .'</span>';
         break;
+
       default:
         $row .= check_plain($project['reason']);
         break;
@@ -124,14 +132,16 @@ function theme_update_report($data) {
           // Apply an extra class if we're displaying both a recommended
           // version and anything else for an extra visual hint.
           if ($project['recommended'] != $project['latest_version']
-              || !empty($project['also'])
-              || ($project['install_type'] == 'dev'
-                 && isset($project['dev_version'])
-                 && $project['latest_version'] != $project['dev_version']
-                 && $project['recommended'] != $project['dev_version'])
-              || (isset($project['security updates'][0])
-                 && $project['recommended'] != $project['security updates'][0])
-              ) {
+            || !empty($project['also'])
+            || ($project['install_type'] == 'dev'
+              && isset($project['dev_version'])
+              && $project['latest_version'] != $project['dev_version']
+              && $project['recommended'] != $project['dev_version']
+            )
+            || (isset($project['security updates'][0])
+              && $project['recommended'] != $project['security updates'][0]
+            )
+          ) {
             $version_class .= ' version-recommended-strong';
           }
           $row .= theme('update_version', $project['releases'][$project['recommended']], t('Recommended version:'), $version_class);
@@ -149,9 +159,10 @@ function theme_update_report($data) {
         $row .= theme('update_version', $project['releases'][$project['latest_version']], t('Latest version:'), 'version-latest');
       }
       if ($project['install_type'] == 'dev'
-          && $project['status'] != UPDATE_CURRENT
-          && isset($project['dev_version'])
-          && $project['recommended'] != $project['dev_version']) {
+        && $project['status'] != UPDATE_CURRENT
+        && isset($project['dev_version'])
+        && $project['recommended'] != $project['dev_version']
+      ) {
         $row .= theme('update_version', $project['releases'][$project['dev_version']], t('Development version:'), 'version-latest');
       }
     }
@@ -162,18 +173,20 @@ function theme_update_report($data) {
       }
     }
 
-    $row .= "</div>\n"; // versions div.
+    // versions div.
+    $row .= "</div>\n";
 
     $row .= "<div class=\"info\">\n";
     if (!empty($project['extra'])) {
-      $row .= '<div class="extra">'."\n";
+      $row .= '<div class="extra">' . "\n";
       foreach ($project['extra'] as $key => $value) {
         $row .= '<div class="'. $value['class'] .'">';
         $row .= check_plain($value['label']) .': ';
         $row .= theme('placeholder', $value['data']);
         $row .= "</div>\n";
       }
-      $row .= "</div>\n";  // extra div.
+      // extra div.
+      $row .= "</div>\n";
     }
 
     $row .= '<div class="includes">';
@@ -181,7 +194,8 @@ function theme_update_report($data) {
     $row .= t('Includes: %includes', array('%includes' => implode(', ', $project['includes'])));
     $row .= "</div>\n";
 
-    $row .= "</div>\n"; // info div.
+    // info div.
+    $row .= "</div>\n";
 
     if (!isset($rows[$project['project_type']])) {
       $rows[$project['project_type']] = array();
@@ -239,3 +253,4 @@ function theme_update_version($version, 
   $output .= "</table>\n";
   return $output;
 }
+
Index: modules/update/update.settings.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.settings.inc,v
retrieving revision 1.3
diff -u -p -r1.3 update.settings.inc
--- modules/update/update.settings.inc	20 Oct 2007 21:57:50 -0000	1.3
+++ modules/update/update.settings.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: update.settings.inc,v 1.3 2007/10/20 21:57:50 goba Exp $
 
+
 /**
  * @file
  * Code required only for the update status settings form.
@@ -40,7 +41,7 @@ function update_settings() {
       'all' => t('All newer versions'),
       'security' => t('Only security updates'),
     ),
-    '#description' => t('If there are updates available of Drupal core or any of your installed modules and themes, your site will print an error message on the <a href="@status_report">status report</a>, the <a href="@modules_page">modules page</a>, and the <a href="@themes_page">themes page</a>. You can choose to only see these error messages if a security update is available, or to be notified about any newer versions.', array('@status_report' => url('admin/reports/status'), '@modules_page' => url('admin/build/modules'), '@themes_page' => url('admin/build/themes')))
+    '#description' => t('If there are updates available of Drupal core or any of your installed modules and themes, your site will print an error message on the <a href="@status_report">status report</a>, the <a href="@modules_page">modules page</a>, and the <a href="@themes_page">themes page</a>. You can choose to only see these error messages if a security update is available, or to be notified about any newer versions.', array('@status_report' => url('admin/reports/status'), '@modules_page' => url('admin/build/modules'), '@themes_page' => url('admin/build/themes'))),
   );
 
   $form = system_settings_form($form);
@@ -106,3 +107,4 @@ function update_settings_submit($form, $
   }
   system_settings_form_submit($form, $form_state);
 }
+
Index: modules/upload/upload.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.admin.inc,v
retrieving revision 1.7
diff -u -p -r1.7 upload.admin.inc
--- modules/upload/upload.admin.inc	10 Jan 2008 20:22:57 -0000	1.7
+++ modules/upload/upload.admin.inc	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: upload.admin.inc,v 1.7 2008/01/10 20:22:57 goba Exp $
 
+
 /**
  * Form API callback to validate the upload settings form.
  */
@@ -71,7 +72,7 @@ function upload_admin_settings() {
     '#size' => 15,
     '#maxlength' => 10,
     '#description' => t('The maximum allowed image size (e.g. 640x480). Set to 0 for no restriction. If an <a href="!image-toolkit-link">image toolkit</a> is installed, files exceeding this value will be scaled down to fit.', array('!image-toolkit-link' => url('admin/settings/image-toolkit'))),
-    '#field_suffix' => '<kbd>'. t('WIDTHxHEIGHT') .'</kbd>'
+    '#field_suffix' => '<kbd>'. t('WIDTHxHEIGHT') .'</kbd>',
   );
   $form['settings_general']['upload_list_default'] = array(
     '#type' => 'select',
@@ -150,3 +151,4 @@ function upload_admin_settings() {
 
   return system_settings_form($form);
 }
+
Index: modules/upload/upload.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.install,v
retrieving revision 1.6
diff -u -p -r1.6 upload.install
--- modules/upload/upload.install	18 Dec 2007 12:59:22 -0000	1.6
+++ modules/upload/upload.install	21 Jan 2008 21:59:02 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: upload.install,v 1.6 2007/12/18 12:59:22 dries Exp $
 
+
 /**
  * Implementation of hook_install().
  */
@@ -78,4 +79,3 @@ function upload_schema() {
   return $schema;
 }
 
-
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.197
diff -u -p -r1.197 upload.module
--- modules/upload/upload.module	31 Dec 2007 08:46:44 -0000	1.197
+++ modules/upload/upload.module	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: upload.module,v 1.197 2007/12/31 08:46:44 dries Exp $
 
+
 /**
  * @file
  * File-handling and attaching files to nodes.
@@ -17,6 +18,7 @@ function upload_help($path, $arg) {
       $output .= '<p>'. t('Users with the upload files permission can upload attachments to posts. Uploads may be enabled for specific content types on the content types settings page. Each user role can be customized to limit or control the file size of uploads, or the maximum dimension of image files.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@upload">Upload module</a>.', array('@upload' => 'http://drupal.org/handbook/modules/upload/')) .'</p>';
       return $output;
+
     case 'admin/settings/upload':
       return '<p>'. t('Users with the <a href="@permissions">upload files permission</a> can upload attachments. Users with the <a href="@permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="@types">content types settings</a> page.', array('@permissions' => url('admin/user/permissions'), '@types' => url('admin/settings/types'))) .'</p>';
   }
@@ -65,7 +67,7 @@ function upload_link($type, $node = NULL
         'title' => format_plural($num_files, '1 attachment', '@count attachments'),
         'href' => "node/$node->nid",
         'attributes' => array('title' => t('Read full article to view attachments.')),
-        'fragment' => 'attachments'
+        'fragment' => 'attachments',
       );
     }
   }
@@ -105,6 +107,7 @@ function upload_menu_alter(&$items) {
  *
  * @param $user
  *   A Drupal user object.
+ *
  * @return
  *   An associative array with the following keys:
  *     'extensions'
@@ -118,8 +121,8 @@ function upload_menu_alter(&$items) {
  *       A string specifying the maximum resolution of images.
  */
 function _upload_file_limits($user) {
-  $file_limit = variable_get('upload_uploadsize_default', 1);
-  $user_limit = variable_get('upload_usersize_default', 1);
+  $file_limit     = variable_get('upload_uploadsize_default', 1);
+  $user_limit     = variable_get('upload_usersize_default', 1);
   $all_extensions = explode(' ', variable_get('upload_extensions_default', 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'));
   foreach ($user->roles as $rid => $name) {
     $extensions = variable_get("upload_extensions_$rid", variable_get('upload_extensions_default', 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'));
@@ -146,7 +149,7 @@ function _upload_file_limits($user) {
  */
 function upload_file_download($file) {
   if (!user_access('view uploaded files')) {
-    return -1;
+    return - 1;
   }
   $file = file_create_path($file);
   $result = db_query("SELECT f.* FROM {files} f INNER JOIN {upload} u ON f.fid = u.fid WHERE filepath = '%s'", $file);
@@ -251,7 +254,7 @@ function upload_form_alter(&$form, $form
       $temp = file_directory_temp();
       // Note: pass by reference
       if (!file_check_directory($path, FILE_CREATE_DIRECTORY) || !file_check_directory($temp, FILE_CREATE_DIRECTORY)) {
-        $form['attachments']['#description'] =  t('File attachments are disabled. The file directories have not been properly configured.');
+        $form['attachments']['#description'] = t('File attachments are disabled. The file directories have not been properly configured.');
         if (user_access('administer site configuration')) {
           $form['attachments']['#description'] .= ' '. t('Please visit the <a href="@admin-file-system">file system configuration page</a>.', array('@admin-file-system' => url('admin/settings/file-system')));
         }
@@ -273,7 +276,6 @@ function upload_form_alter(&$form, $form
  */
 function upload_nodeapi(&$node, $op, $teaser) {
   switch ($op) {
-
     case 'load':
       $output = '';
       if (variable_get("upload_$node->type", 1) == 1) {
@@ -342,9 +344,9 @@ function upload_nodeapi(&$node, $op, $te
               'attributes' => array(
                 'url' => file_create_url($file->filepath),
                 'length' => $file->filesize,
-                'type' => $file->filemime
-              )
-            )
+                'type' => $file->filemime,
+              ),
+            ),
           );
         }
       }
@@ -363,8 +365,8 @@ function theme_upload_attachments($files
   foreach ($files as $file) {
     $file = (object)$file;
     if ($file->list && empty($file->remove)) {
-      $href = file_create_url($file->filepath);
-      $text = $file->description ? $file->description : $file->filename;
+      $href   = file_create_url($file->filepath);
+      $text   = $file->description ? $file->description : $file->filename;
       $rows[] = array(l($text, $href), format_size($file->filesize));
     }
   }
@@ -378,6 +380,7 @@ function theme_upload_attachments($files
  *
  * @param $uid
  *   The integer user id of a user.
+ *
  * @return
  *   The amount of disk space used by the user in bytes.
  */
@@ -489,10 +492,10 @@ function _upload_form($node) {
       $file = (object)$file;
       $description = file_create_url($file->filepath);
       $description = "<small>". check_plain($description) ."</small>";
-      $form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description );
+      $form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description);
       $form['files'][$key]['size'] = array('#value' => format_size($file->filesize));
       $form['files'][$key]['remove'] = array('#type' => 'checkbox', '#default_value' => !empty($file->remove));
-      $form['files'][$key]['list'] = array('#type' => 'checkbox',  '#default_value' => $file->list);
+      $form['files'][$key]['list'] = array('#type' => 'checkbox', '#default_value' => $file->list);
       // If the file was uploaded this page request, set value. this fixes the
       // problem formapi has recognizing new checkboxes. see comments in
       // _upload_prepare.
@@ -500,11 +503,11 @@ function _upload_form($node) {
         $form['files'][$key]['list']['#value'] = variable_get('upload_list_default', 1);
       }
       $form['files'][$key]['weight'] = array('#type' => 'weight', '#delta' => count($node->files), '#default_value' => $file->weight);
-      $form['files'][$key]['filename'] = array('#type' => 'value',  '#value' => $file->filename);
-      $form['files'][$key]['filepath'] = array('#type' => 'value',  '#value' => $file->filepath);
-      $form['files'][$key]['filemime'] = array('#type' => 'value',  '#value' => $file->filemime);
-      $form['files'][$key]['filesize'] = array('#type' => 'value',  '#value' => $file->filesize);
-      $form['files'][$key]['fid'] = array('#type' => 'value',  '#value' => $file->fid);
+      $form['files'][$key]['filename'] = array('#type' => 'value', '#value' => $file->filename);
+      $form['files'][$key]['filepath'] = array('#type' => 'value', '#value' => $file->filepath);
+      $form['files'][$key]['filemime'] = array('#type' => 'value', '#value' => $file->filemime);
+      $form['files'][$key]['filesize'] = array('#type' => 'value', '#value' => $file->filesize);
+      $form['files'][$key]['fid'] = array('#type' => 'value', '#value' => $file->fid);
     }
   }
 
@@ -548,12 +551,12 @@ function theme_upload_form_current(&$for
     // Add class to group weight fields for drag and drop.
     $form[$key]['weight']['#attributes']['class'] = 'upload-weight';
 
-    $row = array('');
-    $row[] = drupal_render($form[$key]['remove']);
-    $row[] = drupal_render($form[$key]['list']);
-    $row[] = drupal_render($form[$key]['description']);
-    $row[] = drupal_render($form[$key]['weight']);
-    $row[] = drupal_render($form[$key]['size']);
+    $row    = array('');
+    $row[]  = drupal_render($form[$key]['remove']);
+    $row[]  = drupal_render($form[$key]['list']);
+    $row[]  = drupal_render($form[$key]['description']);
+    $row[]  = drupal_render($form[$key]['weight']);
+    $row[]  = drupal_render($form[$key]['size']);
     $rows[] = array('data' => $row, 'class' => 'draggable');
   }
   $output = theme('table', $header, $rows, array('id' => 'upload-attachments'));
@@ -638,8 +641,8 @@ function upload_js() {
   );
   drupal_alter('form', $form, array(), 'upload_js');
   $form_state = array('submitted' => FALSE);
-  $form = form_builder('upload_js', $form, $form_state);
-  $output = theme('status_messages') . drupal_render($form);
+  $form       = form_builder('upload_js', $form, $form_state);
+  $output     = theme('status_messages') . drupal_render($form);
 
   // We send the updated file attachments form.
   // Don't call drupal_json(). ahah.js uses an iframe and
@@ -647,3 +650,4 @@ function upload_js() {
   print drupal_to_js(array('status' => TRUE, 'data' => $output));
   exit;
 }
+
Index: modules/user/user-picture.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user-picture.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 user-picture.tpl.php
--- modules/user/user-picture.tpl.php	7 Aug 2007 08:39:36 -0000	1.2
+++ modules/user/user-picture.tpl.php	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user-picture.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
 
+
 /**
  * @file user-picture.tpl.php
  * Default theme implementation to present an picture configured for the
@@ -18,3 +19,4 @@
 <div class="picture">
   <?php print $picture; ?>
 </div>
+
Index: modules/user/user-profile-category.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user-profile-category.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 user-profile-category.tpl.php
--- modules/user/user-profile-category.tpl.php	7 Aug 2007 08:39:36 -0000	1.2
+++ modules/user/user-profile-category.tpl.php	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user-profile-category.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
 
+
 /**
  * @file user-profile-category.tpl.php
  * Default theme implementation to present profile categories (groups of
@@ -25,10 +26,13 @@
  * @see template_preprocess_user_profile_category()
  */
 ?>
-<?php if ($title) : ?>
+
+<?php if ($title):
+?>
   <h3><?php print $title; ?></h3>
 <?php endif; ?>
 
 <dl<?php print $attributes; ?>>
   <?php print $profile_items; ?>
 </dl>
+
Index: modules/user/user-profile-item.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user-profile-item.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 user-profile-item.tpl.php
--- modules/user/user-profile-item.tpl.php	7 Aug 2007 08:39:36 -0000	1.2
+++ modules/user/user-profile-item.tpl.php	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user-profile-item.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
 
+
 /**
  * @file user-profile-item.tpl.php
  * Default theme implementation to present profile items (values from user
@@ -25,3 +26,4 @@
 ?>
 <dt<?php print $attributes; ?>><?php print $title; ?></dt>
 <dd<?php print $attributes; ?>><?php print $value; ?></dd>
+
Index: modules/user/user-profile.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user-profile.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 user-profile.tpl.php
--- modules/user/user-profile.tpl.php	7 Aug 2007 08:39:36 -0000	1.2
+++ modules/user/user-profile.tpl.php	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user-profile.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
 
+
 /**
  * @file user-profile.tpl.php
  * Default theme implementation to present all user profile data.
@@ -44,3 +45,4 @@
 <div class="profile">
   <?php print $user_profile; ?>
 </div>
+
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.18
diff -u -p -r1.18 user.admin.inc
--- modules/user/user.admin.inc	16 Jan 2008 22:54:41 -0000	1.18
+++ modules/user/user.admin.inc	21 Jan 2008 21:59:03 -0000
@@ -1,11 +1,11 @@
 <?php
 // $Id: user.admin.inc,v 1.18 2008/01/16 22:54:41 goba Exp $
 
+
 /**
  * @file
  * Admin page callback file for the user module.
  */
-
 function user_admin($callback_arg = '') {
   $op = isset($_POST['op']) ? $_POST['op'] : $callback_arg;
 
@@ -14,6 +14,7 @@ function user_admin($callback_arg = '') 
     case 'create':
       $output = drupal_get_form('user_register');
       break;
+
     default:
       if (!empty($_POST['accounts']) && isset($_POST['operation']) && ($_POST['operation'] == 'delete')) {
         $output = drupal_get_form('user_multiple_delete_confirm');
@@ -47,7 +48,7 @@ function user_filter_form() {
     list($type, $value) = $filter;
     // Merge an array of arrays into one if necessary.
     $options = $type == 'permission' ? call_user_func_array('array_merge', $filters[$type]['options']) : $filters[$type]['options'];
-    $params = array('%property' => $filters[$type]['title'] , '%value' => $options[$value]);
+    $params = array('%property' => $filters[$type]['title'], '%value' => $options[$value]);
     if ($i++ > 0) {
       $form['filters']['current'][] = array('#value' => t('<em>and</em> where <strong>%property</strong> is <strong>%value</strong>', $params));
     }
@@ -95,7 +96,8 @@ function user_filter_form_submit($form, 
   $op = $form_state['values']['op'];
   $filters = user_filters();
   switch ($op) {
-    case t('Filter'): case t('Refine'):
+    case t('Filter'):
+    case t('Refine'):
       if (isset($form_state['values']['filter'])) {
         $filter = $form_state['values']['filter'];
         // Merge an array of arrays into one if necessary.
@@ -105,12 +107,15 @@ function user_filter_form_submit($form, 
         }
       }
       break;
+
     case t('Undo'):
       array_pop($_SESSION['user_overview_filter']);
       break;
+
     case t('Reset'):
       $_SESSION['user_overview_filter'] = array();
       break;
+
     case t('Update'):
       return;
   }
@@ -136,7 +141,7 @@ function user_admin_account() {
     t('Roles'),
     array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
     array('data' => t('Last access'), 'field' => 'u.access'),
-    t('Operations')
+    t('Operations'),
   );
 
   $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
@@ -166,13 +171,13 @@ function user_admin_account() {
 
   $destination = drupal_get_destination();
 
-  $status = array(t('blocked'), t('active'));
-  $roles = user_roles(TRUE);
+  $status   = array(t('blocked'), t('active'));
+  $roles    = user_roles(TRUE);
   $accounts = array();
   while ($account = db_fetch_object($result)) {
     $accounts[$account->uid] = '';
     $form['name'][$account->uid] = array('#value' => theme('username', $account));
-    $form['status'][$account->uid] =  array('#value' => $status[$account->status]);
+    $form['status'][$account->uid] = array('#value' => $status[$account->status]);
     $users_roles = array();
     $roles_result = db_query('SELECT rid FROM {users_roles} WHERE uid = %d', $account->uid);
     while ($user_role = db_fetch_object($roles_result)) {
@@ -181,12 +186,12 @@ function user_admin_account() {
     asort($users_roles);
     $form['roles'][$account->uid][0] = array('#value' => theme('item_list', $users_roles));
     $form['member_for'][$account->uid] = array('#value' => format_interval(time() - $account->created));
-    $form['last_access'][$account->uid] =  array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never'));
+    $form['last_access'][$account->uid] = array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never'));
     $form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)));
   }
   $form['accounts'] = array(
     '#type' => 'checkboxes',
-    '#options' => $accounts
+    '#options' => $accounts,
   );
   $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
 
@@ -270,7 +275,7 @@ function user_admin_settings() {
     '#title' => t('Welcome, no approval required'),
     '#collapsible' => TRUE,
     '#collapsed' => (variable_get('user_register', 1) != 1),
-    '#description' => t('Customize welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') .' '. $email_token_help
+    '#description' => t('Customize welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') .' '. $email_token_help,
   );
   $form['email']['no_approval_required']['user_mail_register_no_approval_required_subject'] = array(
     '#type' => 'textfield',
@@ -830,6 +835,7 @@ function user_admin_access_check_submit(
         drupal_set_message(t('The username %name is allowed.', array('%name' => $form_state['values']['test'])));
       }
       break;
+
     case 'mail':
       if (drupal_is_denied('mail', $form_state['values']['test'])) {
         drupal_set_message(t('The e-mail address %mail is not allowed.', array('%mail' => $form_state['values']['test'])));
@@ -838,6 +844,7 @@ function user_admin_access_check_submit(
         drupal_set_message(t('The e-mail address %mail is allowed.', array('%mail' => $form_state['values']['test'])));
       }
       break;
+
     case 'host':
       if (drupal_is_denied('host', $form_state['values']['test'])) {
         drupal_set_message(t('The hostname %host is not allowed.', array('%host' => $form_state['values']['test'])));
@@ -846,6 +853,7 @@ function user_admin_access_check_submit(
         drupal_set_message(t('The hostname %host is allowed.', array('%host' => $form_state['values']['test'])));
       }
       break;
+
     default:
       break;
   }
@@ -861,14 +869,15 @@ function user_admin_access_delete_confir
   $access_types = array('user' => t('username'), 'mail' => t('e-mail'), 'host' => t('host'));
   $edit = db_fetch_object(db_query('SELECT aid, type, status, mask FROM {access} WHERE aid = %d', $aid));
 
-  $form = array();
+  $form        = array();
   $form['aid'] = array('#type' => 'hidden', '#value' => $aid);
-  $output = confirm_form($form,
-                  t('Are you sure you want to delete the @type rule for %rule?', array('@type' => $access_types[$edit->type], '%rule' => $edit->mask)),
-                  'admin/user/rules',
-                  t('This action cannot be undone.'),
-                  t('Delete'),
-                  t('Cancel'));
+  $output      = confirm_form($form,
+    t('Are you sure you want to delete the @type rule for %rule?', array('@type' => $access_types[$edit->type], '%rule' => $edit->mask)),
+    'admin/user/rules',
+    t('This action cannot be undone.'),
+    t('Delete'),
+    t('Cancel')
+  );
   return $output;
 }
 
@@ -883,10 +892,10 @@ function user_admin_access_delete_confir
  * Menu callback: list all access rules
  */
 function user_admin_access() {
-  $header = array(array('data' => t('Access type'), 'field' => 'status'), array('data' => t('Rule type'), 'field' => 'type'), array('data' => t('Mask'), 'field' => 'mask'), array('data' => t('Operations'), 'colspan' => 2));
-  $result = db_query("SELECT aid, type, status, mask FROM {access}". tablesort_sql($header));
+  $header       = array(array('data' => t('Access type'), 'field' => 'status'), array('data' => t('Rule type'), 'field' => 'type'), array('data' => t('Mask'), 'field' => 'mask'), array('data' => t('Operations'), 'colspan' => 2));
+  $result       = db_query("SELECT aid, type, status, mask FROM {access}". tablesort_sql($header));
   $access_types = array('user' => t('username'), 'mail' => t('e-mail'), 'host' => t('host'));
-  $rows = array();
+  $rows         = array();
   while ($rule = db_fetch_object($result)) {
     $rows[] = array($rule->status ? t('allow') : t('deny'), $access_types[$rule->type], $rule->mask, l(t('edit'), 'admin/user/rules/edit/'. $rule->aid), l(t('delete'), 'admin/user/rules/delete/'. $rule->aid));
   }
@@ -910,7 +919,7 @@ function theme_user_admin_account($form)
     t('Roles'),
     array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
     array('data' => t('Last access'), 'field' => 'u.access'),
-    t('Operations')
+    t('Operations'),
   );
 
   $output = drupal_render($form['options']);
@@ -1010,3 +1019,4 @@ function theme_user_filters($form) {
 
   return $output;
 }
+
Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.5
diff -u -p -r1.5 user.install
--- modules/user/user.install	8 Jan 2008 07:46:41 -0000	1.5
+++ modules/user/user.install	21 Jan 2008 21:59:03 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user.install,v 1.5 2008/01/08 07:46:41 goba Exp $
 
+
 /**
  * Implementation of hook_schema().
  */
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.888
diff -u -p -r1.888 user.module
--- modules/user/user.module	16 Jan 2008 22:54:41 -0000	1.888
+++ modules/user/user.module	21 Jan 2008 21:59:04 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user.module,v 1.888 2008/01/16 22:54:41 goba Exp $
 
+
 /**
  * @file
  * Enables the user registration and login system.
@@ -102,6 +103,7 @@ function user_external_load($authname) {
  * @param $edit
  *    The array of form values submitted by the user, if any.
  *    This array is passed to hook_user op login.
+ *
  * @return boolean
  *    TRUE if the login succeeds, FALSE otherwise.
  */
@@ -158,7 +160,7 @@ function user_load($array = array()) {
       $params[] = md5($value);
     }
     else {
-      $query[]= "LOWER($key) = LOWER('%s')";
+      $query[] = "LOWER($key) = LOWER('%s')";
       $params[] = $value;
     }
   }
@@ -283,7 +285,8 @@ function user_save($account, $array = ar
     user_module_invoke('after_update', $array, $user, $category);
   }
   else {
-    if (!isset($array['created'])) {    // Allow 'created' to be set by the caller
+    // Allow 'created' to be set by the caller
+    if (!isset($array['created'])) {
       $array['created'] = time();
     }
     // Consider users created by an administrator as already logged in, so
@@ -300,20 +303,27 @@ function user_save($account, $array = ar
         case 'pass':
           $fields[] = $key;
           $values[] = md5($value);
-          $s[] = "'%s'";
+          $s[]      = "'%s'";
           break;
-        case 'mode':       case 'sort':     case 'timezone':
-        case 'threshold':  case 'created':  case 'access':
-        case 'login':      case 'status':
+
+        case 'mode':
+        case 'sort':
+        case 'timezone':
+        case 'threshold':
+        case 'created':
+        case 'access':
+        case 'login':
+        case 'status':
           $fields[] = $key;
           $values[] = $value;
-          $s[] = "%d";
+          $s[]      = "%d";
           break;
+
         default:
           if (substr($key, 0, 4) !== 'auth' && in_array($key, $user_fields)) {
             $fields[] = $key;
             $values[] = $value;
-            $s[] = "'%s'";
+            $s[]      = "'%s'";
           }
           break;
       }
@@ -324,7 +334,7 @@ function user_save($account, $array = ar
       // must abort to avoid overwirting their account.
       return FALSE;
     }
-    
+
     // Build the initial user object.
     $array['uid'] = db_last_insert_id('users', 'uid');
     $user = user_load(array('uid' => $array['uid']));
@@ -377,16 +387,26 @@ function user_validate_name($name) {
   if (substr($name, -1) == ' ') return t('The username cannot end with a space.');
   if (strpos($name, '  ') !== FALSE) return t('The username cannot contain multiple spaces in a row.');
   if (ereg("[^\x80-\xF7 [:alnum:]@_.-]", $name)) return t('The username contains an illegal character.');
-  if (preg_match('/[\x{80}-\x{A0}'.          // Non-printable ISO-8859-1 + NBSP
-                   '\x{AD}'.                 // Soft-hyphen
-                   '\x{2000}-\x{200F}'.      // Various space characters
-                   '\x{2028}-\x{202F}'.      // Bidirectional text overrides
-                   '\x{205F}-\x{206F}'.      // Various text hinting characters
-                   '\x{FEFF}'.               // Byte order mark
-                   '\x{FF01}-\x{FF60}'.      // Full-width latin
-                   '\x{FFF9}-\x{FFFD}'.      // Replacement characters
-                   '\x{0}]/u',               // NULL byte
-                   $name)) {
+      // Non-printable ISO-8859-1 + NBSP
+  if (preg_match('/[\x{80}-\x{A0}'.
+      // Soft-hyphen
+      '\x{AD}'.
+      // Various space characters
+      '\x{2000}-\x{200F}'.
+      // Bidirectional text overrides
+      '\x{2028}-\x{202F}'.
+      // Various text hinting characters
+      '\x{205F}-\x{206F}'.
+      // Byte order mark
+      '\x{FEFF}'.
+      // Full-width latin
+      '\x{FF01}-\x{FF60}'.
+      // Replacement characters
+      '\x{FFF9}-\x{FFFD}'.
+      // NULL byte
+      '\x{0}]/u',
+      $name
+    )) {
     return t('The username contains an illegal character.');
   }
   if (strpos($name, '@') !== FALSE && !eregi('@([0-9a-z](-?[0-9a-z])*.)+[a-z]{2}([zmuvtg]|fo|me)?$', $name)) return t('The username is not a valid authentication ID.');
@@ -612,7 +632,7 @@ function user_user($type, &$edit, &$acco
       '#weight' => 5,
       '#title' => t('History'),
     );
-    $account->content['summary']['member_for'] =  array(
+    $account->content['summary']['member_for'] = array(
       '#type' => 'user_profile_item',
       '#title' => t('Member for'),
       '#value' => format_interval(time() - $account->created),
@@ -754,11 +774,11 @@ function user_block($op = 'list', $delta
 
           // Perform database queries to gather online user lists.  We use s.timestamp
           // rather than u.access because it is much faster.
-          $anonymous_count = sess_count($interval);
+          $anonymous_count     = sess_count($interval);
           $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
           $authenticated_count = 0;
-          $max_users = variable_get('user_block_max_list_count', 10);
-          $items = array();
+          $max_users           = variable_get('user_block_max_list_count', 10);
+          $items               = array();
           while ($account = db_fetch_object($authenticated_users)) {
             if ($max_users > 0) {
               $items[] = $account;
@@ -852,15 +872,14 @@ function user_register_access() {
 }
 
 function user_view_access($account) {
-  return $account && $account->uid &&
-    (
-      // Always let users view their own profile.
-      ($GLOBALS['user']->uid == $account->uid) ||
-      // Administrators can view all accounts.
-      user_access('administer users') ||
-      // The user is not blocked and logged in at least once.
-      ($account->access && $account->status && user_access('access user profiles'))
-    );
+  return $account && $account->uid && (
+    // Always let users view their own profile.
+    ($GLOBALS['user']->uid == $account->uid) ||
+    // Administrators can view all accounts.
+    user_access('administer users') ||
+    // The user is not blocked and logged in at least once.
+    ($account->access && $account->status && user_access('access user profiles'))
+  );
 }
 
 function user_edit_access($account) {
@@ -1174,7 +1193,7 @@ function user_page_title($account) {
  * array of modules and DA names. Called at external login.
  */
 function user_get_authmaps($authname = NULL) {
-  $result = db_query("SELECT authname, module FROM {authmap} WHERE authname = '%s'", $authname);
+  $result   = db_query("SELECT authname, module FROM {authmap} WHERE authname = '%s'", $authname);
   $authmaps = array();
   $has_rows = FALSE;
   while ($authmap = db_fetch_object($result)) {
@@ -1253,6 +1272,7 @@ function user_login(&$form_state, $msg =
  * @see user_login_name_validate()
  * @see user_login_authenticate_validate()
  * @see user_login_final_validate()
+ *
  * @return array
  *   A simple list of validate functions.
  */
@@ -1311,7 +1331,8 @@ function user_authenticate($form_values 
 
   // Name and pass keys are required.
   if (!empty($form_values['name']) && !empty($form_values['pass']) &&
-      $account = user_load(array('name' => $form_values['name'], 'pass' => trim($form_values['pass']), 'status' => 1))) {
+    $account = user_load(array('name' => $form_values['name'], 'pass' => trim($form_values['pass']), 'status' => 1))
+  ) {
     $user = $account;
     user_authenticate_finalize($form_values);
     return $user;
@@ -1571,33 +1592,47 @@ function _user_mail_text($key, $language
     switch ($key) {
       case 'register_no_approval_required_subject':
         return t('Account details for !username at !site', $variables, $langcode);
+
       case 'register_no_approval_required_body':
         return t("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $variables, $langcode);
+
       case 'register_admin_created_subject':
         return t('An administrator created an account for you at !site', $variables, $langcode);
+
       case 'register_admin_created_body':
         return t("!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $variables, $langcode);
+
       case 'register_pending_approval_subject':
       case 'pending_approval_admin_subject':
         return t('Account details for !username at !site (pending admin approval)', $variables, $langcode);
+
       case 'register_pending_approval_body':
         return t("!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n--  !site team", $variables, $langcode);
+
       case 'register_pending_approval_admin_body':
         return t("!username has applied for an account.\n\n!edit_uri", $variables, $langcode);
+
       case 'password_reset_subject':
         return t('Replacement login information for !username at !site', $variables, $langcode);
+
       case 'password_reset_body':
         return t("!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.", $variables, $langcode);
+
       case 'status_activated_subject':
         return t('Account details for !username at !site (approved)', $variables, $langcode);
+
       case 'status_activated_body':
         return t("!username,\n\nYour account at !site has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\nOnce you have set your own password, you will be able to log in to !login_uri in the future using:\n\nusername: !username\n", $variables, $langcode);
+
       case 'status_blocked_subject':
         return t('Account details for !username at !site (blocked)', $variables, $langcode);
+
       case 'status_blocked_body':
         return t("!username,\n\nYour account on !site has been blocked.", $variables, $langcode);
+
       case 'status_deleted_subject':
         return t('Account details for !username at !site (deleted)', $variables, $langcode);
+
       case 'status_deleted_body':
         return t("!username,\n\nYour account on !site has been deleted.", $variables, $langcode);
     }
@@ -1634,14 +1669,17 @@ function user_roles($membersonly = FALSE
   while ($role = db_fetch_object($result)) {
     switch ($role->rid) {
       // We only translate the built in role names
+
       case DRUPAL_ANONYMOUS_RID:
         if (!$membersonly) {
           $roles[$role->rid] = t($role->name);
         }
         break;
+
       case DRUPAL_AUTHENTICATED_RID:
         $roles[$role->rid] = t($role->name);
         break;
+
       default:
         $roles[$role->rid] = $role->name;
     }
@@ -1671,7 +1709,8 @@ function user_user_operations($form_stat
 
   if (user_access('administer permissions')) {
     $roles = user_roles(TRUE);
-    unset($roles[DRUPAL_AUTHENTICATED_RID]);  // Can't edit authenticated role.
+    // Can't edit authenticated role.
+    unset($roles[DRUPAL_AUTHENTICATED_RID]);
 
     $add_roles = array();
     foreach ($roles as $key => $value) {
@@ -1764,6 +1803,7 @@ function user_multiple_role_edit($accoun
         }
       }
       break;
+
     case 'remove_role':
       foreach ($accounts as $uid) {
         $account = user_load(array('uid' => (int)$uid));
@@ -1789,9 +1829,10 @@ function user_multiple_delete_confirm(&$
   $form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
 
   return confirm_form($form,
-                      t('Are you sure you want to delete these users?'),
-                      'admin/user/user', t('This action cannot be undone.'),
-                      t('Delete all'), t('Cancel'));
+    t('Are you sure you want to delete these users?'),
+    'admin/user/user', t('This action cannot be undone.'),
+    t('Delete all'), t('Cancel')
+  );
 }
 
 function user_multiple_delete_confirm_submit($form, &$form_state) {
@@ -1818,21 +1859,27 @@ function user_help($path, $arg) {
       $output .= '<p>'. t('A visitor accessing your website is assigned a unique ID, or session ID, which is stored in a cookie. The cookie does not contain personal information, but acts as a key to retrieve information from your site. Users should have cookies enabled in their web browser when using your site.') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@user">User module</a>.', array('@user' => 'http://drupal.org/handbook/modules/user/')) .'</p>';
       return $output;
+
     case 'admin/user/user':
       return '<p>'. t('Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.') .'</p>';
+
     case 'admin/user/user/create':
     case 'admin/user/user/account/create':
       return '<p>'. t("This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique.") .'</p>';
+
     case 'admin/user/rules':
       return '<p>'. t('Set up username and e-mail address access rules for new <em>and</em> existing accounts (currently logged in accounts will not be logged out). If a username or e-mail address for an account matches any deny rule, but not an allow rule, then the account will not be allowed to be created or to log in. A host rule is effective for every page view, not just registrations.') .'</p>';
+
     case 'admin/user/permissions':
       return '<p>'. t('Permissions let you control what users can do on your site. Each user role (defined on the <a href="@role">user roles page</a>) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.', array('@role' => url('admin/user/roles'))) .'</p>';
+
     case 'admin/user/roles':
       return t('<p>Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in <a href="@permissions">user permissions</a>. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the <em>role names</em> of the various roles. To delete a role choose "edit".</p><p>By default, Drupal comes with two user roles:</p>
       <ul>
       <li>Anonymous user: this role is used for users that don\'t have a user account or that are not authenticated.</li>
       <li>Authenticated user: this role is automatically granted to all logged in users.</li>
       </ul>', array('@permissions' => url('admin/user/permissions')));
+
     case 'admin/user/search':
       return '<p>'. t('Enter a simple pattern ("*" may be used as a wildcard match) to search for a username or e-mail address. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda@example.com".') .'</p>';
   }
@@ -1868,7 +1915,8 @@ function user_filters() {
   // Regular filters
   $filters = array();
   $roles = user_roles(TRUE);
-  unset($roles[DRUPAL_AUTHENTICATED_RID]); // Don't list authorized role.
+  // Don't list authorized role.
+  unset($roles[DRUPAL_AUTHENTICATED_RID]);
   if (count($roles)) {
     $filters['role'] = array(
       'title' => t('role'),
@@ -1917,24 +1965,24 @@ function user_build_filter_query() {
     // This checks to see if this permission filter is an enabled permission for the authenticated role.
     // If so, then all users would be listed, and we can skip adding it to the filter query.
     if ($key == 'permission') {
-      $account = new stdClass();
-      $account->uid = 'user_filter';
+      $account        = new stdClass();
+      $account->uid   = 'user_filter';
       $account->roles = array(DRUPAL_AUTHENTICATED_RID => 1);
       if (user_access($value, $account)) {
         continue;
       }
     }
     $where[] = $filters[$key]['where'];
-    $args[] = $value;
-    $join[] = $filters[$key]['join'];
+    $args[]  = $value;
+    $join[]  = $filters[$key]['join'];
   }
   $where = !empty($where) ? 'AND '. implode(' AND ', $where) : '';
   $join = !empty($join) ? ' '. implode(' ', array_unique($join)) : '';
 
   return array('where' => $where,
-           'join' => $join,
-           'args' => $args,
-         );
+    'join' => $join,
+    'args' => $args,
+  );
 }
 
 /**
@@ -1987,6 +2035,7 @@ function theme_user_signature($signature
  *  least the fields 'uid', 'name', and 'mail'.
  * @param $language
  *  Language object to generate the tokens with.
+ *
  * @return
  *  Array of mappings from token names to values (for use with strtr()).
  */
@@ -2054,6 +2103,7 @@ function user_preferred_language($accoun
  *  least the fields 'uid', 'name', and 'mail'.
  * @param $language
  *  Optional language to use for the notification, overriding account language.
+ *
  * @return
  *  The return value from drupal_mail_send(), if ends up being called.
  */
@@ -2063,8 +2113,8 @@ function _user_mail_notify($op, $account
   $notify = variable_get('user_mail_'. $op .'_notify', $default_notify);
   if ($notify) {
     $params['account'] = $account;
-    $language = $language ? $language : user_preferred_language($account);
-    $mail = drupal_mail('user', $op, $account->mail, $language, $params);
+    $language          = $language ? $language : user_preferred_language($account);
+    $mail              = drupal_mail('user', $op, $account->mail, $language, $params);
     if ($op == 'register_pending_approval') {
       // If a user registered requiring admin approval, notify the admin, too.
       // We use the site default language for this.
@@ -2088,22 +2138,25 @@ function _user_password_dynamic_validati
     drupal_add_js(drupal_get_path('module', 'user') .'/user.js', 'module');
 
     drupal_add_js(array(
-      'password' => array(
-        'strengthTitle' => t('Password strength:'),
-        'lowStrength' => t('Low'),
-        'mediumStrength' => t('Medium'),
-        'highStrength' => t('High'),
-        'tooShort' => t('It is recommended to choose a password that contains at least six characters. It should include numbers, punctuation, and both upper and lowercase letters.'),
-        'needsMoreVariation' => t('The password does not include enough variation to be secure. Try:'),
-        'addLetters' => t('Adding both upper and lowercase letters.'),
-        'addNumbers' => t('Adding numbers.'),
-        'addPunctuation' => t('Adding punctuation.'),
-        'sameAsUsername' => t('It is recommended to choose a password different from the username.'),
-        'confirmSuccess' => t('Yes'),
-        'confirmFailure' => t('No'),
-        'confirmTitle' => t('Passwords match:'),
-        'username' => (isset($user->name) ? $user->name : ''))),
-      'setting');
+        'password' => array(
+          'strengthTitle' => t('Password strength:'),
+          'lowStrength' => t('Low'),
+          'mediumStrength' => t('Medium'),
+          'highStrength' => t('High'),
+          'tooShort' => t('It is recommended to choose a password that contains at least six characters. It should include numbers, punctuation, and both upper and lowercase letters.'),
+          'needsMoreVariation' => t('The password does not include enough variation to be secure. Try:'),
+          'addLetters' => t('Adding both upper and lowercase letters.'),
+          'addNumbers' => t('Adding numbers.'),
+          'addPunctuation' => t('Adding punctuation.'),
+          'sameAsUsername' => t('It is recommended to choose a password different from the username.'),
+          'confirmSuccess' => t('Yes'),
+          'confirmFailure' => t('No'),
+          'confirmTitle' => t('Passwords match:'),
+          'username' => (isset($user->name) ? $user->name : ''),
+        ),
+      ),
+      'setting'
+    );
     $complete = TRUE;
   }
 }
@@ -2122,16 +2175,16 @@ function user_hook_info() {
           'runs when' => t("After a user's profile has been updated"),
         ),
         'delete' => array(
-          'runs when' => t('After a user has been deleted')
+          'runs when' => t('After a user has been deleted'),
         ),
         'login' => array(
-          'runs when' => t('After a user has logged in')
+          'runs when' => t('After a user has logged in'),
         ),
         'logout' => array(
-          'runs when' => t('After a user has logged out')
+          'runs when' => t('After a user has logged out'),
         ),
         'view' => array(
-          'runs when' => t("When a user's profile is being viewed")
+          'runs when' => t("When a user's profile is being viewed"),
         ),
       ),
     ),
@@ -2209,7 +2262,8 @@ function user_register_submit($form, &$f
   $notify = isset($form_state['values']['notify']) ? $form_state['values']['notify'] : NULL;
   $from = variable_get('site_mail', ini_get('sendmail_from'));
   if (isset($form_state['values']['roles'])) {
-    $roles = array_filter($form_state['values']['roles']);     // Remove unset roles
+    // Remove unset roles
+    $roles = array_filter($form_state['values']['roles']);
   }
   else {
     $roles = array();
@@ -2285,7 +2339,6 @@ function user_register_submit($form, &$f
       drupal_set_message(t('Thank you for applying for an account. Your account is currently pending approval by the site administrator.<br />In the meantime, a welcome message with further instructions has been sent to your e-mail address.'));
       $form_state['redirect'] = '';
       return;
-
     }
   }
 }
@@ -2318,8 +2371,8 @@ function user_register() {
   $form = array_merge($form, user_edit_form($form_state, NULL, NULL, TRUE));
   if ($admin) {
     $form['account']['notify'] = array(
-     '#type' => 'checkbox',
-     '#title' => t('Notify user of new account')
+      '#type' => 'checkbox',
+      '#title' => t('Notify user of new account'),
     );
     // Redirect back to page which initiated the create request; usually admin/user/user/create
     $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']);
@@ -2385,3 +2438,4 @@ function _user_forms(&$edit, $account, $
 
   return empty($groups) ? FALSE : $groups;
 }
+
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.11
diff -u -p -r1.11 user.pages.inc
--- modules/user/user.pages.inc	8 Jan 2008 10:35:43 -0000	1.11
+++ modules/user/user.pages.inc	21 Jan 2008 21:59:04 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: user.pages.inc,v 1.11 2008/01/08 10:35:43 goba Exp $
 
+
 /**
  * @file
  * User page callback file for the user module.
@@ -86,7 +87,7 @@ function user_pass_reset(&$form_state, $
     $timeout = 86400;
     $current = time();
     // Some redundant checks for extra security ?
-    if ($timestamp < $current && $account = user_load(array('uid' => $uid, 'status' => 1)) ) {
+    if ($timestamp < $current && $account = user_load(array('uid' => $uid, 'status' => 1))) {
       // No time out for first time login.
       if ($account->login && $current - $timestamp > $timeout) {
         drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'));
@@ -106,8 +107,8 @@ function user_pass_reset(&$form_state, $
         }
         else {
           $form['message'] = array('#value' => t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to login to the site and change your password.</p>', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout))));
-          $form['help'] = array('#value' => '<p>'. t('This login can be used only once.') .'</p>');
-          $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'));
+          $form['help']    = array('#value' => '<p>'. t('This login can be used only once.') .'</p>');
+          $form['submit']  = array('#type' => 'submit', '#value' => t('Log in'));
           $form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login");
           return $form;
         }
@@ -234,10 +235,10 @@ function user_profile_form($form_state, 
 
   $edit = (empty($form_state['values'])) ? (array)$account : $form_state['values'];
 
-  $form = _user_forms($edit, $account, $category);
+  $form              = _user_forms($edit, $account, $category);
   $form['_category'] = array('#type' => 'value', '#value' => $category);
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 30);
+  $form['_account']  = array('#type' => 'value', '#value' => $account);
+  $form['submit']    = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 30);
   if (user_access('administer users')) {
     $form['delete'] = array(
       '#type' => 'submit',
@@ -308,7 +309,8 @@ function user_confirm_delete(&$form_stat
     t('Are you sure you want to delete the account %name?', array('%name' => $account->name)),
     'user/'. $account->uid,
     t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'),
-    t('Delete'), t('Cancel'));
+    t('Delete'), t('Cancel')
+  );
 }
 
 /**
@@ -363,3 +365,4 @@ function user_page() {
     return drupal_get_form('user_login');
   }
 }
+
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.22
diff -u -p -r1.22 default.profile
--- profiles/default/default.profile	17 Dec 2007 12:43:34 -0000	1.22
+++ profiles/default/default.profile	21 Jan 2008 21:59:04 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: default.profile,v 1.22 2007/12/17 12:43:34 goba Exp $
 
+
 /**
  * Return an array of the modules to be enabled when this profile is installed.
  *
@@ -22,7 +23,7 @@ function default_profile_modules() {
 function default_profile_details() {
   return array(
     'name' => 'Drupal',
-    'description' => 'Select this profile to enable some basic Drupal functionality and the default theme.'
+    'description' => 'Select this profile to enable some basic Drupal functionality and the default theme.',
   );
 }
 
@@ -35,8 +36,7 @@ function default_profile_details() {
  *   while the values will be displayed to the user in the installer
  *   task list.
  */
-function default_profile_task_list() {
-}
+function default_profile_task_list() {}
 
 /**
  * Perform any final installation tasks for this profile.
@@ -149,3 +149,4 @@ function default_form_alter(&$form, $for
     $form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
   }
 }
+
Index: themes/bluemarine/block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/block.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 block.tpl.php
--- themes/bluemarine/block.tpl.php	7 Aug 2007 08:39:36 -0000	1.3
+++ themes/bluemarine/block.tpl.php	21 Jan 2008 22:01:35 -0000
@@ -1,7 +1,9 @@
 <?php
 // $Id: block.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $
+
 ?>
   <div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">
     <h2 class="title"><?php print $block->subject; ?></h2>
     <div class="content"><?php print $block->content; ?></div>
  </div>
+
Index: themes/bluemarine/box.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/box.tpl.php,v
retrieving revision 1.3
diff -u -p -r1.3 box.tpl.php
--- themes/bluemarine/box.tpl.php	7 Aug 2007 08:39:36 -0000	1.3
+++ themes/bluemarine/box.tpl.php	21 Jan 2008 22:01:35 -0000
@@ -1,8 +1,12 @@
 <?php
 // $Id: box.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $
+
 ?>
   <div class="box">
-    <?php if ($title) { ?><h2 class="title"><?php print $title; ?></h2><?php } ?>
+    <?php if ($title) {
+  ?><h2 class="title"><?php print $title; ?></h2><?php
+}
+?>
     <div class="content"><?php print $content; ?></div>
  </div>
 
Index: themes/bluemarine/comment.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/comment.tpl.php,v
retrieving revision 1.7
diff -u -p -r1.7 comment.tpl.php
--- themes/bluemarine/comment.tpl.php	4 Jan 2008 19:24:23 -0000	1.7
+++ themes/bluemarine/comment.tpl.php	21 Jan 2008 22:01:35 -0000
@@ -1,20 +1,28 @@
 <?php
 // $Id: comment.tpl.php,v 1.7 2008/01/04 19:24:23 goba Exp $
+
 ?>
   <div class="comment<?php print ' '. $status; ?>">
     <?php if ($picture) {
-    print $picture;
-  } ?>
-<h3 class="title"><?php print $title; ?></h3><?php if ($new != '') { ?><span class="new"><?php print $new; ?></span><?php } ?>
+  print $picture;
+}
+?>
+<h3 class="title"><?php print $title; ?></h3><?php if ($new != '') {
+  ?><span class="new"><?php print $new; ?></span><?php
+}
+?>
     <div class="submitted"><?php print $submitted; ?></div>
     <div class="content">
      <?php print $content; ?>
-     <?php if ($signature): ?>
+
+<?php if ($signature):
+?>
       <div class="clear-block">
        <div>—</div>
-       <?php print $signature ?>
+       <?php print $signature?>
       </div>
      <?php endif; ?>
     </div>
     <div class="links">&raquo; <?php print $links; ?></div>
   </div>
+
Index: themes/bluemarine/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/node.tpl.php,v
retrieving revision 1.7
diff -u -p -r1.7 node.tpl.php
--- themes/bluemarine/node.tpl.php	7 Aug 2007 08:39:36 -0000	1.7
+++ themes/bluemarine/node.tpl.php	21 Jan 2008 22:01:35 -0000
@@ -1,13 +1,28 @@
 <?php
 // $Id: node.tpl.php,v 1.7 2007/08/07 08:39:36 goba Exp $
+
 ?>
-  <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
+  <div class="node<?php if ($sticky) {
+  print " sticky";
+}
+?>
+<?php if (!$status) {
+  print " node-unpublished";
+}
+?>">
     <?php if ($picture) {
-      print $picture;
-    }?>
-    <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
+  print $picture;
+}
+?>
+
+<?php if ($page == 0) {
+  ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php
+}; ?>
     <span class="submitted"><?php print $submitted?></span>
     <div class="taxonomy"><?php print $terms?></div>
     <div class="content"><?php print $content?></div>
-    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
+    <?php if ($links) {
+  ?><div class="links">&raquo; <?php print $links?></div><?php
+}; ?>
   </div>
+
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.27
diff -u -p -r1.27 page.tpl.php
--- themes/bluemarine/page.tpl.php	7 Jan 2008 13:49:37 -0000	1.27
+++ themes/bluemarine/page.tpl.php	21 Jan 2008 22:01:35 -0000
@@ -1,14 +1,19 @@
 <?php
 // $Id: page.tpl.php,v 1.27 2008/01/07 13:49:37 goba Exp $
+
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language?>" xml:lang="<?php print $language->language?>">
 
 <head>
-  <title><?php print $head_title ?></title>
-  <?php print $head ?>
-  <?php print $styles ?>
-  <?php print $scripts ?>
-  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script>
+  <title><?php print $head_title?></title>
+  <?php print $head?>
+
+<?php print $styles?>
+
+<?php print $scripts?>
+/* Needed to avoid Flash of Unstyle Content in IE */
+  <script type="text/javascript"><?php
+?> </script>
 </head>
 
 <body>
@@ -16,48 +21,88 @@
 <table border="0" cellpadding="0" cellspacing="0" id="header">
   <tr>
     <td id="logo">
-      <?php if ($logo) { ?><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><img src="<?php print $logo ?>" alt="<?php print t('Home') ?>" /></a><?php } ?>
-      <?php if ($site_name) { ?><h1 class='site-name'><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a></h1><?php } ?>
-      <?php if ($site_slogan) { ?><div class='site-slogan'><?php print $site_slogan ?></div><?php } ?>
+      <?php if ($logo) {
+  ?><a href="<?php print $front_page?>" title="<?php print t('Home')?>"><img src="<?php print $logo?>" alt="<?php print t('Home')?>" /></a><?php
+}
+?>
+
+<?php if ($site_name) {
+  ?><h1 class='site-name'><a href="<?php print $front_page?>" title="<?php print t('Home')?>"><?php print $site_name?></a></h1><?php
+}
+?>
+
+<?php if ($site_slogan) {
+  ?><div class='site-slogan'><?php print $site_slogan?></div><?php
+}
+?>
     </td>
     <td id="menu">
-      <?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' => 'links', 'id' => 'subnavlist')) ?><?php } ?>
-      <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?><?php } ?>
-      <?php print $search_box ?>
+      <?php if (isset($secondary_links)) {
+  ?>
+  <?php print theme('links', $secondary_links, array('class' => 'links', 'id' => 'subnavlist'))?>
+  <?php
+}
+?>
+
+<?php if (isset($primary_links)) {
+  ?>
+  <?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist'))?>
+  <?php
+}
+?>
+
+<?php print $search_box?>
     </td>
   </tr>
   <tr>
-    <td colspan="2"><div><?php print $header ?></div></td>
+    <td colspan="2"><div><?php print $header?></div></td>
   </tr>
 </table>
 
 <table border="0" cellpadding="0" cellspacing="0" id="content">
   <tr>
-    <?php if ($left) { ?><td id="sidebar-left">
-      <?php print $left ?>
-    </td><?php } ?>
+    <?php if ($left) {
+  ?><td id="sidebar-left">
+      <?php print $left?>
+    </td><?php
+}
+?>
     <td valign="top">
-      <?php if ($mission) { ?><div id="mission"><?php print $mission ?></div><?php } ?>
+      <?php if ($mission) {
+  ?><div id="mission"><?php print $mission?></div><?php
+}
+?>
       <div id="main">
-        <?php print $breadcrumb ?>
-        <h1 class="title"><?php print $title ?></h1>
-        <div class="tabs"><?php print $tabs ?></div>
-        <?php if ($show_messages) { print $messages; } ?>
-        <?php print $help ?>
-        <?php print $content; ?>
-        <?php print $feed_icons; ?>
+        <?php print $breadcrumb?>
+        <h1 class="title"><?php print $title?></h1>
+        <div class="tabs"><?php print $tabs?></div>
+        <?php if ($show_messages) {
+  print $messages;
+}
+?>
+
+<?php print $help?>
+
+<?php print $content; ?>
+
+<?php print $feed_icons; ?>
       </div>
     </td>
-    <?php if ($right) { ?><td id="sidebar-right">
-      <?php print $right ?>
-    </td><?php } ?>
+    <?php if ($right) {
+  ?><td id="sidebar-right">
+      <?php print $right?>
+    </td><?php
+}
+?>
   </tr>
 </table>
 
 <div id="footer">
-  <?php print $footer_message ?>
-  <?php print $footer ?>
+  <?php print $footer_message?>
+
+<?php print $footer?>
 </div>
-<?php print $closure ?>
+<?php print $closure?>
 </body>
 </html>
+
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.75
diff -u -p -r1.75 chameleon.theme
--- themes/chameleon/chameleon.theme	7 Jan 2008 13:49:37 -0000	1.75
+++ themes/chameleon/chameleon.theme	21 Jan 2008 22:00:32 -0000
@@ -1,6 +1,7 @@
 <?php
 // $Id: chameleon.theme,v 1.75 2008/01/07 13:49:37 goba Exp $
 
+
 /**
  * @file
  * A slim, CSS-driven theme which does not depend on a template engine like phptemplate
@@ -26,7 +27,7 @@ function chameleon_page($content, $show_
   $blocks_left = theme_blocks('left');
   $blocks_right = theme_blocks('right');
 
-  $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
+  $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
   $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n";
   $output .= "<head>\n";
   $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
@@ -104,7 +105,7 @@ function chameleon_page($content, $show_
   $output .= "  </tr>\n";
   $output .= " </table>\n";
 
-  $output .=  theme_closure();
+  $output .= theme_closure();
   $output .= " </body>\n";
   $output .= "</html>\n";
 
@@ -113,7 +114,7 @@ function chameleon_page($content, $show_
 
 function chameleon_node($node, $teaser = 0, $page = 0) {
 
-  $output  = "<div class=\"node". ((!$node->status) ? ' node-unpublished' : '') . (($node->sticky) ? ' sticky' : '') ."\">\n";
+  $output = "<div class=\"node". ((!$node->status) ? ' node-unpublished' : '') . (($node->sticky) ? ' sticky' : '') ."\">\n";
 
   if (!$page) {
     $output .= " <h2 class=\"title\">". ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."</h2>\n";
@@ -132,7 +133,8 @@ function chameleon_node($node, $teaser =
 
   $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array(
     'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
-    'html' => TRUE) : array();
+    'html' => TRUE,
+  ) : array();
 
   $terms = array();
   if (module_exists('taxonomy')) {
@@ -155,9 +157,10 @@ function chameleon_node($node, $teaser =
 function chameleon_comment($comment, $node, $links = array()) {
   $submitted['comment_submitted'] = array(
     'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))),
-    'html' => TRUE);
+    'html' => TRUE,
+  );
 
-  $output  = "<div class=\"comment". ' '. $status ."\">\n";
+  $output = "<div class=\"comment" . ' '. $status ."\">\n";
   $output .= " <h3 class=\"title\">". l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) ."</h3>\n";
   $output .= " <div class=\"content\">". $comment->comment;
   if (!empty($signature)) {
