Merge "Keep headers from jumping when expire interface is shown"
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlist.php
index 6b5ceb7..f8f6e7d 100644 (file)
@@ -151,7 +151,10 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
                if ( !is_null( $params['type'] ) ) {
                        try {
-                               $options['rcTypes'] = RecentChange::parseToRCType( $params['type'] );
+                               $rcTypes = RecentChange::parseToRCType( $params['type'] );
+                               if ( $rcTypes ) {
+                                       $options['rcTypes'] = $rcTypes;
+                               }
                        } catch ( Exception $e ) {
                                ApiBase::dieDebug( __METHOD__, $e->getMessage() );
                        }
@@ -472,7 +475,8 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                                ApiBase::PARAM_TYPE => 'user'
                        ],
                        'token' => [
-                               ApiBase::PARAM_TYPE => 'string'
+                               ApiBase::PARAM_TYPE => 'string',
+                               ApiBase::PARAM_SENSITIVE => true,
                        ],
                        'continue' => [
                                ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
@@ -498,6 +502,6 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Watchlist';
+               return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Watchlist';
        }
 }