dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2847b4d
)
ApiParse: Forbid section=new when using page, pageid, or oldid
author
Derk-Jan Hartman
<hartman.wiki@gmail.com>
Wed, 25 Mar 2015 23:55:16 +0000
(
00:55
+0100)
committer
TheDJ
<hartman.wiki@gmail.com>
Wed, 25 Mar 2015 23:58:04 +0000
(23:58 +0000)
Change-Id: I45ce0fe2083587e429143aa3d8d832aa884e1ad7
includes/api/ApiParse.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiParse.php
b/includes/api/ApiParse.php
index
20592ca
..
b621861
100644
(file)
--- a/
includes/api/ApiParse.php
+++ b/
includes/api/ApiParse.php
@@
-88,6
+88,9
@@
class ApiParse extends ApiBase {
$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 );