Merge "Deprecfate WikiRevision::getText"
[lhc/web/wiklou.git] / includes / page / CategoryPage.php
index 55fe156..865471c 100644 (file)
@@ -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();
                }
        }