From: Victor Vasiliev Date: Fri, 20 Mar 2009 16:53:22 +0000 (+0000) Subject: Make ParserCache::getKey backward-compatible, so it doesn't break FlaggedRevs X-Git-Tag: 1.31.0-rc.0~42431 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=d4655a2c224c0afc6ca78b3a04fbe11fbb95660b;p=lhc%2Fweb%2Fwiklou.git Make ParserCache::getKey backward-compatible, so it doesn't break FlaggedRevs --- diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 22a3f7af97..d17214c321 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -28,7 +28,10 @@ class ParserCache { function getKey( &$article, $popts ) { global $wgRequest; - + + if( $popts instanceof User ) // It used to be getKey( &$article, &$user ) + $popts = ParserOptions::newFromUser( $popts ); + $user = $popts->mUser; $printable = ( $popts->getIsPrintable() ) ? '!printable=1' : ''; $hash = $user->getPageRenderingHash();