Stop mutually exclusive values in ApiRollback and ApiUndelete
authorSam Reed <reedy@users.mediawiki.org>
Thu, 25 Mar 2010 21:13:05 +0000 (21:13 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 25 Mar 2010 21:13:05 +0000 (21:13 +0000)
includes/api/ApiRollback.php
includes/api/ApiUndelete.php

index 849e0f6..7db4a17 100644 (file)
@@ -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'] ) ) {
index d88d65b..470bfe8 100644 (file)
@@ -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'] ) ) {