Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function name and add extensions for icons #567

Merged
merged 2 commits into from
Jun 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tinyfilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ function session_error_handling_function($code, $msg, $file, $line) {
$root_path = rtrim($root_path, '\\/');
$root_path = str_replace('\\', '/', $root_path);
if (!@is_dir($root_path)) {
echo "<h1>".lang('Root path')." \"{$root_path}\" ".lang('not found!')." </h1>";
echo "<h1>".lng('Root path')." \"{$root_path}\" ".lng('not found!')." </h1>";
exit;
}

Expand Down Expand Up @@ -2681,6 +2681,7 @@ function fm_get_file_icon_class($path)
case 'cpp':
case 'cs':
case 'py':
case 'rs':
case 'map':
case 'lock':
case 'dtd':
Expand All @@ -2699,11 +2700,13 @@ function fm_get_file_icon_class($path)
case 'scss':
$img = 'fa fa-css3';
break;
case 'bz2':
case 'zip':
case 'rar':
case 'gz':
case 'tar':
case '7z':
case 'xz':
$img = 'fa fa-file-archive-o';
break;
case 'php':
Expand Down Expand Up @@ -2741,6 +2744,7 @@ function fm_get_file_icon_class($path)
case 'm3u8':
case 'pls':
case 'cue':
case 'xspf':
$img = 'fa fa-headphones';
break;
case 'avi':
Expand Down Expand Up @@ -2772,6 +2776,7 @@ function fm_get_file_icon_class($path)
$img = 'fa fa-file-text-o';
break;
case 'bak':
case 'swp':
$img = 'fa fa-clipboard';
break;
case 'doc':
Expand Down