* (bug 14659) Passing the default limit param to Special:Recentchanges no more
falls back to the user option
* (bug 14954) Fix regression in Modern and Simple skins
+* Recursion loop check added to Categoryfinder class
=== API changes in 1.14 ===
* This functions recurses through the parent representation, trying to match the conditions
* @param $id The article/category to check
* @param $conds The array of categories to match
+ * @param $path used to check for recursion loops
* @return bool Does this match the conditions?
*/
- function check ( $id , &$conds ) {
+ function check ( $id , &$conds, $path=array() ) {
+ // Check for loops and stop!
+ if( in_array( $id, $path ) )
+ return false;
+ $path[] = $id;
+
# Shortcut (runtime paranoia): No contitions=all matched
if ( count ( $conds ) == 0 ) return true ;
# No sub-parent
continue ;
}
- $done = $this->check ( $this->name2id[$pname] , $conds ) ;
+ $done = $this->check ( $this->name2id[$pname] , $conds, $path );
if ( $done OR count ( $conds ) == 0 ) {
# Subparents have done it!
return true ;