From: John Du Hart Date: Wed, 26 Oct 2011 23:34:31 +0000 (+0000) Subject: Followup 100905, fixing usages of getContext() X-Git-Tag: 1.31.0-rc.0~26894 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=24427ca1d885e411eae13134e4cff9dbb5787500;p=lhc%2Fweb%2Fwiklou.git Followup 100905, fixing usages of getContext() --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 15f0078af5..861da5ba58 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -183,11 +183,11 @@ abstract class ApiBase extends ContextSource { * The object will have the WebRequest and the User object set to the ones * used in this instance. * - * @deprecated 1.19 use getContext to get the current context - * @return RequestContext + * @deprecated since 1.19 use getContext to get the current context + * @return DerivativeContext */ public function createContext() { - return $this->getContext(); + return new DerivativeContext( $this->getContext() ); } /** diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 2d30c9fd4d..89885b3da2 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -68,7 +68,7 @@ class ApiPurge extends ApiBase { $result[] = $r; continue; } - $context = $this->createContext(); + $context = new DerivativeContext( $this->getContext() ); $context->setTitle( $title ); $article = Article::newFromTitle( $title, $context ); $article->doPurge(); // Directly purge and skip the UI part of purge().