From c201ed44714dd6acac52f15b048c6bda5783e7c5 Mon Sep 17 00:00:00 2001 From: mattpass Date: Sat, 27 Jun 2020 16:25:55 +0100 Subject: [PATCH] Select & highlight on drag over/leave files or dirs, fix chmod highlighting --- lib/get-branch.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/get-branch.php b/lib/get-branch.php index 7271aa4..6adcdcc 100644 --- a/lib/get-branch.php +++ b/lib/get-branch.php @@ -98,15 +98,23 @@ for ($i = 0; $i < count($finalArray); $i++) { $loadParam = "folder" === $type ? "true" : "false"; echo "
  •         ".xssClean(basename($fileFolderName),"html")." "; + " if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {parent.ICEcoder.openFile()}}\" style=\"position: relative; left:-22px\">        ".xssClean(basename($fileFolderName),"html")." "; if (!isset($ftpSite)) { - $thisPermVal = "Linux" === $serverType ? substr(sprintf('%o', fileperms($docRoot . $iceRoot . $fileFolderName)), -3) : ''; + $thisPermVal = "Windows" !== $serverType ? intval(substr(sprintf('%o', fileperms($docRoot . $iceRoot . $fileFolderName)), -3)) : 0; } else { // Work out perms value $thisPermVal = 0; @@ -126,7 +134,7 @@ for ($i = 0; $i < count($finalArray); $i++) { } $permColors = 777 === $thisPermVal ? 'background: #800; color: #eee' : 'color: #888'; echo ''; - echo $thisPermVal; + echo 0 !== $thisPermVal ? $thisPermVal : ''; echo "
  • \n"; }