r75182 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75181‎ | r75182 | r75183 >
Date:05:00, 22 October 2010
Author:juliano
Status:deferred
Tags:
Comment:
Follow-up r74035. Keep GAID_FOR_UPDATE in order to allow the extension to run
on current stable MediaWiki 1.16.
Modified paths:
  • /trunk/extensions/Wikilog/TODO (modified) (history)
  • /trunk/extensions/Wikilog/WikilogComment.php (modified) (history)
  • /trunk/extensions/Wikilog/WikilogCommentsPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikilog/WikilogCommentsPage.php
@@ -29,6 +29,12 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
 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+
3339 /**
3440 * Wikilog comments namespace handler class.
3541 *
@@ -377,6 +383,10 @@
378384 array( 'id' => 'wl-comment-form' ) ) . "\n";
379385 }
380386
 387+ /**
 388+ * @todo (In Wikilog 1.3.x) Replace GAID_FOR_UPDATE with
 389+ * Title::GAID_FOR_UPDATE.
 390+ */
381391 protected function setCommentApproval( $comment, $approval ) {
382392 global $wgOut, $wgUser;
383393
@@ -399,7 +409,7 @@
400410 array( 'content', 'parsemag' ),
401411 $comment->mUserText
402412 );
403 - $id = $title->getArticleID( Title::GAID_FOR_UPDATE );
 413+ $id = $title->getArticleID( GAID_FOR_UPDATE );
404414 if ( $this->doDeleteArticle( $reason, false, $id ) ) {
405415 $comment->deleteComment();
406416 $log->addEntry( 'c-reject', $title, '' );
Index: trunk/extensions/Wikilog/TODO
@@ -17,3 +17,10 @@
1818 * WikilogTemplatePager::formatRow(): Remove {{{pubdate}}} and {{{updated}}}.
1919 * Remove wfLoadExtensionMessages() calls.
2020 * Replace Xml::hidden() calls with Html::hidden().
 21+
 22+=== Wikilog 1.3.0.
 23+
 24+* Drop support for Mw1.16 and earlier.
 25+* Remove Mw1.16 compatibility boilerplate in:
 26+ - WikilogComment::getCommentArticleTitle() (GAID_FOR_UPDATE).
 27+ - WikilogCommentsPage::setCommentApproval() (GAID_FOR_UPDATE).
Index: trunk/extensions/Wikilog/WikilogComment.php
@@ -29,6 +29,12 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
 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+
3339 /**
3440 * Wikilog article comment database entry.
3541 */
@@ -238,12 +244,14 @@
239245
240246 /**
241247 * Returns comment article title.
 248+ * @todo (In Wikilog 1.3.x) Replace GAID_FOR_UPDATE with
 249+ * Title::GAID_FOR_UPDATE.
242250 */
243251 public function getCommentArticleTitle() {
244252 if ( $this->mCommentTitle ) {
245253 return $this->mCommentTitle;
246254 } else if ( $this->mCommentPage ) {
247 - return Title::newFromID( $this->mCommentPage, Title::GAID_FOR_UPDATE );
 255+ return Title::newFromID( $this->mCommentPage, GAID_FOR_UPDATE );
248256 } else {
249257 $it = $this->mItem->mTitle;
250258 return Title::makeTitle(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74035Follow up r74034: Refactor GAID_FOR_UPDATE into Title::GAID_FOR_UPDATE. Yay l...demon19:14, 30 September 2010

Status & tagging log