r67780 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67779‎ | r67780 | r67781 >
Date:06:29, 10 June 2010
Author:werdna
Status:deferred
Tags:
Comment:
Merge r67775 and r67778
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/StrategyWiki (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy_body.php
@@ -14,6 +14,7 @@
1515 array(
1616 'page_namespace' => 0,
1717 "page_title LIKE 'Task_force/%'",
 18+ "page_title NOT LIKE 'Task_force/%/%'",
1819 ), __METHOD__ );
1920
2021 return $res;
@@ -131,8 +132,18 @@
132133 $tables[] = 'revision';
133134 $joinConds['revision'] =
134135 array( 'left join',
135 - array( 'rev_page=page_id', "rev_timestamp > $cutoff" ) );
136 - $fields[] = 'count(distinct rev_id) as value';
 136+ array( 'rev_page=page_id',
 137+ "rev_timestamp > $cutoff",
 138+ "rev_page IS NOT NULL" ) );
 139+ $fields[] = 'count(distinct rev_id) + count(distinct thread_id) as value';
 140+
 141+ // Include LQT posts
 142+ $tables[] = 'thread';
 143+ $joinConds['thread'] =
 144+ array( 'left join',
 145+ array( 'thread.thread_article_title=page.page_title',
 146+ "thread.thread_modified > $cutoff" )
 147+ );
137148 } elseif ( $sortField == 'ranking' ) {
138149 $tables[] = 'pagelinks';
139150 $joinConds['pagelinks'] = array( 'left join',
@@ -196,9 +207,12 @@
197208 }
198209
199210 $article = new Article( Title::newFromText( $taskForce ) );
200 - $content = $article->getContent();
 211+
 212+ $dbr = wfGetDB( DB_SLAVE );
201213
202 - $count = self::parseMemberList( $content );
 214+ $count = $dbr->selectField( 'pagelinks', 'count(*)',
 215+ array( 'pl_from' => $article->getId(),
 216+ 'pl_namespace' => NS_USER ), __METHOD__ );
203217
204218 $wgMemc->set( $key, $count, 86400 );
205219
Property changes on: branches/wmf/1.16wmf4/extensions/StrategyWiki
___________________________________________________________________
Name: svn:mergeinfo
206220 - /branches/wmf-deployment/extensions/StrategyWiki:60970
/trunk/extensions/StrategyWiki:66058-67532
/trunk/phase3/extensions/StrategyWiki:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816
207221 + /branches/wmf-deployment/extensions/StrategyWiki:60970
/trunk/extensions/StrategyWiki:66058-67532,67775,67778
/trunk/phase3/extensions/StrategyWiki:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67775Include LiquidThreads posts in the definition of "edits" for ActiveStrategywerdna06:15, 10 June 2010
r67778Fixes for ActiveStrategy:...werdna06:24, 10 June 2010

Status & tagging log