use strtotime on non-nummeric times in oc_filesystem::touch

This commit is contained in:
Robin Appelman 2012-10-23 16:34:58 +02:00
parent ab944094e2
commit 7fdbce6ac1
1 changed files with 3 additions and 0 deletions

View File

@ -251,6 +251,9 @@ class OC_FilesystemView {
return $this->basicOperation('filemtime', $path); return $this->basicOperation('filemtime', $path);
} }
public function touch($path, $mtime=null) { public function touch($path, $mtime=null) {
if(!is_null($mtime) and !is_numeric($mtime)){
$mtime = strtotime($mtime);
}
return $this->basicOperation('touch', $path, array('write'), $mtime); return $this->basicOperation('touch', $path, array('write'), $mtime);
} }
public function file_get_contents($path) { public function file_get_contents($path) {