User "Jack Phoenix" posted a comment on MediaWiki.r91123. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91123#c19015 Commit summary:
* Split off WikiPage class from Article, WikiFilePage class from ImagePage, and WikiCategoryPage from CategoryPage. * WikiPage functions/fields are "magically" part of Article when accessed for b/c. Magic is kind of ugly but there are too many callers to make breaking changes atm. Some functions are just wrappers for WikiPage ones (were magic won't work). * Added newFromID() to each WikiPage subclass (works around pre-existing inheritance problem). * Added Page class for convenient type hinting and changed hints from Article -> Page. This lets things use WikiPage objects without getting type errors. * Updated FlaggedPage to extend WikiPage. Worked around getOldIdFromRequest(). * Added setTimestamp() to WikiPage and moved some timestamp setting code from ParserCache to Article. * Removed ampersands from $dbw arguments. * @TODO: dependency inject user objects for WikiPage The idea is to migrate things to use WikiPage, as the run-of-the-mill "new Article()" call doesn't care about $oldid and $wgRequest. After that, Article, ImagePage, and CategoryPage can be rewritten as an Action class or something sane (a Viewer class of sorts). Comment: <pre><nowiki> --- trunk/phase3/includes/AutoLoader.php 2011/06/29 22:08:12 91122 +++ trunk/phase3/includes/AutoLoader.php 2011/06/29 22:09:51 91123 @@ -159,6 +159,7 @@ 'MWNamespace' => 'includes/Namespace.php', 'OldChangesList' => 'includes/ChangesList.php', 'OutputPage' => 'includes/OutputPage.php', + 'Page' => 'includes/WikiPage.php', 'PageHistory' => 'includes/HistoryPage.php', 'PageHistoryPager' => 'includes/HistoryPage.php', 'PageQueryPage' => 'includes/PageQueryPage.php', @@ -233,10 +234,13 @@ 'WebRequest' => 'includes/WebRequest.php', 'WebRequestUpload' => 'includes/WebRequest.php', 'WebResponse' => 'includes/WebResponse.php', + 'WikiCategoryPage' => 'includes/WikiCategoryPage.php', 'WikiError' => 'includes/WikiError.php', 'WikiErrorMsg' => 'includes/WikiError.php', 'WikiExporter' => 'includes/Export.php', + 'WikiFilePage' => 'includes/WikiFilePage.php', 'WikiImporter' => 'includes/Import.php', + 'WikiPage' => 'includes/WikiPage.php', 'WikiRevision' => 'includes/Import.php', 'WikiMap' => 'includes/WikiMap.php', 'WikiReference' => 'includes/WikiMap.php', </nowiki></pre> Should be indented with a tab character instead of four spaces. _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview