From b8fd924711f3f794c81b0dc2515a980efb20b5e8 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 25 Jan 2010 13:57:51 +0000 Subject: [PATCH] Fixme on r57980: Memcached would be bad here, rename variable with wg prefix. Fixes to UsabilityInitiative will follow --- includes/GlobalFunctions.php | 5 +---- includes/Skin.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 219df38678..de8e6d9812 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2271,9 +2271,7 @@ function wfSpecialList( $page, $details ) { */ function wfUrlProtocols() { global $wgUrlProtocols; - - // This function is called a lot, cache its return value - // TODO: Cache this in memcached instead? + static $retval = null; if ( !is_null( $retval ) ) return $retval; @@ -2289,7 +2287,6 @@ function wfUrlProtocols() { } else { $retval = $wgUrlProtocols; } - return $retval; } diff --git a/includes/Skin.php b/includes/Skin.php index 93f92e9449..d00d762ac3 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -378,7 +378,7 @@ class Skin extends Linker { $vars = array( 'skin' => $skinName, 'stylepath' => $wgStylePath, - 'urlprotocols' => wfUrlProtocols(), + 'wgUrlProtocols' => wfUrlProtocols(), 'wgArticlePath' => $wgArticlePath, 'wgScriptPath' => $wgScriptPath, 'wgScriptExtension' => $wgScriptExtension, -- 2.20.1