Index: trunk/extensions/Wikilog/WikilogUtils.php |
— | — | @@ -59,9 +59,6 @@ |
60 | 60 | * parser that we could mess up without interfering with normal page |
61 | 61 | * rendering, and we can't create a new instance because of too many |
62 | 62 | * broken extensions around. Check self::parserSanityCheck(). |
63 | | - * |
64 | | - * @todo (In Wikilog 1.3.x) Remove deprecated WikilogParserCache |
65 | | - * in favor of ParserOptions::addExtraKey(). |
66 | 63 | */ |
67 | 64 | public static function parsedArticle( Title $title, $feed = false ) { |
68 | 65 | global $wgWikilogCloneParser; |
— | — | @@ -84,13 +81,7 @@ |
85 | 82 | if ( $feed ) { |
86 | 83 | $parserOpt->setEditSection( false ); |
87 | 84 | |
88 | | - # NOTE (Mw1.16- COMPAT) ParserOptions::addExtraKey() added in |
89 | | - # MediaWiki 1.17 (r70822) makes WikilogParserCache obsolete. |
90 | | - if ( method_exists( $parserOpt, 'addExtraKey' ) ) { |
91 | | - $parserOpt->addExtraKey( "WikilogFeed" ); |
92 | | - } else { |
93 | | - $parserCache = WikilogParserCache::singleton(); |
94 | | - } |
| 85 | + $parserOpt->addExtraKey( "WikilogFeed" ); |
95 | 86 | } else { |
96 | 87 | $parserOpt->enableLimitReport(); |
97 | 88 | } |
Index: trunk/extensions/Wikilog/WikilogComment.php |
— | — | @@ -29,12 +29,6 @@ |
30 | 30 | if ( !defined( 'MEDIAWIKI' ) ) |
31 | 31 | die(); |
32 | 32 | |
33 | | -# NOTE (Mw1.16- COMPAT): GAID_FOR_UPDATE removed and replaced by |
34 | | -# Title::GAID_FOR_UPDATE in Mw1.17. Remove this define and replace its |
35 | | -# occurrence WikilogComment::getCommentArticleTitle() in Wl1.3. |
36 | | -if ( !defined( 'GAID_FOR_UPDATE' ) ) |
37 | | - define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE ); |
38 | | - |
39 | 33 | /** |
40 | 34 | * Wikilog article comment database entry. |
41 | 35 | */ |
— | — | @@ -244,14 +238,12 @@ |
245 | 239 | |
246 | 240 | /** |
247 | 241 | * Returns comment article title. |
248 | | - * @todo (In Wikilog 1.3.x) Replace GAID_FOR_UPDATE with |
249 | | - * Title::GAID_FOR_UPDATE. |
250 | 242 | */ |
251 | 243 | public function getCommentArticleTitle() { |
252 | 244 | if ( $this->mCommentTitle ) { |
253 | 245 | return $this->mCommentTitle; |
254 | 246 | } elseif ( $this->mCommentPage ) { |
255 | | - return Title::newFromID( $this->mCommentPage, GAID_FOR_UPDATE ); |
| 247 | + return Title::newFromID( $this->mCommentPage, Title::GAID_FOR_UPDATE ); |
256 | 248 | } else { |
257 | 249 | $it = $this->mItem->mTitle; |
258 | 250 | return Title::makeTitle( |
Index: trunk/extensions/Wikilog/Wikilog.php |
— | — | @@ -82,7 +82,6 @@ |
83 | 83 | // WikilogParser.php |
84 | 84 | 'WikilogParser' => $dir . 'WikilogParser.php', |
85 | 85 | 'WikilogParserOutput' => $dir . 'WikilogParser.php', |
86 | | - 'WikilogParserCache' => $dir . 'WikilogParser.php', |
87 | 86 | |
88 | 87 | // WikilogItemPager.php |
89 | 88 | 'WikilogItemPager' => $dir . 'WikilogItemPager.php', |
Index: trunk/extensions/Wikilog/WikilogCommentsPage.php |
— | — | @@ -29,12 +29,6 @@ |
30 | 30 | if ( !defined( 'MEDIAWIKI' ) ) |
31 | 31 | die(); |
32 | 32 | |
33 | | -# NOTE (Mw1.16- COMPAT): GAID_FOR_UPDATE removed and replaced by |
34 | | -# Title::GAID_FOR_UPDATE in Mw1.17. Remove this define and replace its |
35 | | -# occurrence WikilogCommentsPage::setCommentApproval() in Wl1.3. |
36 | | -if ( !defined( 'GAID_FOR_UPDATE' ) ) |
37 | | - define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE ); |
38 | | - |
39 | 33 | /** |
40 | 34 | * Wikilog comments namespace handler class. |
41 | 35 | * |
— | — | @@ -407,7 +401,7 @@ |
408 | 402 | array( 'content', 'parsemag' ), |
409 | 403 | $comment->mUserText |
410 | 404 | ); |
411 | | - $id = $title->getArticleID( GAID_FOR_UPDATE ); |
| 405 | + $id = $title->getArticleID( Title::GAID_FOR_UPDATE ); |
412 | 406 | if ( $this->doDeleteArticle( $reason, false, $id ) ) { |
413 | 407 | $comment->deleteComment(); |
414 | 408 | $log->addEntry( 'c-reject', $title, '' ); |
Index: trunk/extensions/Wikilog/WikilogParser.php |
— | — | @@ -611,43 +611,3 @@ |
612 | 612 | public function getAuthors() { return $this->mAuthors; } |
613 | 613 | public function getTags() { return $this->mTags; } |
614 | 614 | } |
615 | | - |
616 | | -/** |
617 | | - * Since wikilog parses articles with specific options in order to be |
618 | | - * rendered in feeds, it is necessary to store these parsed outputs in |
619 | | - * the cache separately. This derived class from ParserCache overloads the |
620 | | - * getKey() function in order to provide a specific namespace for this |
621 | | - * purpose. |
622 | | - * |
623 | | - * @deprecated In MediaWiki 1.17, in favor of $parserOpt->addExtraKey(). |
624 | | - * @note MediaWiki 1.17 completely breaks this hack (in r70783). getKey() has |
625 | | - * different parameters and very different implementation. Current version |
626 | | - * is compatible with 1.16 and should only be used in that version, but may |
627 | | - * issue warnings when used in 1.17. In 1.17, this class should never be |
628 | | - * used due to the branch in WikilogUtils::parsedArticle(). It will be |
629 | | - * removed anyways, as soon as we drop support for 1.16. |
630 | | - * @todo (In Wikilog 1.3.x) Remove this class (see also WikilogUtils::parsedArticle()). |
631 | | - */ |
632 | | -class WikilogParserCache |
633 | | - extends ParserCache |
634 | | -{ |
635 | | - public static function singleton() { |
636 | | - static $instance; |
637 | | - if ( !isset( $instance ) ) { |
638 | | - global $parserMemc; |
639 | | - $instance = new WikilogParserCache( $parserMemc ); |
640 | | - } |
641 | | - return $instance; |
642 | | - } |
643 | | - |
644 | | - public function getKey( $article, $popts ) { |
645 | | - if ( $popts instanceof User ) // API change in MediaWiki 1.15. |
646 | | - $popts = ParserOptions::newFromUser( $popts ); |
647 | | - |
648 | | - $user = $popts->mUser; |
649 | | - $pageid = intval( $article->getID() ); |
650 | | - $hash = $user->getPageRenderingHash(); |
651 | | - $key = wfMemcKey( 'wlcache', 'idhash', "$pageid-$hash" ); |
652 | | - return $key; |
653 | | - } |
654 | | -} |
Index: trunk/extensions/Wikilog/WikilogFeed.php |
— | — | @@ -242,13 +242,7 @@ |
243 | 243 | "too young: age ($age) < timeout ($wgFeedCacheTimeout) " . |
244 | 244 | "($feedkey; $tsCache; $tsData)\n" ); |
245 | 245 | |
246 | | - # NOTE (Mw1.16- COMPAT): OutputPage::setLastModified() |
247 | | - # introduced in Mw1.17. Remove this guard after Wl1.2. |
248 | | - if ( method_exists( $wgOut, 'setLastModified' ) ) { |
249 | | - $wgOut->setLastModified( $tsCache ); |
250 | | - } else { |
251 | | - $wgOut->mLastModified = wfTimestamp( TS_RFC2822, $tsCache ); |
252 | | - } |
| 246 | + $wgOut->setLastModified( $tsCache ); |
253 | 247 | |
254 | 248 | return $messageMemc->get( $feedkey ); |
255 | 249 | } elseif ( $tsCache >= $tsData ) { |
Index: trunk/extensions/Wikilog/README |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | |
35 | 35 | == Requirements == |
36 | 36 | |
37 | | -* MediaWiki 1.16 or higher. |
| 37 | +* MediaWiki 1.17 or higher. |
38 | 38 | * A MySQL database backend. |
39 | 39 | |
40 | 40 | == Installation == |
Index: trunk/extensions/Wikilog/WikilogHooks.php |
— | — | @@ -322,32 +322,19 @@ |
323 | 323 | * |
324 | 324 | * @todo Add support for PostgreSQL and SQLite databases. |
325 | 325 | */ |
326 | | - static function ExtensionSchemaUpdates( $updater = null ) { |
| 326 | + static function ExtensionSchemaUpdates( $updater ) { |
327 | 327 | $dir = dirname( __FILE__ ) . '/'; |
328 | 328 | |
329 | | - if ( $updater === null ) { |
330 | | - global $wgDBtype, $wgExtNewIndexes, $wgExtNewTables; |
331 | | - if ( $wgDBtype == 'mysql' ) { |
332 | | - $wgExtNewTables[] = array( "wikilog_wikilogs", "{$dir}wikilog-tables.sql" ); |
333 | | - $wgExtNewIndexes[] = array( "wikilog_comments", "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql" ); |
334 | | - } else { |
335 | | - // TODO: PostgreSQL, SQLite, etc... |
336 | | - print "\n" . |
337 | | - "Warning: There are no table structures for the Wikilog\n" . |
338 | | - "extension other than for MySQL at this moment.\n\n"; |
339 | | - } |
| 329 | + if ( $updater->getDB()->getType() == 'mysql' ) { |
| 330 | + $updater->addExtensionUpdate( array( 'addTable', "wikilog_wikilogs", |
| 331 | + "{$dir}wikilog-tables.sql", true ) ); |
| 332 | + $updater->addExtensionUpdate( array( 'addIndex', "wikilog_comments", |
| 333 | + "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql", true ) ); |
340 | 334 | } else { |
341 | | - if ( $updater->getDB()->getType() == 'mysql' ) { |
342 | | - $updater->addExtensionUpdate( array( 'addTable', "wikilog_wikilogs", |
343 | | - "{$dir}wikilog-tables.sql", true ) ); |
344 | | - $updater->addExtensionUpdate( array( 'addIndex', "wikilog_comments", |
345 | | - "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql", true ) ); |
346 | | - } else { |
347 | | - // TODO: PostgreSQL, SQLite, etc... |
348 | | - print "\n" . |
349 | | - "Warning: There are no table structures for the Wikilog\n" . |
350 | | - "extension other than for MySQL at this moment.\n\n"; |
351 | | - } |
| 335 | + // TODO: PostgreSQL, SQLite, etc... |
| 336 | + print "\n" . |
| 337 | + "Warning: There are no table structures for the Wikilog\n" . |
| 338 | + "extension other than for MySQL at this moment.\n\n"; |
352 | 339 | } |
353 | 340 | return true; |
354 | 341 | } |
Index: trunk/extensions/Wikilog/TODO |
— | — | @@ -2,11 +2,4 @@ |
3 | 3 | |
4 | 4 | === Wikilog 1.3.0. === |
5 | 5 | |
6 | | -* Drop support for Mw 1.16 and earlier. |
7 | | -* Remove Mw1.16 compatibility boilerplate in: |
8 | | - - WikilogFeed::loadFromCache() (bug 21916). |
9 | | - - WikilogComment::getCommentArticleTitle() (GAID_FOR_UPDATE). |
10 | | - - WikilogCommentsPage::setCommentApproval() (GAID_FOR_UPDATE). |
11 | | -* Remove deprecated WikilogParserCache: |
12 | | - - WikilogParserCache class definition in WikilogParser.php. |
13 | | - - WikilogUtils::parsedArticle() in WikilogUtils.php. |
| 6 | +(empty) |