diff --git a/lib/file-control.php b/lib/file-control.php index 44b534e..042bba2 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -32,8 +32,7 @@ if ($_GET['action']=="load") { $loadedFile = file_get_contents($file); echo '","",htmlentities($loadedFile)).''; } else { - echo ''; - echo ''; + echo ''; } }; @@ -49,7 +48,7 @@ if ($_GET['action']=="newFolder") { // Reload file manager echo ''; } else { - echo ""; + echo ""; } echo ''; } @@ -62,8 +61,7 @@ if ($_GET['action']=="rename") { echo ''; } else { - echo ""; - echo ''; + echo ""; } echo ''; } @@ -79,8 +77,7 @@ if ($_GET['action']=="replaceText") { fclose($fh); echo ''; } else { - echo ""; - echo ''; + echo ""; } echo ''; } @@ -93,8 +90,7 @@ if ($_GET['action']=="perms") { echo ''; } else { - echo ""; - echo ''; + echo ""; } echo ''; } @@ -104,11 +100,9 @@ if ($_GET['action']=="delete") { $filesArray = split(";",$file); // May contain more than one file here for ($i=0;$i<=count($filesArray)-1;$i++) { if (is_writable($iceRoot.$filesArray[$i])) { - if (is_dir($iceRoot.$filesArray[$i])) { - rrmdir($iceRoot.$filesArray[$i]); - } else { - unlink($iceRoot.$filesArray[$i]); - } + is_dir($iceRoot.$filesArray[$i]) + ? rrmdir($iceRoot.$filesArray[$i]) + : unlink($iceRoot.$filesArray[$i]); // Reload file manager echo ''; @@ -126,7 +120,9 @@ function rrmdir($dir) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { - if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); + filetype($dir."/".$object) == "dir" + ? rrmdir($dir."/".$object) + : unlink($dir."/".$object); } } reset($objects); @@ -147,8 +143,8 @@ if ($_GET['action']=="save") { echo ''; // Reload file manager & rename tab if it was a new file if (isset($_POST['newFileName']) && $_POST['newFileName']!="") { - echo ''; - echo ''; + echo ''; } // Reload stickytab window echo ''; @@ -176,12 +172,12 @@ if ($_GET['action']=="save") { // Finally, switch back to original tab top.ICEcoder.switchTab(thisTab); } + action='nothing'; action='nothing';"; } } else { - echo ""; + echo ""; } echo ''; } @@ -234,8 +230,8 @@ if (action=="load") {
- - + +