From: Roan Kattouw Date: Sun, 30 Mar 2008 19:20:42 +0000 (+0000) Subject: API: Fixing exception in ApiEditPage X-Git-Tag: 1.31.0-rc.0~48725 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=d9764955f377686dcd5f25be1e6283f4db2d08df;p=lhc%2Fweb%2Fwiklou.git API: Fixing exception in ApiEditPage --- 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();