diff --git a/config-sample.php b/config-sample.php index e2d9b2d..af30b9f 100644 --- a/config-sample.php +++ b/config-sample.php @@ -20,8 +20,8 @@ $use_auth = true; // Users: array('Username' => 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( - 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', //admin@123 - 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345 + 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', // admin@123 + 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' // 12345 ); // Readonly users diff --git a/tinyfilemanager.php b/tinyfilemanager.php index f94e6b1..966f7a0 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1,6 +1,6 @@ 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( - 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', //admin@123 - 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345 + 'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', // admin@123 + 'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' // 12345 ); // Readonly users @@ -43,14 +43,14 @@ $global_readonly = false; // array('Username' => 'Directory path', 'Username2' => 'Directory path', ...) $directories_users = array(); -// Enable highlight.js (https://highlightjs.org/) on view's page +// Enable highlight.js (https://highlightjs.org) on view's page $use_highlightjs = true; // highlight.js style // for dark theme use 'ir-black' $highlightjs_style = 'vs'; -// Enable ace.js (https://ace.c9.io/) on view's page +// Enable ace.js (https://ace.c9.io) on view's page $edit_files = true; // Default timezone for date() and time() @@ -58,7 +58,7 @@ $edit_files = true; $default_timezone = 'Etc/UTC'; // UTC // Root path for file manager -// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder' +// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'] . '/folder' $root_path = $_SERVER['DOCUMENT_ROOT']; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' @@ -173,7 +173,7 @@ $theme = isset($cfg->data['theme']) ? $cfg->data['theme'] : 'light'; define('FM_THEME', $theme); -//available languages +// available languages $lang_list = array( 'en' => 'English' ); @@ -537,7 +537,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) { echo $res; } - //upload using url + // upload using url if (isset($_POST['type']) && $_POST['type'] == "upload" && !empty($_REQUEST["uploadurl"])) { $path = FM_ROOT_PATH; if (FM_PATH != '') { @@ -558,7 +558,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) { $url = !empty($_REQUEST["uploadurl"]) && preg_match("|^http(s)?://.+$|", stripslashes($_REQUEST["uploadurl"])) ? stripslashes($_REQUEST["uploadurl"]) : null; - //prevent 127.* domain and known ports + // prevent 127.* domain and known ports $domain = parse_url($url, PHP_URL_HOST); $port = parse_url($url, PHP_URL_PORT); $knownPorts = [22, 23, 25, 3306]; @@ -630,7 +630,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) { } if (isset($_POST['ajax'])) { - //search : get list of files from the current folder + // search: get list of files from the current folder if (isset($_POST['type']) && $_POST['type'] == "search") { $dir = FM_ROOT_PATH; $response = scan(fm_clean_path($_POST['path']), $_POST['content']); @@ -736,14 +736,14 @@ if (isset($_GET['copy'], $_GET['finish']) && !FM_READONLY) { } } } else { - if (!$move) { //Not move and to = from so duplicate + if (!$move) { // Not move and to = from so duplicate $msg_from = trim(FM_PATH . '/' . basename($from), '/'); $fn_parts = pathinfo($from); $extension_suffix = ''; if (!is_dir($from)) { $extension_suffix = '.' . $fn_parts['extension']; } - //Create new name for duplicate + // Create new name for duplicate $fn_duplicate = $fn_parts['dirname'] . '/' . $fn_parts['filename'] . '-' . date('YmdHis') . $extension_suffix; $loop_count = 0; $max_loop = 1000; @@ -1026,7 +1026,7 @@ if (isset($_POST['group']) && (isset($_POST['zip']) || isset($_POST['tar'])) && $path .= '/' . FM_PATH; } - //set pack type + // set pack type $ext = isset($_POST['tar']) ? 'tar' : 'zip'; if (($ext == "zip" && !class_exists('ZipArchive')) || ($ext == "tar" && !class_exists('PharData'))) { @@ -1092,7 +1092,7 @@ if (isset($_GET['unzip']) && !FM_READONLY) { } if ($isValid) { - //to folder + // to folder $tofolder = ''; if (isset($_GET['tofolder'])) { $tofolder = pathinfo($zip_path, PATHINFO_FILENAME); @@ -1113,7 +1113,7 @@ if (isset($_GET['unzip']) && !FM_READONLY) { $res = false; } } catch (Exception $e) { - //TODO:: need to handle the error + // TODO:: need to handle the error $res = true; } } @@ -1230,7 +1230,7 @@ if (!empty($folders)) { if (isset($_GET['upload']) && !FM_READONLY) { fm_show_header(); // HEADER fm_show_nav_path(FM_PATH); // current path - //get the allowed file extensions + // get the allowed file extensions function getUploadExt() { $extArr = explode(',', FM_UPLOAD_EXTENSION); @@ -1447,7 +1447,7 @@ if (isset($_GET['settings']) && !FM_READONLY) { ", inline: true }); - //editor.setTheme("ace/theme/twilight"); //Dark Theme + // editor.setTheme("ace/theme/twilight"); // Dark Theme function ace_commend(cmd) { editor.commands.exec(cmd, editor); } @@ -5084,7 +5084,7 @@ function fm_show_header_login() } $modeEl.val(editor.getSession().$modeId); $themeEl.val(editor.getTheme()); - $fontSizeEl.val(12).change(); //set default font size in drop down + $fontSizeEl.val(12).change(); // set default font size in drop down } $(function() {