Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -195,22 +195,17 @@ |
196 | 196 | |
197 | 197 | /** List of months in which there are >0 threads, suitable for threadsOfArticleInMonth. */ |
198 | 198 | static function monthsWhereArticleHasThreads( $article ) { |
199 | | - |
200 | | - global $wgLang; |
201 | | - |
202 | 199 | $threads = Thread::allThreadsOfArticle( $article ); |
203 | 200 | $months = array(); |
204 | 201 | foreach( $threads as $t ) { |
205 | 202 | $m = substr( $t->touched(), 0, 6 ); |
206 | 203 | if ( !array_key_exists( $m, $months ) ) { |
207 | | - $year = substr($m, 0, 4); |
208 | | - $month_num = substr($m, 4, 2); |
209 | | - $months[$m] = $wgLang->getMonthName( $month_num ) . ' ' . $year; |
| 204 | + if (!in_array( $m, $months )) $months[] = $m; |
210 | 205 | } |
211 | 206 | } |
212 | 207 | return $months; |
213 | 208 | } |
214 | | - |
| 209 | + |
215 | 210 | static function latestNThreadsOfArticle( $article, $n ) { |
216 | 211 | return Thread::threadsWhere( array('thread_article' => $article->getID(), |
217 | 212 | 'thread_subthread_of is null'), |