Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -418,6 +418,7 @@ |
419 | 419 | static function addCategory( $title ) { |
420 | 420 | global $wgOut; |
421 | 421 | global $wgCollectionMaxArticles; |
| 422 | + global $wgCollectionArticleNamespaces; |
422 | 423 | |
423 | 424 | $limit = $wgCollectionMaxArticles - self::countArticles(); |
424 | 425 | if ( $limit <= 0 ) { |
— | — | @@ -435,7 +436,6 @@ |
436 | 437 | $where = array( |
437 | 438 | 'cl_from=page_id', |
438 | 439 | 'cl_to' => $title->getDBKey(), |
439 | | - 'page_namespace' => NS_MAIN, |
440 | 440 | ); |
441 | 441 | $res = $db->select( $tables, $fields, $where, __METHOD__, $options ); |
442 | 442 | $members = array(); |
— | — | @@ -446,9 +446,11 @@ |
447 | 447 | $limitExceeded = true; |
448 | 448 | break; |
449 | 449 | } |
450 | | - $articleTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); |
451 | | - if ( self::findArticle( $articleTitle->getPrefixedText() ) == -1 ) { |
452 | | - self::addArticle( $articleTitle ); |
| 450 | + if ( in_array( $row->page_namespace, $wgCollectionArticleNamespaces ) ) { |
| 451 | + $articleTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); |
| 452 | + if ( self::findArticle( $articleTitle->getPrefixedText() ) == -1 ) { |
| 453 | + self::addArticle( $articleTitle ); |
| 454 | + } |
453 | 455 | } |
454 | 456 | } |
455 | 457 | $db->freeResult( $res ); |