summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-07 02:29:07 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-07 02:29:07 +0000
commit2af96209f174ad35f1568b2f7f9b8947e632a5a4 (patch)
treeb7f077ce5b54a7d7cb87fb6442058d83e6d3b68f /modules
parentc5f4624fe72f2588be8e360fe7957fd47fc4795e (diff)
downloadbrdo-2af96209f174ad35f1568b2f7f9b8947e632a5a4.tar.gz
brdo-2af96209f174ad35f1568b2f7f9b8947e632a5a4.tar.bz2
- Patch #480112 by JamesAn: converted to drupal_static().
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.admin.inc2
-rw-r--r--modules/block/block.module6
2 files changed, 4 insertions, 4 deletions
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 <i>module</i>_<i>delta</i>.
*/
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])) {