Commit 2af96209 authored by Dries's avatar Dries

- Patch #480112 by JamesAn: converted to drupal_static().

parent c5f4624f
......@@ -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)) {
......
......@@ -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])) {
......
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