X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListfiles.php;h=2d79aaf8e89e31fe8018e22a0939cebf951aa2e8;hb=d964c0ed629bcc9620e2a6e2d9b02741d3eaba25;hp=d4b45fb31142e913d993c3ae6ba09a19b7e82756;hpb=36e37310841f6ec6d0185119d17fa7bbcbdecf26;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index d4b45fb311..2d79aaf8e8 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -84,14 +84,26 @@ class ImageListPager extends TablePager { function __construct( IContextSource $context, $userName = null, $search = '', $including = false, $showAll = false ) { + $this->setContext( $context ); $this->mIncluding = $including; $this->mShowAll = $showAll; if ( $userName !== null && $userName !== '' ) { $nt = Title::newFromText( $userName, NS_USER ); + $user = User::newFromName( $userName, false ); if ( !is_null( $nt ) ) { $this->mUserName = $nt->getText(); } + if ( !$user || ( $user->isAnon() && !User::isIP( $user->getName() ) ) ) { + $this->getOutput()->wrapWikiMsg( + "
\n$1\n
", + array( + 'listfiles-userdoesnotexist', + wfEscapeWikiText( $userName ), + ) + ); + } + } if ( $search !== '' && !$this->getConfig()->get( 'MiserMode' ) ) { @@ -107,7 +119,7 @@ class ImageListPager extends TablePager { } if ( !$including ) { - if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) { + if ( $this->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) { $this->mDefaultDirection = IndexPager::DIR_DESCENDING; } else { $this->mDefaultDirection = IndexPager::DIR_ASCENDING;