User "Catrope" changed the status of MediaWiki.r91123. Old Status: new New Status: fixme
User "Catrope" also posted a comment on MediaWiki.r91123. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91123#c22036 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: Per Aaron's recommendation, I grepped the extensions dir for all hooks that he moved from Article to WikiPage (thus changing the type of the $this parameter), and found the following issues: * <code>extensions/Checkpoint/Checkpoint.php:48</code> calls <code>$article->fetchContent()</code> but <code>$article</code> is now a WikiPage and doesn't have <code>fetchContent()</code> * <code>extensions/PureWikiDeletion/PureWikiDeletion.hooks.php:59</code> calls <code>$article->generateReason()</code> on a WikiPage Can be marked resolved once those two are fixed. _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview