r76597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76596‎ | r76597 | r76598 >
Date:21:23, 12 November 2010
Author:demon
Status:ok
Tags:
Comment:
Per CR on r76482, back out changes from r72509 and r74035, relies on core changes
Modified paths:
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevision.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/forms/PageStabilityForm.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedArticle.php
@@ -109,7 +109,7 @@
110110 $srev = $this->getStableRev( $flags );
111111 if ( $srev ) {
112112 if ( $flags & FR_MASTER ) {
113 - $latest = $this->getTitle()->getLatestRevID( Title::GAID_FOR_UPDATE );
 113+ $latest = $this->getTitle()->getLatestRevID( GAID_FOR_UPDATE );
114114 } else {
115115 $latest = $this->getLatest();
116116 }
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -698,7 +698,7 @@
699699 }
700700 # Get the latest revision ID if not set
701701 if ( !$latest ) {
702 - $latest = $article->getTitle()->getLatestRevID( Title::GAID_FOR_UPDATE );
 702+ $latest = $article->getTitle()->getLatestRevID( GAID_FOR_UPDATE );
703703 }
704704 # Get the highest quality revision (not necessarily this one)
705705 $dbw = wfGetDB( DB_MASTER );
@@ -758,7 +758,7 @@
759759 }
760760 # Get the latest revision ID if not set
761761 if ( !$latest ) {
762 - $latest = $article->getTitle()->getLatestRevID( Title::GAID_FOR_UPDATE );
 762+ $latest = $article->getTitle()->getLatestRevID( GAID_FOR_UPDATE );
763763 }
764764 $pageId = $article->getId();
765765 # Update pending times for each level, going from highest to lowest
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/forms/PageStabilityForm.php
@@ -290,7 +290,7 @@
291291 protected function updateLogsAndHistory( $reset ) {
292292 global $wgContLang;
293293 $article = new Article( $this->page );
294 - $latest = $this->page->getLatestRevID( Title::GAID_FOR_UPDATE );
 294+ $latest = $this->page->getLatestRevID( GAID_FOR_UPDATE );
295295 # Config may have changed to allow stable versions.
296296 # Refresh tracking to account for any hidden reviewed versions...
297297 $frev = FlaggedRevision::newFromStable( $this->page, FR_MASTER );
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevision.php
@@ -96,7 +96,7 @@
9797 } else {
9898 $db = wfGetDB( DB_SLAVE );
9999 }
100 - $pageId = $title->getArticleID( $flags & FR_FOR_UPDATE ? Title::GAID_FOR_UPDATE : 0 );
 100+ $pageId = $title->getArticleID( $flags & FR_FOR_UPDATE ? GAID_FOR_UPDATE : 0 );
101101 # Short-circuit query
102102 if ( !$pageId ) {
103103 return null;
@@ -134,7 +134,7 @@
135135 }
136136 $columns = self::selectFields();
137137 $options = array();
138 - $pageId = $title->getArticleID( $flags & FR_MASTER ? Title::GAID_FOR_UPDATE : 0 );
 138+ $pageId = $title->getArticleID( $flags & FR_MASTER ? GAID_FOR_UPDATE : 0 );
139139 if ( !$pageId ) {
140140 return null; // short-circuit query
141141 }
@@ -181,7 +181,7 @@
182182 }
183183 $columns = self::selectFields();
184184 $options = array();
185 - $pageId = $title->getArticleID( $flags & FR_FOR_UPDATE ? Title::GAID_FOR_UPDATE : 0 );
 185+ $pageId = $title->getArticleID( $flags & FR_FOR_UPDATE ? GAID_FOR_UPDATE : 0 );
186186 if ( !$pageId ) {
187187 return null; // short-circuit query
188188 }
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php
@@ -270,14 +270,6 @@
271271 $fields[] = 'cl_sortkey';
272272 $conds['cl_to'] = $this->category;
273273 $conds[] = 'cl_from = page_id';
274 - # Note: single NS always specified
275 - if( $this->namespace == NS_FILE ) {
276 - $conds['cl_type'] = 'file';
277 - } elseif( $this->namespace == NS_CATEGORY ) {
278 - $conds['cl_type'] = 'subcat';
279 - } else {
280 - $conds['cl_type'] = 'page';
281 - }
282274 $this->mIndexField = 'cl_sortkey';
283275 $useIndex = array( 'categorylinks' => 'cl_sortkey' );
284276 $groupBy = 'cl_sortkey,cl_from';
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1569,7 +1569,7 @@
15701570 return true;
15711571 }
15721572 # Get latest revision Id (lag safe)
1573 - $latest = $this->article->getTitle()->getLatestRevID( Title::GAID_FOR_UPDATE );
 1573+ $latest = $this->article->getTitle()->getLatestRevID( GAID_FOR_UPDATE );
15741574 if ( $latest == $frev->getRevId() ) {
15751575 return true; // only for pages with pending edits
15761576 }
@@ -1764,7 +1764,7 @@
17651765 # We are undoing all edits *after* some rev ID (undoafter).
17661766 # If undoafter is not given, then it is the previous rev ID.
17671767 $revId = $wgRequest->getInt( 'undoafter',
1768 - $article->getTitle()->getPreviousRevisionID( $latestId, Title::GAID_FOR_UPDATE ) );
 1768+ $article->getTitle()->getPreviousRevisionID( $latestId, GAID_FOR_UPDATE ) );
17691769 # Undoing other edits...
17701770 } elseif ( $undo ) {
17711771 $revId = $latestId; // current rev is the base rev

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72509(bug 25084) Update FlaggedRevs for new categorylinks schema. Add cl_type to t...demon20:23, 6 September 2010
r74035Follow up r74034: Refactor GAID_FOR_UPDATE into Title::GAID_FOR_UPDATE. Yay l...demon19:14, 30 September 2010
r76482MFT r76481demon22:49, 10 November 2010

Status & tagging log