Last modified: 2011-06-05 23:18:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30392, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28392 - mark action=undelete&timestamps as type "timestamp"
mark action=undelete&timestamps as type "timestamp"
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-02 19:16 UTC by db [inactive,noenotif]
Modified: 2011-06-05 23:18 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description db [inactive,noenotif] 2011-04-02 19:16:16 UTC
the param action=undelete&timestamps is not marked as timestamp. Please set the type "timestamp", so action=paraminfo can output that correct and a wrong timestamp is reported as error.

It seems, you have to implement also the validation of timestamps for multi params inside ApiBase::getParameterFromSettings().

Thanks.
Comment 1 Sam Reed (reedy) 2011-06-05 23:10:50 UTC
Not sure on the best way to address this one.

Timestamp in all cases, bar seemingly this one, are designed to be single.

Adding a timestamps (plural) type, for multi usage just seems daft, but changing the underlying timestamp time type to an array, would mean going through and doing $params['start'][0], else changing the validation to do

if ( $multi ) {
if ( !is_array ) {
$array = array( $array );
}
foreach item in array
validate timestamp
} else {
validate timestamp
}

Else something more like integer, check it's an array, and base it on that. Which, I guess, is just another way of doing the stuff above too
Comment 2 Sam Reed (reedy) 2011-06-05 23:18:35 UTC
r89540

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links