setHeaders(); $this->outputHeader(); if ( $this->including() ) { $userName = $par; $search = ''; $showAll = false; } else { $userName = $this->getRequest()->getText( 'user', $par ); $search = $this->getRequest()->getText( 'ilsearch', '' ); $showAll = $this->getRequest()->getBool( 'ilshowall', false ); } $pager = new ImageListPager( $this->getContext(), $userName, $search, $this->including(), $showAll ); $out = $this->getOutput(); if ( $this->including() ) { $out->addParserOutputContent( $pager->getBodyOutput() ); } else { $user = $pager->getRelevantUser(); $this->getSkin()->setRelevantUser( $user ); $pager->getForm(); $out->addParserOutputContent( $pager->getFullOutput() ); } } /** * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for * @param int $limit Maximum number of results to return (usually 10) * @param int $offset Number of results to skip (usually 0) * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit, $offset ) { $user = User::newFromName( $search ); if ( !$user ) { // No prefix suggestion for invalid user return []; } // Autocomplete subpage as user list - public to allow caching return UserNamePrefixSearch::search( 'public', $search, $limit, $offset ); } protected function getGroupName() { return 'media'; } }