Categoryfinder::seed() was passing category names through Title::newFromText($ct,NS_CATEGORY), which meant that if the name started with what looks like a namespace, that would override the NS_CATEGORY default.
Thus you got 'Wikipedia:Books' -> text portion 'Books' when you wanted 'Category:Wikipedia:Books' -> text portion 'Wikipedia:Books'.
Using Title::makeTitleSafe(NS_CATEGORY,$ct) instead forces it to always use the category namespace.
Additionally, I've added a check for invalid input -- previously a bad input leading to an invalid title would just kill it dead with a fatal error. Invalid input in the category list is now skipped.
certain designations, which are displayed on various summaries of changes, and
the entries can be styled with CSS.
* (bug 17207) Fix regression breaking category page display on PHP 5.1
+* Categoryfinder utility class no longer fails on invalid input or gives wrong
+ results for category names that include pseudo-namespaces
== API changes in 1.15 ==
* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
# Set the list of target categories; convert them to DBKEY form first
$this->targets = array () ;
foreach ( $categories AS $c ) {
- $ct = Title::newFromText ( $c , NS_CATEGORY ) ;
- $c = $ct->getDBkey () ;
- $this->targets[$c] = $c ;
+ $ct = Title::makeTitleSafe( NS_CATEGORY, $c );
+ if( $ct ) {
+ $c = $ct->getDBkey();
+ $this->targets[$c] = $c;
+ }
}
}