Skip to content

Commit

Permalink
Revert "MDL-31863 Web Service : get_files() optional $modified timest…
Browse files Browse the repository at this point in the history
…amp returns files changed after given time."

This reverts commit 130d3fb.
  • Loading branch information
danpoltawski committed Jun 8, 2012
1 parent c9d7e6f commit c13dcf9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions files/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
);
}
Expand All @@ -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
*/
Expand Down Expand Up @@ -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'],
Expand All @@ -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'],
Expand Down

0 comments on commit c13dcf9

Please sign in to comment.