$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();
} 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;
* @param int $limit
* @param bool $asc
* @return array
+ * @throws MWException
*/
function reallyDoQuery( $offset, $limit, $asc ) {
$prevTableName = $this->mTableName;
);
}
+ $this->getOutput()->addModules( 'mediawiki.userSuggest' );
$fields['user'] = array(
'type' => 'text',
'name' => 'user',
'default' => $this->mUserName,
'size' => '40',
'maxlength' => '255',
+ 'cssclass' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
);
$fields['ilshowall'] = array(
unset( $query['title'] );
unset( $query['limit'] );
unset( $query['ilsearch'] );
+ unset( $query['ilshowall'] );
unset( $query['user'] );
$form = new HTMLForm( $fields, $this->getContext() );