Commit 00181ecb authored by Dries's avatar Dries
Browse files

- Removing whitespace.

parent 78236ada
...@@ -476,14 +476,14 @@ function _db_type_placeholder($type) { ...@@ -476,14 +476,14 @@ function _db_type_placeholder($type) {
// presumably no db's "escape string" function will mess with // presumably no db's "escape string" function will mess with
// those characters. // those characters.
return '%s'; return '%s';
case 'serial': case 'serial':
case 'int': case 'int':
return '%d'; return '%d';
case 'float': case 'float':
return '%f'; return '%f';
case 'blob': case 'blob':
return '%b'; return '%b';
} }
......
...@@ -353,7 +353,7 @@ function drupal_install_modules($module_list = array()) { ...@@ -353,7 +353,7 @@ function drupal_install_modules($module_list = array()) {
function drupal_uninstall_module($module) { function drupal_uninstall_module($module) {
module_load_install($module); module_load_install($module);
module_invoke($module, 'uninstall'); module_invoke($module, 'uninstall');
// Remove menu links for paths declared by this module. // Remove menu links for paths declared by this module.
drupal_load('module', $module); drupal_load('module', $module);
$paths = module_invoke($module, 'menu'); $paths = module_invoke($module, 'menu');
...@@ -370,7 +370,7 @@ function drupal_uninstall_module($module) { ...@@ -370,7 +370,7 @@ function drupal_uninstall_module($module) {
$paths[$index] = implode('/', $parts); $paths[$index] = implode('/', $parts);
} }
$placeholders = implode(', ', array_fill(0, count($paths), "'%s'")); $placeholders = implode(', ', array_fill(0, count($paths), "'%s'"));
$result = db_query('SELECT * FROM {menu_links} WHERE router_path IN ('. $placeholders .') AND external = 0 ORDER BY depth DESC', $paths); $result = db_query('SELECT * FROM {menu_links} WHERE router_path IN ('. $placeholders .') AND external = 0 ORDER BY depth DESC', $paths);
// Remove all such items. Starting from those with the greatest depth will // Remove all such items. Starting from those with the greatest depth will
// minimize the amount of re-parenting done by menu_link_delete(). // minimize the amount of re-parenting done by menu_link_delete().
......
...@@ -1609,7 +1609,7 @@ function template_preprocess(&$variables, $hook) { ...@@ -1609,7 +1609,7 @@ function template_preprocess(&$variables, $hook) {
static $count = array(); static $count = array();
// Track run count for each hook to provide zebra striping. // Track run count for each hook to provide zebra striping.
// See "template_preprocess_block()" which provides the same feature for sidebar blocks. // See "template_preprocess_block()" which provides the same feature for sidebar 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['zebra'] = ($count[$hook] % 2) ? 'odd' : 'even';
$variables['id'] = $count[$hook]++; $variables['id'] = $count[$hook]++;
......
...@@ -814,7 +814,7 @@ function comment_save($edit) { ...@@ -814,7 +814,7 @@ function comment_save($edit) {
drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.')); drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
} }
else { else {
comment_invoke_comment($edit, 'publish'); comment_invoke_comment($edit, 'publish');
} }
return $edit['cid']; return $edit['cid'];
} }
......
...@@ -60,11 +60,11 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) { ...@@ -60,11 +60,11 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) {
$ret[] = update_sql("ALTER TABLE {". $table ."} ADD $column $type"); $ret[] = update_sql("ALTER TABLE {". $table ."} ADD $column $type");
if (!empty($default)) { if (!empty($default)) {
$ret[] = update_sql("ALTER TABLE {". $table ."} ALTER $column SET $default"); $ret[] = update_sql("ALTER TABLE {". $table ."} ALTER $column SET $default");
} }
if (!empty($not_null)) { if (!empty($not_null)) {
if (!empty($default)) { if (!empty($default)) {
$ret[] = update_sql("UPDATE {". $table ."} SET $column = $default_val"); $ret[] = update_sql("UPDATE {". $table ."} SET $column = $default_val");
} }
$ret[] = update_sql("ALTER TABLE {". $table ."} ALTER $column SET NOT NULL"); $ret[] = update_sql("ALTER TABLE {". $table ."} ALTER $column SET NOT NULL");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment