Index: trunk/phase3/includes/api/ApiPurge.php |
— | — | @@ -49,6 +49,9 @@ |
50 | 50 | !$this->getMain()->getRequest()->wasPosted() ) { |
51 | 51 | $this->dieUsageMsg( array( 'mustbeposted', $this->getModuleName() ) ); |
52 | 52 | } |
| 53 | + |
| 54 | + $forceLinkUpdate = $params['forcelinkupdate']; |
| 55 | + |
53 | 56 | $result = array(); |
54 | 57 | foreach ( $params['titles'] as $t ) { |
55 | 58 | $r = array(); |
— | — | @@ -69,7 +72,7 @@ |
70 | 73 | $article->doPurge(); // Directly purge and skip the UI part of purge(). |
71 | 74 | $r['purged'] = ''; |
72 | 75 | |
73 | | - if( $params['forcelinkupdate'] ) { |
| 76 | + if( $forceLinkUpdate ) { |
74 | 77 | if ( !$wgUser->pingLimiter() ) { |
75 | 78 | global $wgParser, $wgEnableParserCache; |
76 | 79 | $popts = new ParserOptions(); |
— | — | @@ -85,6 +88,9 @@ |
86 | 89 | $pcache = ParserCache::singleton(); |
87 | 90 | $pcache->save( $p_result, $article, $popts ); |
88 | 91 | } |
| 92 | + } else { |
| 93 | + $this->setWarning( $this->parseMsg( array( 'actionthrottledtext' ) ) ); |
| 94 | + $forceLinkUpdate = false; |
89 | 95 | } |
90 | 96 | } |
91 | 97 | |