Merge "IndexPager: Introduce constants for values of $mDefaultDirection"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 3 Sep 2014 18:07:52 +0000 (18:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 3 Sep 2014 18:07:52 +0000 (18:07 +0000)
1  2 
includes/specials/SpecialListfiles.php

@@@ -108,12 -108,12 +108,12 @@@ class ImageListPager extends TablePage
  
                if ( !$including ) {
                        if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) {
-                               $this->mDefaultDirection = true;
+                               $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
                        } else {
-                               $this->mDefaultDirection = false;
+                               $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
                        }
                } else {
-                       $this->mDefaultDirection = true;
+                       $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
                }
  
                parent::__construct( $context );
                $form = new HTMLForm( $fields, $this->getContext() );
  
                $form->setMethod( 'get' );
 +              $form->setTitle( $this->getTitle() );
                $form->setId( 'mw-listfiles-form' );
                $form->setWrapperLegendMsg( 'listfiles' );
                $form->setSubmitTextMsg( 'table_pager_limit_submit' );