diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-11 16:49:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-11 16:49:38 +0000 |
commit | bd108c7f1036858fc2b4293ee2bad0474129fab9 (patch) | |
tree | fd5a88544ca93829c2f38b9e1f4da4e7fef051e9 /includes | |
parent | ea02bd1d2e1b8f134ac810116223a42883b41c73 (diff) | |
download | brdo-bd108c7f1036858fc2b4293ee2bad0474129fab9.tar.gz brdo-bd108c7f1036858fc2b4293ee2bad0474129fab9.tar.bz2 |
- Patch #299778 by hswong3i, Arancaytar, Dave Reid et al: code clean-up.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/database/mysql/schema.inc | 2 | ||||
-rw-r--r-- | includes/install.inc | 22 | ||||
-rw-r--r-- | includes/locale.inc | 2 | ||||
-rw-r--r-- | includes/menu.inc | 4 | ||||
-rw-r--r-- | includes/session.inc | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc index 33744a8c9..6318cd868 100644 --- a/includes/database/mysql/schema.inc +++ b/includes/database/mysql/schema.inc @@ -299,7 +299,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { } public function changeField(&$ret, $table, $field, $field_new, $spec, $keys_new = array()) { - $sql = 'ALTER TABLE {' . $table . '} CHANGE `' . $field . '` ' . $this->createFieldSql($field_new, $this->processField($spec));
+ $sql = 'ALTER TABLE {' . $table . '} CHANGE `' . $field . '` ' . $this->createFieldSql($field_new, $this->processField($spec)); if (count($keys_new)) { $sql .= ', ADD ' . implode(', ADD ', $this->createKeysSql($keys_new)); } diff --git a/includes/install.inc b/includes/install.inc index c713036ff..fc802011b 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -88,7 +88,7 @@ function drupal_load_updates() { * @param $module * A module name. * @return - * If the module has updates, an array of available updates sorted by version. + * If the module has updates, an array of available updates sorted by version. * Otherwise, FALSE. */ function drupal_get_schema_versions($module) { @@ -105,10 +105,10 @@ function drupal_get_schema_versions($module) { if (count($updates) == 0) { return FALSE; } - + // Make sure updates are run in numeric order, not in definition order. sort($updates, SORT_NUMERIC); - + return $updates; } @@ -213,8 +213,8 @@ function drupal_detect_database_types() { // file for the driver explicitly. foreach (file_scan_directory(DRUPAL_ROOT . '/includes/database', '/^[a-z]*$/i', array('.', '..', 'CVS'), 0, FALSE) as $file) { - include_once "{$file->filename}/install.inc"; - include_once "{$file->filename}/database.inc"; + include_once "{$file->filename}/install.inc"; + include_once "{$file->filename}/database.inc"; $drivers[$file->basename] = $file->filename; } @@ -232,7 +232,7 @@ function drupal_detect_database_types() { unset($databases['mysql']); $databases = array('mysql' => $mysql_database) + $databases; } - + return $databases; } @@ -466,7 +466,7 @@ function drupal_verify_profile($profile, $locale) { $missing_modules = array_diff($module_list, $present_modules); $requirements = array(); - + if (count($missing_modules)) { $modules = array(); foreach ($missing_modules as $module) { @@ -544,7 +544,7 @@ function _drupal_install_module($module) { */ function drupal_install_init_database() { static $included = FALSE; - + if (!$included) { $connection_info = Database::getConnectionInfo(); $driver = $connection_info['default']['driver']; @@ -568,7 +568,7 @@ function drupal_install_system() { require_once DRUPAL_ROOT . '/' . $system_path . '/system.install'; drupal_install_init_database(); module_invoke('system', 'install'); - + $system_versions = drupal_get_schema_versions('system'); $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED; db_query("INSERT INTO {system} (filename, name, type, owner, status, bootstrap, schema_version) VALUES('%s', '%s', '%s', '%s', %d, %d, %d)", $system_path . '/system.module', 'system', 'module', '', 1, 0, $system_version); @@ -828,7 +828,7 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) { /** - * Send the user to a different installer page. + * Send the user to a different installer page. * * This issues an on-site HTTP redirect. Messages (and errors) are erased. * @@ -927,7 +927,7 @@ function drupal_check_profile($profile) { * Extract highest severity from requirements array. * * @param $requirements - * An array of requirements, in the same format as is returned by + * An array of requirements, in the same format as is returned by * hook_requirements(). * @return * The highest severity in the array. diff --git a/includes/locale.inc b/includes/locale.inc index 00db655f7..248731cbb 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -97,7 +97,7 @@ function theme_locale_languages_overview_form($form) { $header = array(array('data' => t('English name')), array('data' => t('Native name')), array('data' => t('Code')), array('data' => t('Direction')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Weight')), array('data' => t('Operations'))); $output = theme('table', $header, $rows, array('id' => 'language-order')); $output .= drupal_render($form); - + drupal_add_tabledrag('language-order', 'order', 'sibling', 'language-order-weight'); return $output; diff --git a/includes/menu.inc b/includes/menu.inc index e5618304b..f4f8ecd29 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1886,7 +1886,7 @@ function _menu_delete_item($item, $force = FALSE) { * - plid The mlid of the parent. * - router_path The path of the relevant router item. * @return - * The mlid of the saved menu link, or FALSE if the menu link could not be + * The mlid of the saved menu link, or FALSE if the menu link could not be * saved. */ function menu_link_save(&$item) { @@ -2040,7 +2040,7 @@ function menu_link_save(&$item) { if ($existing_item && $menu_name != $existing_item['menu_name']) { menu_cache_clear($existing_item['menu_name']); } - + _menu_clear_page_cache(); } return $item['mlid']; diff --git a/includes/session.inc b/includes/session.inc index b2b0ae65b..c9113982f 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -229,7 +229,7 @@ function drupal_session_destroy_uid($uid) { * * @param int $lifetime * The value of session.gc_maxlifetime, passed by PHP. - * Sessions not updated for more than $lifetime seconds will be removed. + * Sessions not updated for more than $lifetime seconds will be removed. */ function _sess_gc($lifetime) { // Be sure to adjust 'php_value session.gc_maxlifetime' to a large enough |