mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 06:08:54 +00:00
some mistakes here
This commit is contained in:
parent
ece61f2841
commit
595fb43edc
1 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
$tmp['error'] = $e->getMessage();
|
$tmp['error'] = $e->getMessage();
|
||||||
return json_encode($tmp);
|
echo json_encode($tmp);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($tmp->fileType == "directory") {
|
if ($tmp->fileType == "directory") {
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
else {
|
else {
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
$tmp['error'] = "cannot open directory " + $path + ": Permission denied";
|
$tmp['error'] = "cannot open directory " + $path + ": Permission denied";
|
||||||
return json_encode($tmp);
|
echo json_encode($tmp);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
$tmp = array($tmp);
|
||||||
else {
|
else {
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
$tmp['error'] = "cannot open file " + $path + ": Permission denied";
|
$tmp['error'] = "cannot open file " + $path + ": Permission denied";
|
||||||
return json_encode($tmp);
|
echo json_encode($tmp);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue