ApiQueryBase::titleToKey and ApiQueryBase::keyToTitle;
authorDaniel Friesen <dantman@users.mediawiki.org>
Mon, 25 Aug 2008 06:57:15 +0000 (06:57 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Mon, 25 Aug 2008 06:57:15 +0000 (06:57 +0000)
commit69e49e832ef17d6458ec28db33d9b2c3d4475433
tree82a8a76d3d4fb0143f1cb88023e5ca20dfffd5db
parent4fcb1312f2b46e56f3ee94a0c3b5128e82efc404
ApiQueryBase::titleToKey and ApiQueryBase::keyToTitle;
Don't bother constructing a title object when the $title/$key is ''. (Why were we doing this check after creating the title object, there's no point in even creating a big object if we're just going to check the old string we already had to see if it's empty)
And as a bonus, use trim() so that user input such as ' ' does not dish out an error (There really isn't much difference between "&title=" and "&title= " if one shouldn't output an error, why should the other?).
includes/api/ApiQueryBase.php