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
Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiUndelete.php
diff --git
a/includes/api/ApiUndelete.php
b/includes/api/ApiUndelete.php
index
840ef1b
..
5f9b97c
100644
(file)
--- a/
includes/api/ApiUndelete.php
+++ b/
includes/api/ApiUndelete.php
@@
-31,7
+31,8
@@
class ApiUndelete extends ApiBase {
$params = $this->extractRequestParams();
$user = $this->getUser();
$params = $this->extractRequestParams();
$user = $this->getUser();
- if ( $user->isBlocked() ) {
+ $block = $user->getBlock();
+ if ( $block && $block->isSitewide() ) {
$this->dieBlocked( $user->getBlock() );
}
$this->dieBlocked( $user->getBlock() );
}
@@
-84,8
+85,8
@@
class ApiUndelete extends ApiBase {
$this->setWatch( $params['watchlist'], $titleObj );
$info['title'] = $titleObj->getPrefixedText();
$this->setWatch( $params['watchlist'], $titleObj );
$info['title'] = $titleObj->getPrefixedText();
- $info['revisions'] =
intval( $retval[0] )
;
- $info['fileversions'] =
intval( $retval[1] )
;
+ $info['revisions'] =
(int)$retval[0]
;
+ $info['fileversions'] =
(int)$retval[1]
;
$info['reason'] = $retval[2];
$this->getResult()->addValue( null, $this->getModuleName(), $info );
}
$info['reason'] = $retval[2];
$this->getResult()->addValue( null, $this->getModuleName(), $info );
}