dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
0e5f53d
)
Merge "fixed timestamp validation for api"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Mon, 14 Jan 2013 18:56:01 +0000
(18:56 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Mon, 14 Jan 2013 18:56:01 +0000
(18:56 +0000)
includes/api/ApiBase.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiBase.php
b/includes/api/ApiBase.php
index
1b176e7
..
ff93d2f
100644
(file)
--- a/
includes/api/ApiBase.php
+++ b/
includes/api/ApiBase.php
@@
-1152,11
+1152,11
@@
abstract class ApiBase extends ContextSource {
* @return string
*/
function validateTimestamp( $value, $paramName ) {
- $
value
= wfTimestamp( TS_UNIX, $value );
- if ( $
value === 0
) {
+ $
unixTimestamp
= wfTimestamp( TS_UNIX, $value );
+ if ( $
unixTimestamp === false
) {
$this->dieUsage( "Invalid value '$value' for timestamp parameter $paramName", "badtimestamp_{$paramName}" );
}
- return wfTimestamp( TS_MW, $
value
);
+ return wfTimestamp( TS_MW, $
unixTimestamp
);
}
/**