re r64403 - remove never-actually-used $flag parameter from verifyUpload()
[lhc/web/wiklou.git] / includes / api / ApiQueryAllmessages.php
index 364c3ac..6e5cbd2 100644 (file)
@@ -48,6 +48,9 @@ class ApiQueryAllmessages extends ApiQueryBase {
                if ( !is_null( $params['lang'] ) && $params['lang'] != $wgLang->getCode() ) {
                        $oldLang = $wgLang; // Keep $wgLang for restore later
                        $wgLang = Language::factory( $params['lang'] );
+               } else if ( is_null( $params['lang'] ) ) {
+                       // Language not determined by URL but by user preferences, so don't cache
+                       $this->getMain()->setVaryCookie();
                }
 
                $prop = array_flip( (array)$params['prop'] );
@@ -75,7 +78,6 @@ class ApiQueryAllmessages extends ApiQueryBase {
                }
 
                // Get all requested messages and print the result
-               $messages = array();
                $skip = !is_null( $params['from'] );
                $result = $this->getResult();
                foreach ( $messages_target as $message ) {