diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-08 14:06:23 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-08 14:06:23 +0000 |
commit | 5622bce2d52904922a7fd450088bcaed417af7fd (patch) | |
tree | 2999f99426795c0e105dd988241278ac2e66c340 /includes | |
parent | aaaf8f572d1b7a5cb0d0e5b68a5f788adee222b2 (diff) | |
download | brdo-5622bce2d52904922a7fd450088bcaed417af7fd.tar.gz brdo-5622bce2d52904922a7fd450088bcaed417af7fd.tar.bz2 |
#198579 by webernet and hswong3i: a huge set of coding style fixes, including:
- whitespaces at end of lines
- indentation
- control structure usage
- whitespace in empty lines
- phpdoc comment formatting
Diffstat (limited to 'includes')
-rw-r--r-- | includes/actions.inc | 6 | ||||
-rw-r--r-- | includes/batch.inc | 2 | ||||
-rw-r--r-- | includes/bootstrap.inc | 6 | ||||
-rw-r--r-- | includes/common.inc | 16 | ||||
-rw-r--r-- | includes/database.mysql-common.inc | 2 | ||||
-rw-r--r-- | includes/database.mysql.inc | 2 | ||||
-rw-r--r-- | includes/database.mysqli.inc | 20 | ||||
-rw-r--r-- | includes/form.inc | 4 | ||||
-rw-r--r-- | includes/install.mysql.inc | 2 | ||||
-rw-r--r-- | includes/language.inc | 2 | ||||
-rw-r--r-- | includes/menu.inc | 8 | ||||
-rw-r--r-- | includes/theme.inc | 2 | ||||
-rw-r--r-- | includes/theme.maintenance.inc | 2 | ||||
-rw-r--r-- | includes/xmlrpc.inc | 2 | ||||
-rw-r--r-- | includes/xmlrpcs.inc | 2 |
15 files changed, 39 insertions, 39 deletions
diff --git a/includes/actions.inc b/includes/actions.inc index 511776126..008410fb4 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -2,9 +2,9 @@ // $Id$ /** -* @file -* This is the actions engine for executing stored actions. -*/ + * @file + * This is the actions engine for executing stored actions. + */ /** * Perform a given list of actions by executing their callback functions. diff --git a/includes/batch.inc b/includes/batch.inc index 9f57162fa..cced0b426 100644 --- a/includes/batch.inc +++ b/includes/batch.inc @@ -291,7 +291,7 @@ function _batch_finished() { $batch =& batch_get(); // Execute the 'finished' callbacks for each batch set. - foreach($batch['sets'] as $key => $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'])) { diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 5345d5926..772eb5621 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -521,7 +521,7 @@ function bootstrap_invoke_all($hook) { foreach (module_list(TRUE, TRUE) as $module) { drupal_load('module', $module); module_invoke($module, $hook); - } + } } /** @@ -786,7 +786,7 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { if ($messages = drupal_set_message()) { if ($type) { if ($clear_queue) { - unset($_SESSION['messages'][$type]); + unset($_SESSION['messages'][$type]); } if (isset($messages[$type])) { return array($type => $messages[$type]); @@ -794,7 +794,7 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { } else { if ($clear_queue) { - unset($_SESSION['messages']); + unset($_SESSION['messages']); } return $messages; } diff --git a/includes/common.inc b/includes/common.inc index 1da58971e..9eb381a6a 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1319,7 +1319,7 @@ function url($path = NULL, $options = array()) { // Will be empty if there is no language prefix. $path = trim($options['prefix'], '/'); } - + if ($clean_url) { // With Clean URLs. if ($options['query']) { @@ -1337,7 +1337,7 @@ function url($path = NULL, $options = array()) { } if (!empty($options['query'])) { $variables[] = $options['query']; - } + } if ($query = join('&', $variables)) { return $base . $script .'?'. $query . $options['fragment']; } @@ -1757,7 +1757,7 @@ function drupal_build_css_cache($types, $filename) { /** * Helper function for drupal_build_css_cache(). - * + * * This function will prefix all paths within a CSS file. */ function _drupal_build_css_path($matches, $base = NULL) { @@ -1835,7 +1835,7 @@ function drupal_load_stylesheet($file, $optimize = NULL) { /** * Loads stylesheets recursively and returns contents with corrected paths. - * + * * This function is used for recursive loading of stylesheets and * returns the stylesheet content with all url() paths corrected. */ @@ -1914,7 +1914,7 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer static $javascript = array(); if (isset($data)) { - + // Add jquery.js and drupal.js the first time a Javascript file is added. if (empty($javascript)) { $javascript['header'] = array( @@ -1925,7 +1925,7 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer 'module' => array(), 'theme' => array(), 'setting' => array(), 'inline' => array(), ); } - + if (isset($scope) && !isset($javascript[$scope])) { $javascript[$scope] = array('core' => array(), 'module' => array(), 'theme' => array(), 'setting' => array(), 'inline' => array()); } @@ -1933,7 +1933,7 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer if (isset($type) && isset($scope) && !isset($javascript[$scope][$type])) { $javascript[$scope][$type] = array(); } - + switch ($type) { case 'setting': $javascript[$scope][$type][] = $data; @@ -1948,7 +1948,7 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer } if (isset($scope)) { - + if (isset($javascript[$scope])) { return $javascript[$scope]; } diff --git a/includes/database.mysql-common.inc b/includes/database.mysql-common.inc index 7632f4a12..0f2c82b43 100644 --- a/includes/database.mysql-common.inc +++ b/includes/database.mysql-common.inc @@ -514,7 +514,7 @@ function db_change_field(&$ret, $table, $field, $field_new, $spec, $keys_new = a $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)); + $sql .= ', ADD '. implode(', ADD ', _db_create_keys_sql($keys_new)); } $ret[] = update_sql($sql); } diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index eb63b0b9b..854f737d5 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -74,7 +74,7 @@ function db_connect($url) { // Allow for non-standard MySQL port. if (isset($url['port'])) { - $url['host'] = $url['host'] .':'. $url['port']; + $url['host'] = $url['host'] .':'. $url['port']; } // - TRUE makes mysql_connect() always open a new link, even if diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index ecd30248b..9c00b3e9d 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -203,16 +203,16 @@ function db_fetch_array($result) { } /** -* Return an individual result field from the previous query. -* -* Only use this function if exactly one field is being selected; otherwise, -* use db_fetch_object() or db_fetch_array(). -* -* @param $result -* A database query result resource, as returned from db_query(). -* @return -* The resulting field or FALSE. -*/ + * Return an individual result field from the previous query. + * + * Only use this function if exactly one field is being selected; otherwise, + * use db_fetch_object() or db_fetch_array(). + * + * @param $result + * A database query result resource, as returned from db_query(). + * @return + * The resulting field or FALSE. + */ function db_result($result) { if ($result && mysqli_num_rows($result) > 0) { // The mysqli_fetch_row function has an optional second parameter $row diff --git a/includes/form.inc b/includes/form.inc index d7a41e482..088893b74 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -415,7 +415,7 @@ function drupal_process_form($form_id, &$form, &$form_state) { // however, we'll skip this and let the calling function examine // the resulting $form_state bundle itself. if (!$form['#programmed'] && empty($form_state['rebuild']) && empty($form_state['storage'])) { - drupal_redirect_form($form, $form_state['redirect']); + drupal_redirect_form($form, $form_state['redirect']); } } } @@ -1432,7 +1432,7 @@ function theme_fieldset($element) { $element['#attributes']['class'] .= ' collapsible'; if ($element['#collapsed']) { - $element['#attributes']['class'] .= ' collapsed'; + $element['#attributes']['class'] .= ' collapsed'; } } diff --git a/includes/install.mysql.inc b/includes/install.mysql.inc index a6ebca079..fa3b6d857 100644 --- a/includes/install.mysql.inc +++ b/includes/install.mysql.inc @@ -35,7 +35,7 @@ function drupal_test_mysql($url, &$success) { // Allow for non-standard MySQL port. if (isset($url['port'])) { - $url['host'] = $url['host'] .':'. $url['port']; + $url['host'] = $url['host'] .':'. $url['port']; } // Test connecting to the database. diff --git a/includes/language.inc b/includes/language.inc index c36ba7c01..15bb5a3d4 100644 --- a/includes/language.inc +++ b/includes/language.inc @@ -106,7 +106,7 @@ function language_url_rewrite(&$path, &$options) { if (!isset($options['language'])) { $options['language'] = $language; } - + switch (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE)) { case LANGUAGE_NEGOTIATION_NONE: // No language dependent path allowed in this mode. diff --git a/includes/menu.inc b/includes/menu.inc index 7c19b1d8e..f1b375f52 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1792,8 +1792,8 @@ function menu_link_save(&$item) { } /** -* Helper function to clear the page and block caches at most twice per page load. -*/ + * Helper function to clear the page and block caches at most twice per page load. + */ function _menu_clear_page_cache() { static $cache_cleared = 0; @@ -1814,8 +1814,8 @@ function _menu_clear_page_cache() { } /** -* Helper function to update a list of menus with expanded items -*/ + * Helper function to update a list of menus with expanded items + */ function _menu_set_expanded_menus() { $names = array(); $result = db_query("SELECT menu_name FROM {menu_links} WHERE expanded != 0 GROUP BY menu_name"); diff --git a/includes/theme.inc b/includes/theme.inc index 43a33b3df..026973585 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1627,7 +1627,7 @@ function template_preprocess(&$variables, $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; diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 3570ede69..d56a7c89d 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -78,7 +78,7 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine /** * Return a themed list of maintenance tasks to perform. - * + * * @ingroup themeable */ function theme_task_list($items, $active = NULL) { diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc index 80d29fc0d..2bf8b1817 100644 --- a/includes/xmlrpc.inc +++ b/includes/xmlrpc.inc @@ -7,7 +7,7 @@ Site: http://scripts.incutio.com/xmlrpc/ Manual: http://scripts.incutio.com/xmlrpc/manual.php This version is made available under the GNU GPL License -*/ + */ /** * Recursively turn a data structure into objects with 'data' and 'type' attributes. diff --git a/includes/xmlrpcs.inc b/includes/xmlrpcs.inc index 7874091a2..9b455c639 100644 --- a/includes/xmlrpcs.inc +++ b/includes/xmlrpcs.inc @@ -55,7 +55,7 @@ function xmlrpc_server($callbacks) { $data = file_get_contents('php://input'); if (!$data) { - die('XML-RPC server accepts POST requests only.'); + die('XML-RPC server accepts POST requests only.'); } $xmlrpc_server->message = xmlrpc_message($data); if (!xmlrpc_message_parse($xmlrpc_server->message)) { |