Index: trunk/phase3/includes/WikiFilePage.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | protected $mFileLoaded = false; // !< |
12 | 12 | protected $mDupes = null; // !< |
13 | 13 | |
14 | | - function __construct( $title ) { |
| 14 | + public function __construct( $title ) { |
15 | 15 | parent::__construct( $title ); |
16 | 16 | $this->mDupes = null; |
17 | 17 | $this->mRepo = null; |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -79,17 +79,16 @@ |
80 | 80 | /** |
81 | 81 | * Constructor from a page id |
82 | 82 | * |
83 | | - * Always override this for all subclasses (until we use PHP with LSB) |
84 | | - * |
85 | 83 | * @param $id Int article ID to load |
86 | 84 | * |
87 | 85 | * @return WikiPage |
88 | 86 | */ |
89 | 87 | public static function newFromID( $id ) { |
90 | 88 | $t = Title::newFromID( $id ); |
91 | | - # @todo FIXME: Doesn't inherit right |
92 | | - return $t == null ? null : new self( $t ); |
93 | | - # return $t == null ? null : new static( $t ); // PHP 5.3 |
| 89 | + if ( $t ) { |
| 90 | + return self::factory( $t ); |
| 91 | + } |
| 92 | + return null; |
94 | 93 | } |
95 | 94 | |
96 | 95 | /** |
Index: trunk/phase3/includes/WikiCategoryPage.php |
— | — | @@ -4,19 +4,6 @@ |
5 | 5 | */ |
6 | 6 | class WikiCategoryPage extends WikiPage { |
7 | 7 | /** |
8 | | - * Constructor from a page id |
9 | | - * @param $id Int article ID to load |
10 | | - * |
11 | | - * @return WikiCategoryPage |
12 | | - */ |
13 | | - public static function newFromID( $id ) { |
14 | | - $t = Title::newFromID( $id ); |
15 | | - # @todo FIXME: Doesn't inherit right |
16 | | - return $t == null ? null : new self( $t ); |
17 | | - # return $t == null ? null : new static( $t ); // PHP 5.3 |
18 | | - } |
19 | | - |
20 | | - /** |
21 | 8 | * Don't return a 404 for categories in use. |
22 | 9 | * In use defined as: either the actual page exists |
23 | 10 | * or the category currently has members. |