* Special handling for category pages
*/
class WikiCategoryPage extends WikiPage {
- /**
- * Constructor from a page id
- * @param $id Int article ID to load
- *
- * @return WikiCategoryPage
- */
- 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
- }
-
/**
* Don't return a 404 for categories in use.
* In use defined as: either the actual page exists
protected $mFileLoaded = false; // !<
protected $mDupes = null; // !<
- function __construct( $title ) {
+ public function __construct( $title ) {
parent::__construct( $title );
$this->mDupes = null;
$this->mRepo = null;
/**
* Constructor from a page id
*
- * Always override this for all subclasses (until we use PHP with LSB)
- *
* @param $id Int article ID to load
*
* @return WikiPage
*/
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
+ if ( $t ) {
+ return self::factory( $t );
+ }
+ return null;
}
/**