summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-14 10:22:17 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-14 10:22:17 +0000
commitef09cf93e5ac3b0a3783170c6f29fdc4f9df6224 (patch)
treeacc3d22f10ba7b0de9116f3a9f0243e1ea99cb57 /modules
parent942f63b4ca940d04e8e2229387e2d511b3f9aba1 (diff)
downloadbrdo-ef09cf93e5ac3b0a3783170c6f29fdc4f9df6224.tar.gz
brdo-ef09cf93e5ac3b0a3783170c6f29fdc4f9df6224.tar.bz2
- Patch #517542 by David Strauss: renamed functions for clarity. We say 'yay' to clarity!
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.admin.inc2
-rw-r--r--modules/block/block.module10
-rw-r--r--modules/locale/locale.install2
-rw-r--r--modules/locale/locale.test4
-rw-r--r--modules/path/path.test2
5 files changed, 10 insertions, 10 deletions
diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc
index 13fad0c5a..852397383 100644
--- a/modules/block/block.admin.inc
+++ b/modules/block/block.admin.inc
@@ -32,7 +32,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
// If non-default theme configuration has been selected, set the custom theme.
$custom_theme = isset($theme) ? $theme : variable_get('theme_default', 'garland');
- init_theme();
+ drupal_theme_initialize();
$block_regions = system_region_list($theme_key) + array(BLOCK_REGION_NONE => '<' . t('none') . '>');
diff --git a/modules/block/block.module b/modules/block/block.module
index 848b68e31..3ceeb9625 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -233,7 +233,7 @@ function block_page_alter($page) {
global $theme;
// The theme system might not yet be initialized. We need $theme.
- init_theme();
+ drupal_theme_initialize();
// Populate all block regions
$regions = system_region_list($theme);
@@ -293,7 +293,7 @@ function block_get_blocks_by_region($region) {
function _block_rehash() {
global $theme_key;
- init_theme();
+ drupal_theme_initialize();
$old_blocks = array();
$result = db_query("SELECT * FROM {block} WHERE theme = :theme", array(':theme' => $theme_key));
@@ -509,7 +509,7 @@ function block_system_themes_form_submit(&$form, &$form_state) {
if (is_array($form_state['values']['status'])) {
foreach ($form_state['values']['status'] as $key => $choice) {
if ($choice || $form_state['values']['theme_default'] == $key) {
- block_initialize_theme_blocks($key);
+ block_theme_initialize($key);
}
}
}
@@ -517,7 +517,7 @@ function block_system_themes_form_submit(&$form, &$form_state) {
// If we're changing themes, make sure the theme has its blocks initialized.
$has_blocks = (bool) db_query_range('SELECT 1 FROM {block} WHERE theme = :theme', array(':theme' => $form_state['values']['admin_theme']), 0, 1)->fetchField();
if (!$has_blocks) {
- block_initialize_theme_blocks($form_state['values']['admin_theme']);
+ block_theme_initialize($form_state['values']['admin_theme']);
}
}
}
@@ -534,7 +534,7 @@ function block_system_themes_form_submit(&$form, &$form_state) {
* @param $theme
* The name of a theme.
*/
-function block_initialize_theme_blocks($theme) {
+function block_theme_initialize($theme) {
// Initialize theme's blocks if none already registered.
$has_blocks = (bool) db_query_range('SELECT 1 FROM {block} WHERE theme = :theme', array(':theme' => $theme), 0, 1)->fetchField();
if (!$has_blocks) {
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index d33d25ba7..96b3b8c77 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -81,7 +81,7 @@ function locale_uninstall() {
// Switch back to English: with a $language->language value different from 'en'
// successive calls of t() might result in calling locale(), which in turn might
// try to query the unexisting {locales_source} and {locales_target} tables.
- drupal_init_language();
+ drupal_language_initialize();
// Remove tables.
drupal_uninstall_schema('locale');
diff --git a/modules/locale/locale.test b/modules/locale/locale.test
index f3cabe4c2..3eb7b30fb 100644
--- a/modules/locale/locale.test
+++ b/modules/locale/locale.test
@@ -934,7 +934,7 @@ class LocaleUninstallFunctionalTest extends DrupalWebTestCase {
locale_add_language('fr', 'French', 'Français', LANGUAGE_LTR, '', '', TRUE, $this->ui_language == 'fr');
// Check the UI language.
- drupal_init_language();
+ drupal_language_initialize();
global $language;
$this->assertEqual($language->language, $this->ui_language, t('Current language: %lang', array('%lang' => $language->language)));
@@ -973,7 +973,7 @@ class LocaleUninstallFunctionalTest extends DrupalWebTestCase {
$this->drupalGet('');
// Check the init language logic.
- drupal_init_language();
+ drupal_language_initialize();
$this->assertEqual($language->language, 'en', t('Language after uninstall: %lang', array('%lang' => $language->language)));
// Check JavaScript files deletion.
diff --git a/modules/path/path.test b/modules/path/path.test
index 5de87173b..e00cd9073 100644
--- a/modules/path/path.test
+++ b/modules/path/path.test
@@ -185,7 +185,7 @@ class PathLanguageTestCase extends DrupalWebTestCase {
variable_set('language_negotiation', LANGUAGE_NEGOTIATION_PATH);
// Force inclusion of language.inc.
- drupal_init_language();
+ drupal_language_initialize();
}
/**