Remove --max-slave-lag options and remnants from maintenance scripts
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index 02c88c4..5af44ee 100644 (file)
@@ -90,8 +90,9 @@ class ApiQueryInfo extends ApiQueryBase {
                        return $this->tokenFunctions;
                }
 
-               // If we're in JSON callback mode, no tokens can be obtained
-               if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) {
+               // If we're in a mode that breaks the same-origin policy, no tokens can
+               // be obtained
+               if ( $this->lacksSameOriginSecurity() ) {
                        return array();
                }