diff --git a/www/libs/Class.Basic.inc b/www/libs/Class.Basic.inc index 79c058be..563cff4f 100644 --- a/www/libs/Class.Basic.inc +++ b/www/libs/Class.Basic.inc @@ -1049,17 +1049,17 @@ } // METHOD: ByteStringFormat - // PARAMS: int + // PARAMS: int bytes, boolean for space, default is set // RETURN: string // DESC: converts bytes into formated string with KB, MB, etc - public static function ByteStringFormat($number) + public static function ByteStringFormat($number, $space = true) { if (is_numeric($number) && $number > 0) { // labels in order of size $labels = array('B', 'KB', 'MB', 'GB', 'TB'); // calc file size, round down too two digits, add label based max change - return round($number / pow(1024, ($i = floor(log($number, 1024)))), 2).''.$labels[$i]; + return round($number / pow(1024, ($i = floor(log($number, 1024)))), 2).($space ? ' ' : '').$labels[$i]; } return $number; } diff --git a/www/libs/Class.Login.inc b/www/libs/Class.Login.inc index b57fb7ab..86d59bbd 100644 --- a/www/libs/Class.Login.inc +++ b/www/libs/Class.Login.inc @@ -405,7 +405,7 @@ while ($res = $this->db_return($q)) { // read edit access data fields and drop them into the unit access array - $q_sub ="SELECT name, value FROM edit_access_data WHERE edit_access_id = ".$res['edit_access_id']; + $q_sub ="SELECT name, value FROM edit_access_data WHERE enabled = 1 edit_access_id = ".$res['edit_access_id']; $ea_data = array (); while ($res_sub = $this->db_return($q_sub)) {