X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialNewimages.php;h=00c8e050ea6f3f7987338c90f627b01c6e1858c3;hb=bffc8e0bf360b896dcfa61b4f5d717f1c929b4fa;hp=aff5947cc83a134ff568f28be412b0e6c4282629;hpb=6ab14151766918b9c7abf33580cdd64b9f9e79e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index aff5947cc8..00c8e050ea 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -30,6 +30,9 @@ class SpecialNewFiles extends IncludableSpecialPage { $this->setHeaders(); $this->outputHeader(); + $out = $this->getOutput(); + $this->addHelpLink( 'Help:New images' ); + $pager = new NewFilesPager( $this->getContext(), $par ); if ( !$this->including() ) { @@ -39,9 +42,9 @@ class SpecialNewFiles extends IncludableSpecialPage { $form->displayForm( '' ); } - $this->getOutput()->addHTML( $pager->getBody() ); + $out->addHTML( $pager->getBody() ); if ( !$this->including() ) { - $this->getOutput()->addHTML( $pager->getNavigationBar() ); + $out->addHTML( $pager->getNavigationBar() ); } } @@ -59,7 +62,7 @@ class SpecialNewFiles extends IncludableSpecialPage { if ( !$message->isDisabled() ) { $this->getOutput()->addWikiText( Html::rawElement( 'p', - array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), + array( 'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ), "\n" . $message->plain() . "\n" ), /* $lineStart */ false, @@ -140,12 +143,11 @@ class NewFilesPager extends ReverseChronologicalPager { // Note that null for mode is taken to mean use default. $mode = $this->getRequest()->getVal( 'gallerymode', null ); try { - $this->gallery = ImageGalleryBase::factory( $mode ); - } catch ( MWException $e ) { + $this->gallery = ImageGalleryBase::factory( $mode, $this->getContext() ); + } catch ( Exception $e ) { // User specified something invalid, fallback to default. - $this->gallery = ImageGalleryBase::factory(); + $this->gallery = ImageGalleryBase::factory( false, $this->getContext() ); } - $this->gallery->setContext( $this->getContext() ); } return ''; @@ -202,7 +204,10 @@ class NewFilesPager extends ReverseChronologicalPager { $context = new DerivativeContext( $this->getContext() ); $context->setTitle( $this->getTitle() ); // Remove subpage $form = new HTMLForm( $fields, $context ); + $form->setSubmitTextMsg( 'ilsubmit' ); + $form->setSubmitProgressive(); + $form->setMethod( 'get' ); $form->setWrapperLegendMsg( 'newimages-legend' );