From: Roan Kattouw Date: Thu, 25 Sep 2008 15:27:04 +0000 (+0000) Subject: Followup to r41257: don't give out a token when we're in JSON callback mode X-Git-Tag: 1.31.0-rc.0~45095 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=4c7206a478d35fe7e7bc1d9b0ef5f2af3856474b;p=lhc%2Fweb%2Fwiklou.git Followup to r41257: don't give out a token when we're in JSON callback mode --- diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index bc4a94dfd9..c938604a03 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -82,7 +82,7 @@ class ApiQueryUserInfo extends ApiQueryBase { if (isset($this->prop['options'])) { $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions); } - if (isset($this->prop['preferencestoken'])) { + if (isset($this->prop['preferencestoken']) && is_null($this->getMain()->getRequest()->getVal('callback'))) { $vals['preferencestoken'] = $wgUser->editToken(); } if (isset($this->prop['editcount'])) {