Thread:Project:Support desk/Search function in File list doesn't work properly/reply (2)

It appears that somewhere around v1.22 they introduced a new function to replace the mQueryConds member variable. When they did this, the patch above recommended stopped working. I believe this is because the new function, "protected fuction buildQueryConds" handles this task now.

TL;DR Go to includes/specials/SpecialListfiles.php, Line 138:

$conds[] = 'LOWER(' . $prefix . '_name)'.

I'm not sure what to change this to.

For the full function, see here: protected function buildQueryConds( $table ) { $prefix = $table === 'image' ? 'img' : 'oi'; $conds = array; if ( !is_null( $this->mUserName ) ) { $conds[ $prefix. '_user_text' ] = $this->mUserName; }               if ( $this->mSearch !== '' ) { $nt = Title::newFromURL( $this->mSearch ); if ( $nt ) { $dbr = wfGetDB( DB_SLAVE ); $conds[] = 'LOWER(' . $prefix . '_name)'. $dbr->buildLike( $dbr->anyString,                                               strtolower( $nt->getDBkey ), $dbr->anyString ); }               }                if ( $table === 'oldimage' ) { // Don't want to deal with revdel. // Future fixme: Show partial information as appropriate. // Would have to be careful about filtering by username when username is deleted. $conds['oi_deleted'] = 0; }               // Add mQueryConds in case anyone was subclassing and using the old variable. return $conds + $this->mQueryConds; }