Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31863 Web Service : get_files() optional $modified timestamp retu…

…rns files changed after given time.
  • Loading branch information...
commit 130d3fbf964f2efbcc6fee3855edb7bc0a2af744 1 parent 25ccaf5
@nebgor nebgor authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 files/externallib.php
View
10 files/externallib.php
@@ -53,8 +53,7 @@ public static function get_files_parameters() {
'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, return files which the last ' .
- 'timemodified time is the same or later than the specified time', VALUE_DEFAULT, null)
+ 'modified' => new external_value(PARAM_INT, 'timestamp to return files changed after this time.', VALUE_DEFAULT, null)
)
);
}
@@ -68,8 +67,7 @@ public static function get_files_parameters() {
* @param int $itemid item id
* @param string $filepath file path
* @param string $filename file name
- * @param int $modified, timestamp, timestamp,
- * return files which the last timemodified time is the same or later than the specified time
+ * @param int $modified timestamp to return files changed after this time.
* @return array
* @since Moodle 2.2
*/
@@ -123,7 +121,7 @@ public static function get_files($contextid, $component, $filearea, $itemid, $fi
$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'],
@@ -138,7 +136,7 @@ public static function get_files($contextid, $component, $filearea, $itemid, $fi
$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'],
Please sign in to comment.
Something went wrong with that request. Please try again.