]> source.dussan.org Git - nextcloud-server.git/commitdiff
use strtotime on non-nummeric times in oc_filesystem::touch
authorRobin Appelman <icewind@owncloud.com>
Tue, 23 Oct 2012 14:34:58 +0000 (16:34 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 23 Oct 2012 14:36:09 +0000 (16:36 +0200)
lib/filesystemview.php

index 2950ced5f9e6836c4eb894ba27604af246a489a9..776c859412fe03c320439dc8eaf20d3b1cc74541 100644 (file)
@@ -251,6 +251,9 @@ class OC_FilesystemView {
                return $this->basicOperation('filemtime', $path);
        }
        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);
        }
        public function file_get_contents($path) {