Merge "Make "/*@noflip*/ /*@embed*/" annotation work without CSSJanus hacks"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderUserTokensModule.php
index cdc9611..668467c 100644 (file)
@@ -37,20 +37,20 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        /**
         * Fetch the tokens for the current user.
         *
-        * @return array: List of tokens keyed by token type
+        * @return array List of tokens keyed by token type
         */
        protected function contextUserTokens() {
                global $wgUser;
 
                return array(
                        'editToken' => $wgUser->getEditToken(),
-                       'patrolToken' => ApiQueryRecentChanges::getPatrolToken( null, null ),
-                       'watchToken' => ApiQueryInfo::getWatchToken( null, null ),
+                       'patrolToken' => $wgUser->getEditToken( 'patrol' ),
+                       'watchToken' => $wgUser->getEditToken( 'watch' ),
                );
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {