r87311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87310‎ | r87311 | r87312 >
Date:01:29, 3 May 2011
Author:demon
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -2145,10 +2145,13 @@
21462146 return true;
21472147 }
21482148
2149 - public static function gnsmQueryModifier( array $params, array &$joins, array &$conditions ) {
2150 - $filterSet = array( GoogleNewsSitemap::OPT_ONLY, GoogleNewsSitemap::OPT_EXCLUDE );
 2149+ public static function gnsmQueryModifier( array $params, array &$joins, array &$conditions, array &$tables ) {
 2150+ $filterSet = array( GoogleNewsSitemap::OPT_ONLY => true,
 2151+ GoogleNewsSitemap::OPT_EXCLUDE => true
 2152+ );
21512153 # Either involves the same JOIN here...
21522154 if ( isset( $filterSet[ $params['stable'] ] ) || isset( $filterSet[ $params['quality'] ] ) ) {
 2155+ $tables[] = 'flaggedpages';
21532156 $joins['flaggedpages'] = array( 'LEFT JOIN', 'page_id = fp_page_id' );
21542157 }
21552158
@@ -2166,7 +2169,7 @@
21672170 $conditions[] = 'fp_quality >= 1';
21682171 break;
21692172 case GoogleNewsSitemap::OPT_EXCLUDE:
2170 - $conditions['fp_quality'] = 0;
 2173+ $conditions[] = 'fp_quality = 0 OR fp_quality IS NULL';
21712174 break;
21722175 }
21732176
Property changes on: branches/wmf/1.17wmf1/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
21742177 Merged /trunk/extensions/FlaggedRevs:r87236
Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php
@@ -270,12 +270,13 @@
271271 // so this can't ever work with uncategorized articles
272272 $fields = array( 'page_namespace', 'page_title', 'page_id', 'c1.cl_timestamp' );
273273 $conditions = array();
 274+ $joins = array();
274275
275276 if ( $params['namespace'] !== false ) {
276277 $conditions['page_namespace'] = $params['namespace'];
277278 }
278279
279 - wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions));
 280+ wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions, &$tables));
280281
281282 switch ( $params['redirects'] ) {
282283 case self::OPT_ONLY:
@@ -307,7 +308,6 @@
308309 $currentTableNumber = 1;
309310 $categorylinks = $dbr->tableName( 'categorylinks' );
310311
311 - $joins = array();
312312 for ( $i = 0; $i < $params['catCount']; $i++ ) {
313313 $joins["$categorylinks AS c$currentTableNumber"] = array( 'INNER JOIN',
314314 array( "page_id = c{$currentTableNumber}.cl_from",
Property changes on: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap
___________________________________________________________________
Added: svn:mergeinfo
315315 Merged /branches/sqlite/extensions/GoogleNewsSitemap:r58211-58321
316316 Merged /trunk/phase3/extensions/GoogleNewsSitemap:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
317317 Merged /branches/new-installer/phase3/extensions/GoogleNewsSitemap:r43664-66004
318318 Merged /branches/wmf-deployment/extensions/GoogleNewsSitemap:r60970
319319 Merged /branches/REL1_15/phase3/extensions/GoogleNewsSitemap:r51646
320320 Merged /branches/wmf/1.16wmf4/extensions/GoogleNewsSitemap:r67177,69199,76243,77266
321321 Merged /trunk/extensions/GoogleNewsSitemap:r87236

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87157Rename the "stable" option to "stablepages" to match docs and be consistent...bawolff02:11, 30 April 2011
r87236Fix GoogleNewsSitemap flagged revs support, which was rather broken....bawolff05:46, 2 May 2011

Status & tagging log