r79654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79653‎ | r79654 | r79655 >
Date:17:57, 5 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r79638

If we're ping limited, add a warning as such, and don't bother trying to linkupdate any of the other articles in the output.
Modified paths:
  • /trunk/phase3/includes/api/ApiPurge.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiPurge.php
@@ -49,6 +49,9 @@
5050 !$this->getMain()->getRequest()->wasPosted() ) {
5151 $this->dieUsageMsg( array( 'mustbeposted', $this->getModuleName() ) );
5252 }
 53+
 54+ $forceLinkUpdate = $params['forcelinkupdate'];
 55+
5356 $result = array();
5457 foreach ( $params['titles'] as $t ) {
5558 $r = array();
@@ -69,7 +72,7 @@
7073 $article->doPurge(); // Directly purge and skip the UI part of purge().
7174 $r['purged'] = '';
7275
73 - if( $params['forcelinkupdate'] ) {
 76+ if( $forceLinkUpdate ) {
7477 if ( !$wgUser->pingLimiter() ) {
7578 global $wgParser, $wgEnableParserCache;
7679 $popts = new ParserOptions();
@@ -85,6 +88,9 @@
8689 $pcache = ParserCache::singleton();
8790 $pcache->save( $p_result, $article, $popts );
8891 }
 92+ } else {
 93+ $this->setWarning( $this->parseMsg( array( 'actionthrottledtext' ) ) );
 94+ $forceLinkUpdate = false;
8995 }
9096 }
9197

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79638* (bug 26498) allow LinksUpdate with API...reedy03:31, 5 January 2011

Status & tagging log