Merge "CREDITS for This, That, and the other"
[lhc/web/wiklou.git] / includes / specials / SpecialListfiles.php
index 7576c1f..2d79aaf 100644 (file)
@@ -90,9 +90,20 @@ class ImageListPager extends TablePager {
 
                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(
+                                       "<div class=\"mw-userpage-userdoesnotexist error\">\n$1\n</div>",
+                                       array(
+                                               'listfiles-userdoesnotexist',
+                                               wfEscapeWikiText( $userName ),
+                                       )
+                               );
+                       }
+
                }
 
                if ( $search !== '' && !$this->getConfig()->get( 'MiserMode' ) ) {