summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-11-15 08:23:07 +0000
committerDries Buytaert <dries@buytaert.net>2008-11-15 08:23:07 +0000
commit10104ba94ac7a70b2be3594cb769034582533e1f (patch)
tree343f80cc45db74bee38b959b601875f22af2b532 /modules/system/system.module
parent4595edbfc8930ce84e374dc6183266dab7dbecfd (diff)
downloadbrdo-10104ba94ac7a70b2be3594cb769034582533e1f.tar.gz
brdo-10104ba94ac7a70b2be3594cb769034582533e1f.tar.bz2
- Patch #331570 by recidive: rename block module tables to singular. Requires you to run update.php.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 3b8d74500..9be9edbfd 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -840,7 +840,7 @@ function system_admin_menu_block($item) {
function system_admin_theme_submit($form, &$form_state) {
// If we're changing themes, make sure the theme has its blocks initialized.
if ($form_state['values']['admin_theme'] && $form_state['values']['admin_theme'] != variable_get('admin_theme', '0')) {
- $result = db_result(db_query("SELECT COUNT(*) FROM {blocks} WHERE theme = '%s'", $form_state['values']['admin_theme']));
+ $result = db_result(db_query("SELECT COUNT(*) FROM {block} WHERE theme = '%s'", $form_state['values']['admin_theme']));
if (!$result) {
system_initialize_theme_blocks($form_state['values']['admin_theme']);
}
@@ -1181,16 +1181,16 @@ function system_default_region($theme) {
*/
function system_initialize_theme_blocks($theme) {
// Initialize theme's blocks if none already registered.
- if (!(db_result(db_query("SELECT COUNT(*) FROM {blocks} WHERE theme = '%s'", $theme)))) {
+ if (!(db_result(db_query("SELECT COUNT(*) FROM {block} 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);
+ $result = db_query("SELECT * FROM {block} 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, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', %d, '%s', %d, %d)",
+ db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, custom, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', %d, '%s', %d, %d)",
$block['module'], $block['delta'], $theme, $block['status'], $block['weight'], $block['region'], $block['visibility'], $block['pages'], $block['custom'], $block['cache']);
}
}