New folder perms now 705 & replacing //

Newly created folders no have 705 perms and / is r'trimmed from docRoot
(as iceRoot is prefixed with a /)
The short URL used in getInput prompt dialog now has // replaced with /
to error catch
This commit is contained in:
Matt Pass
2012-07-30 13:09:01 +01:00
parent f1aa201425
commit 6dd7c4abeb

View File

@@ -47,7 +47,7 @@ if ($_GET['action']=="load") {
// If we're due to add a new folder...
if ($_GET['action']=="newFolder") {
if ($_SESSION['userLevel'] > 0) {
mkdir($docRoot.$iceRoot.$file, 0707);
mkdir(rtrim($docRoot,"/").$iceRoot.$file, 0705);
// Reload file manager
$fileName = substr($file,strrpos($file,"/")+1);
$fileLoc = substr($file,0,strrpos($file,"/"));
@@ -270,7 +270,7 @@ if (action=="save") {
if ($file=="|[NEW]"||$saveType=="saveAs") {
?>
if (top.ICEcoder.rightClickedFile) {
shortURL = top.ICEcoder.rightClickedFile.replace(/\|/g,"/")+"/";
shortURL = (top.ICEcoder.rightClickedFile.replace(/\|/g,"/")+"/").replace(/\/\//,"/");
newFileName = top.ICEcoder.getInput('Enter Filename',shortURL);
} else {
newFileName = top.ICEcoder.getInput('Enter Filename','/');