X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiPurge.php;h=ec551370df31f314fa1ed89c108c8c8333e4bdec;hb=f26e34fa2866584f7a86f559578aab7b2bb35f7a;hp=33998431c4881f9f5568747c405f2cacc4695642;hpb=97dc02ccdb5498d202c8f1a7d0accbdf9a76b885;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 33998431c4..ec551370df 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -133,7 +133,9 @@ class ApiPurge extends ApiBase { $result = array( 'forcelinkupdate' => false, 'forcerecursivelinkupdate' => false, - 'continue' => '', + 'continue' => array( + ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', + ), ); if ( $flags ) { $result += $this->getPageSet()->getFinalParams( $flags ); @@ -142,65 +144,12 @@ class ApiPurge extends ApiBase { return $result; } - public function getParamDescription() { - return $this->getPageSet()->getFinalParamDescription() - + array( - 'forcelinkupdate' => 'Update the links tables', - 'forcerecursivelinkupdate' => 'Update the links table, and update ' . - 'the links tables for any page that uses this page as a template', - 'continue' => 'When more results are available, use this to continue', - ); - } - - public function getResultProperties() { - return array( - ApiBase::PROP_LIST => true, - '' => array( - 'ns' => array( - ApiBase::PROP_TYPE => 'namespace', - ApiBase::PROP_NULLABLE => true - ), - 'title' => array( - ApiBase::PROP_TYPE => 'string', - ApiBase::PROP_NULLABLE => true - ), - 'pageid' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ), - 'revid' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ), - 'invalid' => 'boolean', - 'special' => 'boolean', - 'missing' => 'boolean', - 'purged' => 'boolean', - 'linkupdate' => 'boolean', - 'iw' => array( - ApiBase::PROP_TYPE => 'string', - ApiBase::PROP_NULLABLE => true - ), - ) - ); - } - - public function getDescription() { - return array( 'Purge the cache for the given titles.', - 'Requires a POST request if the user is not logged in.' - ); - } - - public function getPossibleErrors() { - return array_merge( - parent::getPossibleErrors(), - $this->getPageSet()->getFinalPossibleErrors() - ); - } - - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=purge&titles=Main_Page|API' => 'Purge the "Main Page" and the "API" page', + 'action=purge&titles=Main_Page|API' + => 'apihelp-purge-example-simple', + 'action=purge&generator=allpages&gapnamespace=0&gaplimit=10' + => 'apihelp-purge-example-generator', ); }