Set correct language for page content in action=historysubmit&revisiondelete=1
authorLiangent <liangent@gmail.com>
Sat, 17 Nov 2012 18:32:57 +0000 (02:32 +0800)
committerLiangent <liangent@gmail.com>
Sat, 17 Nov 2012 22:19:30 +0000 (06:19 +0800)
Change-Id: Iabfb9a58e023b56556100b340f8ebdb0bdc51d8f

includes/SkinTemplate.php

index dcc37d7..341983d 100644 (file)
@@ -398,7 +398,7 @@ class SkinTemplate extends Skin {
                # not for special pages or file pages AND only when viewing AND if the page exists
                # (or is in MW namespace, because that has default content)
                if ( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) &&
-                       in_array( $request->getVal( 'action', 'view' ), array( 'view', 'historysubmit' ) ) &&
+                       Action::getActionName( $this ) === 'view' &&
                        ( $title->exists() || $title->getNamespace() == NS_MEDIAWIKI ) ) {
                        $pageLang = $title->getPageViewLanguage();
                        $realBodyAttribs['lang'] = $pageLang->getHtmlCode();