From 6dd7c4abebbb45be38eddd2f6ed57dec8e2c076e Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 30 Jul 2012 13:09:01 +0100 Subject: [PATCH] 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 --- lib/file-control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index ed05a68..c0fe4f9 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -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','/');