Index: branches/wmf/1.16wmf4/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy_body.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | array( |
16 | 16 | 'page_namespace' => 0, |
17 | 17 | "page_title LIKE 'Task_force/%'", |
| 18 | + "page_title NOT LIKE 'Task_force/%/%'", |
18 | 19 | ), __METHOD__ ); |
19 | 20 | |
20 | 21 | return $res; |
— | — | @@ -131,8 +132,18 @@ |
132 | 133 | $tables[] = 'revision'; |
133 | 134 | $joinConds['revision'] = |
134 | 135 | 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 | + ); |
137 | 148 | } elseif ( $sortField == 'ranking' ) { |
138 | 149 | $tables[] = 'pagelinks'; |
139 | 150 | $joinConds['pagelinks'] = array( 'left join', |
— | — | @@ -196,9 +207,12 @@ |
197 | 208 | } |
198 | 209 | |
199 | 210 | $article = new Article( Title::newFromText( $taskForce ) ); |
200 | | - $content = $article->getContent(); |
| 211 | + |
| 212 | + $dbr = wfGetDB( DB_SLAVE ); |
201 | 213 | |
202 | | - $count = self::parseMemberList( $content ); |
| 214 | + $count = $dbr->selectField( 'pagelinks', 'count(*)', |
| 215 | + array( 'pl_from' => $article->getId(), |
| 216 | + 'pl_namespace' => NS_USER ), __METHOD__ ); |
203 | 217 | |
204 | 218 | $wgMemc->set( $key, $count, 86400 ); |
205 | 219 | |
Property changes on: branches/wmf/1.16wmf4/extensions/StrategyWiki |
___________________________________________________________________ |
Name: svn:mergeinfo |
206 | 220 | - /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 |
207 | 221 | + /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 |