Added log extract to Special:ChangeContentModel
authorrlot <rj23@protonmail.com>
Sun, 8 Jan 2017 18:05:12 +0000 (19:05 +0100)
committerrlot <rj23@protonmail.com>
Mon, 9 Jan 2017 06:32:20 +0000 (07:32 +0100)
Bug: T154874
Change-Id: I571ea324f31935c2394dce77e31c74c3afb76358

includes/specials/SpecialChangeContentModel.php

index 87276a1..a36b414 100644 (file)
@@ -33,6 +33,18 @@ class SpecialChangeContentModel extends FormSpecialPage {
                }
        }
 
+       protected function postText() {
+               $text = '';
+               if ( $this->title ) {
+                       $contentModelLogPage = new LogPage( 'contentmodel' );
+                       $text = Xml::element( 'h2', null, $contentModelLogPage->getName()->text() );
+                       $out = '';
+                       LogEventsList::showLogExtract( $out, 'contentmodel', $this->title );
+                       $text .= $out;
+               }
+               return $text;
+       }
+
        protected function getDisplayFormat() {
                return 'ooui';
        }