From: Chad Horohoe Date: Mon, 25 Jan 2010 13:57:51 +0000 (+0000) Subject: Fixme on r57980: Memcached would be bad here, rename variable with wg prefix. Fixes... X-Git-Tag: 1.31.0-rc.0~38108 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=b8fd924711f3f794c81b0dc2515a980efb20b5e8;p=lhc%2Fweb%2Fwiklou.git Fixme on r57980: Memcached would be bad here, rename variable with wg prefix. Fixes to UsabilityInitiative will follow --- 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,