From 24427ca1d885e411eae13134e4cff9dbb5787500 Mon Sep 17 00:00:00 2001 From: John Du Hart Date: Wed, 26 Oct 2011 23:34:31 +0000 Subject: [PATCH] Followup 100905, fixing usages of getContext() --- includes/api/ApiBase.php | 6 +++--- includes/api/ApiPurge.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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(). -- 2.20.1