Index: trunk/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy_body.php |
— | — | @@ -131,8 +131,18 @@ |
132 | 132 | $tables[] = 'revision'; |
133 | 133 | $joinConds['revision'] = |
134 | 134 | array( 'left join', |
135 | | - array( 'rev_page=page_id', "rev_timestamp > $cutoff" ) ); |
136 | | - $fields[] = 'count(distinct rev_id) as value'; |
| 135 | + array( 'rev_page=page_id', |
| 136 | + "rev_timestamp > $cutoff", |
| 137 | + "rev_page IS NOT NULL" ) ); |
| 138 | + $fields[] = 'count(distinct rev_id) + count(distinct thread_id) as value'; |
| 139 | + |
| 140 | + // Include LQT posts |
| 141 | + $tables[] = 'thread'; |
| 142 | + $joinConds['thread'] = |
| 143 | + array( 'left join', |
| 144 | + array( 'thread.thread_article_title=page.page_title', |
| 145 | + "thread.thread_modified > $cutoff" ) |
| 146 | + ); |
137 | 147 | } elseif ( $sortField == 'ranking' ) { |
138 | 148 | $tables[] = 'pagelinks'; |
139 | 149 | $joinConds['pagelinks'] = array( 'left join', |