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
Use (int) rather than intval()
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiRollback.php
diff --git
a/includes/api/ApiRollback.php
b/includes/api/ApiRollback.php
index
db57f7e
..
7c313d5
100644
(file)
--- a/
includes/api/ApiRollback.php
+++ b/
includes/api/ApiRollback.php
@@
-56,9
+56,13
@@
class ApiRollback extends ApiBase {
}
// @TODO: remove this hack once rollback uses POST (T88044)
}
// @TODO: remove this hack once rollback uses POST (T88044)
+ $fname = __METHOD__;
$trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' );
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' );
$trxProfiler = Profiler::instance()->getTransactionProfiler();
- $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
+ $trxProfiler->redefineExpectations( $trxLimits['POST'], $fname );
+ DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits, $fname ) {
+ $trxProfiler->redefineExpectations( $trxLimits['PostSend-POST'], $fname );
+ } );
$retval = $pageObj->doRollback(
$this->getRbUser( $params ),
$retval = $pageObj->doRollback(
$this->getRbUser( $params ),
@@
-81,13
+85,13
@@
class ApiRollback extends ApiBase {
$info = [
'title' => $titleObj->getPrefixedText(),
$info = [
'title' => $titleObj->getPrefixedText(),
- 'pageid' =>
intval( $details['current']->getPage()
),
+ 'pageid' =>
(int)$details['current']->getPage(
),
'summary' => $details['summary'],
'summary' => $details['summary'],
- 'revid' =>
intval( $details['newid'] )
,
+ 'revid' =>
(int)$details['newid']
,
// The revision being reverted (previously the current revision of the page)
// The revision being reverted (previously the current revision of the page)
- 'old_revid' =>
intval( $details['current']->getID()
),
+ 'old_revid' =>
(int)$details['current']->getID(
),
// The revision being restored (the last revision before revision(s) by the reverted user)
// The revision being restored (the last revision before revision(s) by the reverted user)
- 'last_revid' =>
intval( $details['target']->getID()
)
+ 'last_revid' =>
(int)$details['target']->getID(
)
];
$this->getResult()->addValue( null, $this->getModuleName(), $info );
];
$this->getResult()->addValue( null, $this->getModuleName(), $info );