From a8d16a34bb7e48f6cae1980a360ac24733d75018 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Mar 2010 21:13:05 +0000 Subject: [PATCH] Stop mutually exclusive values in ApiRollback and ApiUndelete --- includes/api/ApiRollback.php | 4 ++++ includes/api/ApiUndelete.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php index 849e0f6837..7db4a17827 100644 --- a/includes/api/ApiRollback.php +++ b/includes/api/ApiRollback.php @@ -38,6 +38,10 @@ class ApiRollback extends ApiBase { public function execute() { $params = $this->extractRequestParams(); + + if ( isset( $params['watch'] ) && params( $show['unwatch'] ) ) { + $this->dieUsageMsg( array( 'show' ) ); + } $titleObj = null; if ( !isset( $params['title'] ) ) { diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php index d88d65b00e..470bfe8aef 100644 --- a/includes/api/ApiUndelete.php +++ b/includes/api/ApiUndelete.php @@ -39,6 +39,10 @@ class ApiUndelete extends ApiBase { public function execute() { global $wgUser; $params = $this->extractRequestParams(); + + if ( isset( $params['watch'] ) && params( $show['unwatch'] ) ) { + $this->dieUsageMsg( array( 'show' ) ); + } $titleObj = null; if ( !isset( $params['title'] ) ) { -- 2.20.1