From d9764955f377686dcd5f25be1e6283f4db2d08df Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 30 Mar 2008 19:20:42 +0000 Subject: [PATCH] API: Fixing exception in ApiEditPage --- includes/api/ApiEditPage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index e4a64fd333..1f961220d0 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -123,6 +123,7 @@ class ApiEditPage extends ApiBase { # Run hooks # We need to fake $wgRequest for some of them global $wgRequest; + $oldRequest = $wgRequest; $wgRequest = $req; $r = array(); if(!wfRunHooks('APIEditBeforeSave', array(&$ep, $ep->textbox1, &$r))) @@ -136,6 +137,7 @@ class ApiEditPage extends ApiBase { else $this->dieUsageMsg(array('hookaborted')); } + $wgRequest = $oldRequest; # Do the actual save $oldRevId = $articleObj->getRevIdFetched(); -- 2.20.1