TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/199798

Change subject: ApiParse: Forbig section=new when using page, pageid, or oldid
......................................................................

ApiParse: Forbig section=new when using page, pageid, or oldid

Change-Id: I45ce0fe2083587e429143aa3d8d832aa884e1ad7
---
M includes/api/ApiParse.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/199798/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 20592ca..b621861 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -88,6 +88,9 @@
                $result = $this->getResult();
 
                if ( !is_null( $oldid ) || !is_null( $pageid ) || !is_null( 
$page ) ) {
+                       if ( $this->section === 'new' ) {
+                                       $this->dieUsage( 'section=new cannot be 
combined with oldid, pageid or page parameters. Please use text', 'params' );
+                       }
                        if ( !is_null( $oldid ) ) {
                                // Don't use the parser cache
                                $rev = Revision::newFromId( $oldid );

-- 
To view, visit https://gerrit.wikimedia.org/r/199798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45ce0fe2083587e429143aa3d8d832aa884e1ad7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to