mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Revert "MDL-31863 Web Service : get_files() optional $modified timestamp returns files changed after given time."
This reverts commit 130d3fbf964f2efbcc6fee3855edb7bc0a2af744.
This commit is contained in:
parent
c9d7e6fa16
commit
c13dcf934e
@ -53,7 +53,8 @@ class core_files_external extends external_api {
|
||||
'itemid' => new external_value(PARAM_INT, 'associated id'),
|
||||
'filepath' => new external_value(PARAM_PATH, 'file path'),
|
||||
'filename' => new external_value(PARAM_FILE, 'file name'),
|
||||
'modified' => new external_value(PARAM_INT, 'timestamp to return files changed after this time.', VALUE_DEFAULT, null)
|
||||
'modified' => new external_value(PARAM_INT, 'timestamp, return files which the last ' .
|
||||
'timemodified time is the same or later than the specified time', VALUE_DEFAULT, null)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -67,7 +68,8 @@ class core_files_external extends external_api {
|
||||
* @param int $itemid item id
|
||||
* @param string $filepath file path
|
||||
* @param string $filename file name
|
||||
* @param int $modified timestamp to return files changed after this time.
|
||||
* @param int $modified, timestamp, timestamp,
|
||||
* return files which the last timemodified time is the same or later than the specified time
|
||||
* @return array
|
||||
* @since Moodle 2.2
|
||||
*/
|
||||
@ -121,7 +123,7 @@ class core_files_external extends external_api {
|
||||
$timemodified = $child->get_timemodified();
|
||||
|
||||
if ($child->is_directory()) {
|
||||
if ((is_null($modified)) or ($modified < $timemodified)) {
|
||||
if ((is_null($modified)) or ($modified <= $timemodified)) {
|
||||
$node = array(
|
||||
'contextid' => $params['contextid'],
|
||||
'component' => $params['component'],
|
||||
@ -136,7 +138,7 @@ class core_files_external extends external_api {
|
||||
$list[] = $node;
|
||||
}
|
||||
} else {
|
||||
if ((is_null($modified)) or ($modified < $timemodified)) {
|
||||
if ((is_null($modified)) or ($modified <= $timemodified)) {
|
||||
$node = array(
|
||||
'contextid' => $params['contextid'],
|
||||
'component' => $params['component'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user