diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-30 18:34:30 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-30 18:34:30 -0700 |
commit | fd947c205b1c2da8f93e1f8cc82968747355e6f9 (patch) | |
tree | 9dfeb1e7df7bbb069d79157d29dc7659b8359f0f /include/reddav.php | |
parent | ec41899328bc2a5de4be089268501e4f80c84e13 (diff) | |
download | volse-hubzilla-fd947c205b1c2da8f93e1f8cc82968747355e6f9.tar.gz volse-hubzilla-fd947c205b1c2da8f93e1f8cc82968747355e6f9.tar.bz2 volse-hubzilla-fd947c205b1c2da8f93e1f8cc82968747355e6f9.zip |
make /cloud work again after all the shuffling this morning
Diffstat (limited to 'include/reddav.php')
-rw-r--r-- | include/reddav.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/reddav.php b/include/reddav.php index 76b475ffd..c592597a9 100644 --- a/include/reddav.php +++ b/include/reddav.php @@ -196,6 +196,12 @@ function RedFileData($file, &$auth, $test = false) { if ($x === 0) { $file = substr($file, 6); } + else { + $x = strpos($file,'/dav'); + if($x === 0) + $file = substr($file,4); + } + if ((! $file) || ($file === '/')) { return new RedDAV\RedDirectory('/', $auth); @@ -244,7 +250,7 @@ function RedFileData($file, &$auth, $test = false) { $path = $path . '/' . $r[0]['filename']; } if (! $r) { - $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, created, edited from attach + $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, os_storage, created, edited from attach where folder = '%s' and filename = '%s' and uid = %d $perms order by filename limit 1", dbesc($folder), dbesc(basename($file)), @@ -253,7 +259,7 @@ function RedFileData($file, &$auth, $test = false) { } if (! $r) { $errors = true; - $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, created, edited from attach + $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, os_storage, created, edited from attach where folder = '%s' and filename = '%s' and uid = %d order by filename limit 1", dbesc($folder), dbesc(basename($file)), |