From 595fb43edc50b0edd6b90a600ee4949aa9bca5a7 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Sat, 16 Aug 2014 21:00:19 +0200 Subject: [PATCH] some mistakes here --- backend/ls.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/ls.php b/backend/ls.php index b7f194f..4b3d4ae 100644 --- a/backend/ls.php +++ b/backend/ls.php @@ -13,7 +13,7 @@ } catch (Exception $e) { $tmp = array(); $tmp['error'] = $e->getMessage(); - return json_encode($tmp); + echo json_encode($tmp); exit(); } if ($tmp->fileType == "directory") { @@ -22,16 +22,16 @@ else { $tmp = array(); $tmp['error'] = "cannot open directory " + $path + ": Permission denied"; - return json_encode($tmp); + echo json_encode($tmp); exit(); } } else { - if (userManager::getRightsOnFile($_SESSION['uid'], fileManager::getFileById($tmp->parentFK)) & 1<<2) + if (userManager::getRightsOnFile($_SESSION['uid'], fileManager::getFileById($tmp->parentFK)) & FILE_FLAG_READ) $tmp = array($tmp); else { $tmp = array(); $tmp['error'] = "cannot open file " + $path + ": Permission denied"; - return json_encode($tmp); + echo json_encode($tmp); exit(); } }