}
function replace( $title, $text ) {
- global $wgLocalMessageCache, $parserMemc, $wgDBname;
+ global $wgLocalMessageCache;
$this->lock();
$this->load();
- $parserMemc->delete("$wgDBname:sidebar");
if ( is_array( $this->mCache ) ) {
$this->mCache[$title] = $text;
$this->mMemc->set( $this->mMemcKey, $this->mCache, $this->mExpiry );
* @access private
*/
function buildSidebar() {
- global $wgTitle, $action, $wgDBname, $parserMemc;
+ global $wgTitle, $action;
$fname = 'SkinTemplate::buildSidebar';
-
+ $pageurl = $wgTitle->getLocalURL();
wfProfileIn( $fname );
- $cachedsidebar=$parserMemc->get("{$wgDBname}:sidebar");
- if ($cachedsidebar!="") {
- wfProfileOut($fname);
- return $cachedsidebar;
- }
$bar = array();
$lines = explode( "\n", wfMsgForContent( 'sidebar' ) );
'text' => $text,
'href' => $href,
'id' => 'n-' . strtr($line[1], ' ', '-'),
- 'active' => false
+ 'active' => $pageurl == $href
);
} else { continue; }
}
}
- $cachednotice=$parserMemc->set("{$wgDBname}:sidebar",$bar,86400);
wfProfileOut( $fname );
return $bar;
}