Merge "mediawiki.searchSuggest: Enable result caching"
[lhc/web/wiklou.git] / includes / specials / SpecialNewimages.php
index c10a618..147d176 100644 (file)
@@ -33,6 +33,7 @@ class SpecialNewFiles extends IncludableSpecialPage {
                $pager = new NewFilesPager( $this->getContext(), $par );
 
                if ( !$this->including() ) {
+                       $this->setTopText();
                        $form = $pager->getForm();
                        $form->prepareForm();
                        $form->displayForm( '' );
@@ -47,6 +48,25 @@ class SpecialNewFiles extends IncludableSpecialPage {
        protected function getGroupName() {
                return 'changes';
        }
+
+       /**
+        * Send the text to be displayed above the options
+        */
+       function setTopText() {
+               global $wgContLang;
+
+               $message = $this->msg( 'newimagestext' )->inContentLanguage();
+               if ( !$message->isDisabled() ) {
+                       $this->getOutput()->addWikiText(
+                               Html::rawElement( 'p',
+                                       array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ),
+                                       "\n" . $message->plain() . "\n"
+                               ),
+                               /* $lineStart */ false,
+                               /* $interface */ false
+                       );
+               }
+       }
 }
 
 /**
@@ -56,7 +76,7 @@ class NewFilesPager extends ReverseChronologicalPager {
        /**
         * @var ImageGallery
         */
-       var $gallery;
+       protected $gallery;
 
        function __construct( IContextSource $context, $par = null ) {
                $this->like = $context->getRequest()->getText( 'like' );
@@ -163,7 +183,7 @@ class NewFilesPager extends ReverseChronologicalPager {
                        ),
                        'showbots' => array(
                                'type' => 'check',
-                               'label' => $this->msg( 'showhidebots', $this->msg( 'show' )->plain() )->escaped(),
+                               'label-message' => 'newimages-showbots',
                                'name' => 'showbots',
                        ),
                        'limit' => array(