Show change language log on Special:PageLanguage
authorKunal Grover <kunalgrover05@gmail.com>
Sun, 20 Jul 2014 11:45:28 +0000 (17:15 +0530)
committerKunal Grover <kunalgrover05@gmail.com>
Sun, 20 Jul 2014 14:05:48 +0000 (19:35 +0530)
Change-Id: If655f755e36683546cb1e0489323ce2e9d18b41a

includes/specials/SpecialPageLanguage.php

index a432f10..df0b643 100644 (file)
@@ -86,6 +86,10 @@ class SpecialPageLanguage extends FormSpecialPage {
                return $page;
        }
 
+       protected function postText() {
+               return $this->showLogFragment( $this->par );
+       }
+
        public function alterForm( HTMLForm $form ) {
                $form->setDisplayFormat( 'vform' );
                $form->setWrapperLegend( false );
@@ -178,4 +182,12 @@ class SpecialPageLanguage extends FormSpecialPage {
                // Success causes a redirect
                $this->getOutput()->redirect( $this->goToUrl );
        }
+
+       function showLogFragment( $title ) {
+               $moveLogPage = new LogPage( 'pagelang' );
+               $out1 = Xml::element( 'h2', null, $moveLogPage->getName()->text() );
+               $out2 = '';
+               LogEventsList::showLogExtract( $out2, 'pagelang', $title );
+               return $out1 . $out2;
+       }
 }