Merge "Show change language log on Special:PageLanguage"
[lhc/web/wiklou.git] / includes / specials / SpecialPageLanguage.php
index 7b75c3f..2d40f16 100644 (file)
@@ -92,6 +92,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 );
@@ -184,4 +188,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;
+       }
 }