From d4655a2c224c0afc6ca78b3a04fbe11fbb95660b Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Fri, 20 Mar 2009 16:53:22 +0000 Subject: [PATCH] Make ParserCache::getKey backward-compatible, so it doesn't break FlaggedRevs --- includes/parser/ParserCache.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); -- 2.20.1