From: Sam Reed Date: Thu, 25 Mar 2010 21:13:05 +0000 (+0000) Subject: Stop mutually exclusive values in ApiRollback and ApiUndelete X-Git-Tag: 1.31.0-rc.0~37355 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=a8d16a34bb7e48f6cae1980a360ac24733d75018;p=lhc%2Fweb%2Fwiklou.git Stop mutually exclusive values in ApiRollback and ApiUndelete --- 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'] ) ) {