Permalink
Browse files

Revert "MDL-31863 Web Service : get_files() optional $modified timest…

…amp returns files changed after given time."

This reverts commit 130d3fb.
  • Loading branch information...
danpoltawski committed Jun 8, 2012
1 parent c9d7e6f commit c13dcf934ed7a1f3697ad97f749d34d6e5aacc08
Showing with 6 additions and 4 deletions.
  1. +6 −4 files/externallib.php
View
@@ -53,7 +53,8 @@ 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 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 @@ 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 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 @@ 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'],
@@ -136,7 +138,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'],

0 comments on commit c13dcf9

Please sign in to comment.