summaryrefslogtreecommitdiff
path: root/includes/api/ApiTokens.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiTokens.php')
-rw-r--r--includes/api/ApiTokens.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/api/ApiTokens.php b/includes/api/ApiTokens.php
index 7080f547..d220a5e6 100644
--- a/includes/api/ApiTokens.php
+++ b/includes/api/ApiTokens.php
@@ -48,6 +48,11 @@ class ApiTokens extends ApiBase {
}
private function getTokenTypes() {
+ // If we're in JSON callback mode, no tokens can be obtained
+ if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) {
+ return array();
+ }
+
static $types = null;
if ( $types ) {
return $types;