dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merged master
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiDelete.php
diff --git
a/includes/api/ApiDelete.php
b/includes/api/ApiDelete.php
index
91406af
..
a33a5ad
100644
(file)
--- a/
includes/api/ApiDelete.php
+++ b/
includes/api/ApiDelete.php
@@
-4,7
+4,7
@@
*
* Created on Jun 30, 2007
*
*
* Created on Jun 30, 2007
*
- * Copyright © 2007 Roan Kattouw
<Firstname>.<Lastname>@gmail.com
+ * Copyright © 2007 Roan Kattouw
"<Firstname>.<Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-52,7
+52,7
@@
class ApiDelete extends ApiBase {
}
$titleObj = $pageObj->getTitle();
}
$titleObj = $pageObj->getTitle();
- $reason =
( isset( $params['reason'] ) ? $params['reason'] : null )
;
+ $reason =
$params['reason']
;
$user = $this->getUser();
if ( $titleObj->getNamespace() == NS_FILE ) {
$user = $this->getUser();
if ( $titleObj->getNamespace() == NS_FILE ) {
@@
-62,7
+62,7
@@
class ApiDelete extends ApiBase {
}
if ( !$status->isGood() ) {
}
if ( !$status->isGood() ) {
- $errors = $
thi
s->getErrorsArray();
+ $errors = $
statu
s->getErrorsArray();
$this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
}
$this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
}
@@
-116,7
+116,7
@@
class ApiDelete extends ApiBase {
// Need to pass a throwaway variable because generateReason expects
// a reference
$hasHistory = false;
// Need to pass a throwaway variable because generateReason expects
// a reference
$hasHistory = false;
- $reason = $page->getAutoDeleteReason( $hasHistory );
+ $reason = $page->getAutoDeleteReason( $hasHistory );
if ( $reason === false ) {
return array( array( 'cannotdelete', $title->getPrefixedText() ) );
}
if ( $reason === false ) {
return array( array( 'cannotdelete', $title->getPrefixedText() ) );
}
@@
-180,7
+180,10
@@
class ApiDelete extends ApiBase {
'pageid' => array(
ApiBase::PARAM_TYPE => 'integer'
),
'pageid' => array(
ApiBase::PARAM_TYPE => 'integer'
),
- 'token' => null,
+ 'token' => array(
+ ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_REQUIRED => true
+ ),
'reason' => null,
'watch' => array(
ApiBase::PARAM_DFLT => false,
'reason' => null,
'watch' => array(
ApiBase::PARAM_DFLT => false,
@@
-221,7
+224,8
@@
class ApiDelete extends ApiBase {
return array(
'' => array(
'title' => 'string',
return array(
'' => array(
'title' => 'string',
- 'reason' => 'string'
+ 'reason' => 'string',
+ 'logid' => 'integer'
)
);
}
)
);
}