From 2af96209f174ad35f1568b2f7f9b8947e632a5a4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 7 Jun 2009 02:29:07 +0000 Subject: - Patch #480112 by JamesAn: converted to drupal_static(). --- modules/block/block.admin.inc | 2 +- modules/block/block.module | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc index 71553044b..ea3354b1c 100644 --- a/modules/block/block.admin.inc +++ b/modules/block/block.admin.inc @@ -126,7 +126,7 @@ function block_admin_display_form_submit($form, &$form_state) { */ function _block_compare($a, $b) { global $theme_key; - static $regions; + $regions = &drupal_static(__FUNCTION__); // We need the region list to correctly order by region. if (!isset($regions)) { diff --git a/modules/block/block.module b/modules/block/block.module index b12f44113..5ed26dfa3 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -559,9 +559,9 @@ function block_initialize_theme_blocks($theme) { * array key instead of module_delta. */ function block_list($region) { - static $blocks = array(); + $blocks = &drupal_static(__FUNCTION__, array()); - if (!count($blocks)) { + if (empty($blocks)) { $blocks = _block_load_blocks(); } @@ -776,7 +776,7 @@ function block_flush_caches() { * @see block.tpl.php */ function template_preprocess_block(&$variables) { - static $block_counter = array(); + $block_counter = &drupal_static(__FUNCTION__, array()); $variables['block'] = $variables['block']['#block']; // All blocks get an independent counter for each region. if (!isset($block_counter[$variables['block']->region])) { -- cgit v1.2.3