Page MenuHomePhabricator

mark action=undelete&timestamps as type "timestamp"
Closed, ResolvedPublic

Description

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.


Version: 1.18.x
Severity: enhancement

Details

Reference
bz28392

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:30 PM
bzimport set Reference to bz28392.

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