X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FCategoryPage.php;h=865471c33dc6b62812366b545633f1b1fcd908ab;hb=bae9c5aca69c62ff8ae32956a082c0787cb06b73;hp=55fe1562da0d42ab248ea4163cb4882961353e7b;hpb=d716155c8b2d6e4a51a4110195cee7a1794846e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/CategoryPage.php b/includes/page/CategoryPage.php index 55fe1562da..865471c33d 100644 --- a/includes/page/CategoryPage.php +++ b/includes/page/CategoryPage.php @@ -43,18 +43,6 @@ class CategoryPage extends Article { return new WikiCategoryPage( $title ); } - /** - * Constructor from a page id - * @param int $id Article ID to load - * @return CategoryPage|null - */ - public static function newFromID( $id ) { - $t = Title::newFromID( $id ); - # @todo FIXME: Doesn't inherit right - return $t == null ? null : new self( $t ); - # return $t == null ? null : new static( $t ); // PHP 5.3 - } - function view() { $request = $this->getContext()->getRequest(); $diff = $request->getVal( 'diff' ); @@ -71,13 +59,13 @@ class CategoryPage extends Article { } $title = $this->getTitle(); - if ( NS_CATEGORY == $title->getNamespace() ) { + if ( $title->inNamespace( NS_CATEGORY ) ) { $this->openShowCategory(); } parent::view(); - if ( NS_CATEGORY == $title->getNamespace() ) { + if ( $title->inNamespace( NS_CATEGORY ) ) { $this->closeShowCategory(); } }