diff options
Diffstat (limited to 'includes/specials/SpecialListfiles.php')
-rw-r--r-- | includes/specials/SpecialListfiles.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 04a83c8f..d4b45fb3 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -87,7 +87,7 @@ class ImageListPager extends TablePager { $this->mIncluding = $including; $this->mShowAll = $showAll; - if ( $userName ) { + if ( $userName !== null && $userName !== '' ) { $nt = Title::newFromText( $userName, NS_USER ); if ( !is_null( $nt ) ) { $this->mUserName = $nt->getText(); @@ -203,7 +203,9 @@ class ImageListPager extends TablePager { } else { return false; } - } elseif ( $this->getConfig()->get( 'MiserMode' ) && $this->mShowAll /* && mUserName === null */ ) { + } elseif ( $this->getConfig()->get( 'MiserMode' ) + && $this->mShowAll /* && mUserName === null */ + ) { // no oi_timestamp index, so only alphabetical sorting in this case. if ( $field === 'img_name' ) { return true; @@ -300,6 +302,7 @@ class ImageListPager extends TablePager { * @param int $limit * @param bool $asc * @return array + * @throws MWException */ function reallyDoQuery( $offset, $limit, $asc ) { $prevTableName = $this->mTableName; @@ -422,7 +425,7 @@ class ImageListPager extends TablePager { function formatValue( $field, $value ) { switch ( $field ) { case 'thumb': - $opt = array( 'time' => $this->mCurrentRow->img_timestamp ); + $opt = array( 'time' => wfTimestamp( TS_MW, $this->mCurrentRow->img_timestamp ) ); $file = RepoGroup::singleton()->getLocalRepo()->findFile( $value, $opt ); // If statement for paranoia if ( $file ) { @@ -519,6 +522,7 @@ class ImageListPager extends TablePager { ); } + $this->getOutput()->addModules( 'mediawiki.userSuggest' ); $fields['user'] = array( 'type' => 'text', 'name' => 'user', @@ -527,6 +531,7 @@ class ImageListPager extends TablePager { 'default' => $this->mUserName, 'size' => '40', 'maxlength' => '255', + 'cssclass' => 'mw-autocomplete-user', // used by mediawiki.userSuggest ); $fields['ilshowall'] = array( @@ -541,6 +546,7 @@ class ImageListPager extends TablePager { unset( $query['title'] ); unset( $query['limit'] ); unset( $query['ilsearch'] ); + unset( $query['ilshowall'] ); unset( $query['user'] ); $form = new HTMLForm( $fields, $this->getContext() ); |