From 4884c32fa80777d2c0cad97471afffeda40ef64e Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 12 Mar 2012 17:43:08 +0000 Subject: [PATCH] Removed problematic $ownerInfo, simplify file info, extended $restrictedFiles to folders $ownerInfo var previous available, based on posix_getpwuid However, this isn't available on all servers, so removed File attributes now no longer show as lock, just CHMOD info next to filename If you're not logged in though, you see lock with alert message via onClick $restrictedFiles now covers folders too Removed redundant code for files when you're restricted no need for if clause --- files.php | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/files.php b/files.php index b357151..4fa9550 100644 --- a/files.php +++ b/files.php @@ -53,15 +53,8 @@ function fileManager_dir($directory, $return_link, $first_call=true) { $fileAtts = ""; if ($serverType=="Linux") { - - //$ownerInfo = posix_getpwuid(fileowner($link)); - $ownerInfo = "ME"; - $chmodInfo = substr(sprintf('%o', fileperms($link)), -4); - - if ($ownerInfo!="nobody"&&(substr($chmodInfo, -1)!=2&&substr($chmodInfo, -1)!=3&&substr($chmodInfo, -1)!=6&&substr($chmodInfo, -1)!=7)) { - $fileAtts = ""; - } + $fileAtts = ''.$chmodInfo.''; } $fileManager = "