Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * @file |
7 | 7 | * @author Siebrand Mazeland |
8 | 8 | * @author Niklas Laxström |
9 | | - * @copyright Copyright © 2008-2010 Siebrand Mazeland, Niklas Laxström |
| 9 | + * @copyright Copyright © 2008-2011 Siebrand Mazeland, Niklas Laxström |
10 | 10 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
11 | 11 | */ |
12 | 12 | |
— | — | @@ -21,6 +21,8 @@ |
22 | 22 | * @ingroup SpecialPage TranslateSpecialPage Stats |
23 | 23 | */ |
24 | 24 | class SpecialLanguageStats extends IncludableSpecialPage { |
| 25 | + protected $purge = false; |
| 26 | + |
25 | 27 | function __construct() { |
26 | 28 | parent::__construct( 'LanguageStats' ); |
27 | 29 | } |
— | — | @@ -28,6 +30,7 @@ |
29 | 31 | function execute( $par ) { |
30 | 32 | global $wgRequest, $wgOut, $wgUser; |
31 | 33 | |
| 34 | + $this->purge = $wgRequest->getVal( 'action' ) === 'purge'; |
32 | 35 | $this->linker = $wgUser->getSkin(); |
33 | 36 | $this->translate = SpecialPage::getTitleFor( 'Translate' ); |
34 | 37 | |
— | — | @@ -307,6 +310,7 @@ |
308 | 311 | $this->totals[1] += $translated; |
309 | 312 | $this->totals[0] += $fuzzy; |
310 | 313 | } |
| 314 | + |
311 | 315 | if ( $total == 0 ) { |
312 | 316 | $zero = serialize( $total ); |
313 | 317 | error_log( __METHOD__ . ": Group $groupName has zero message ($code): $zero" ); |
— | — | @@ -344,7 +348,7 @@ |
345 | 349 | |
346 | 350 | |
347 | 351 | $result = $cache->get( $id, $code ); |
348 | | - if ( is_array( $result ) ) { |
| 352 | + if ( !$this->purge && is_array( $result ) ) { |
349 | 353 | wfProfileOut( __METHOD__ ); |
350 | 354 | return $result; |
351 | 355 | } |