From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/ParserCache.php | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'includes/ParserCache.php') diff --git a/includes/ParserCache.php b/includes/ParserCache.php index 37a42b7f..1489fcf9 100644 --- a/includes/ParserCache.php +++ b/includes/ParserCache.php @@ -1,13 +1,8 @@ mMemc =& $memCached; } function getKey( &$article, &$user ) { global $action; $hash = $user->getPageRenderingHash(); - if( !$article->mTitle->userCanEdit() ) { + if( !$article->mTitle->quickUserCan( 'edit' ) ) { // section edit links are suppressed even if the user has them on $edit = '!edit=0'; } else { @@ -95,31 +90,30 @@ class ParserCache { function save( $parserOutput, &$article, &$user ){ global $wgParserCacheExpireTime; $key = $this->getKey( $article, $user ); - + if( $parserOutput->getCacheTime() != -1 ) { - + $now = wfTimestampNow(); $parserOutput->setCacheTime( $now ); - + // Save the timestamp so that we don't have to load the revision row on view $parserOutput->mTimestamp = $article->getTimestamp(); - + $parserOutput->mText .= "\n\n"; wfDebug( "Saved in parser cache with key $key and timestamp $now\n" ); - + if( $parserOutput->containsOldMagic() ){ $expire = 3600; # 1 hour } else { $expire = $wgParserCacheExpireTime; } $this->mMemc->set( $key, $parserOutput, $expire ); - + } else { wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" ); } - } - + } ?> -- cgit v1.2.3-54-g00ecf