* Fix username handling issue with `auprefix` parameter
Usernames are *not* stored in "key" format, and treating them as such will cause various comparisons to misbehave. This was preventing `aufrom` from including the username (as it was supposed to) and would have broken `auprefix` for all comparisons containing spaces.
As a side-effect, both these parameters will now treat underscores as equivalent to spaces.
* Added site statistics (siprop=statistics for meta=siteinfo)
* (bug 10902) Unable to fetch user contributions from IP addresses
* `list=usercontribs` no longer requires that the user exist
+* (bug 10971) `aufrom` parameter doesn't work with spaces
+* Fix username handling issue with `auprefix` parameter
+* Treat underscores as spaces for `aufrom` and `auprefix` parameters
== Maintenance script changes since 1.10 ==
$limit = $params['limit'];
$tables = $db->tableName('user');
- if (!is_null($params['from']))
- $this->addWhere('user_name>=' . $db->addQuotes(ApiQueryBase :: titleToKey($params['from'])));
-
- if (isset($params['prefix']))
- $this->addWhere("user_name LIKE '" . $db->escapeLike(ApiQueryBase :: titleToKey($params['prefix'])) . "%'");
+ if( !is_null( $params['from'] ) )
+ $this->addWhere( 'user_name >= ' . $db->addQuotes( self::keyToTitle( $params['from'] ) ) );
+
+ if( isset( $params['prefix'] ) )
+ $this->addWhere( 'user_name LIKE "' . $db->escapeLike( self::keyToTitle( $params['prefix'] ) ) . '%"' );
if (!is_null($params['group'])) {
// Filter only users that belong to a given group