From e83648a332fa01714f668db4086006ae450638d6 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 27 Mar 2021 14:55:09 +0800 Subject: [PATCH] admin fix classic theme, remove disableChangeTheme --- common.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common.php b/common.php index 55e2578..fa82fdc 100644 --- a/common.php +++ b/common.php @@ -25,7 +25,7 @@ $EnvConfigs = [ 'background' => 0b011, 'backgroundm' => 0b011, 'disableShowThumb' => 0b010, - 'disableChangeTheme'=> 0b010, + //'disableChangeTheme'=> 0b010, 'disktag' => 0b000, 'hideFunctionalityFile'=> 0b010, 'timezone' => 0b010, @@ -1750,8 +1750,9 @@ function render_list($path = '', $files = []) -->'; //$authinfo = $path . '
' . json_encode($files, JSON_PRETTY_PRINT) . '
'; - if (isset($_COOKIE['theme'])&&$_COOKIE['theme']!='') $theme = $_COOKIE['theme']; - if ( !file_exists(__DIR__ . $slash .'theme' . $slash . $theme) ) $theme = ''; + //if (isset($_COOKIE['theme'])&&$_COOKIE['theme']!='') $theme = $_COOKIE['theme']; + //if ( !file_exists(__DIR__ . $slash .'theme' . $slash . $theme) ) $theme = ''; + if ($_SERVER['admin']) $theme = 'classic.html'; if ( $theme=='' ) { $tmp = getConfig('customTheme'); if ( $tmp!='' ) $theme = $tmp; @@ -2631,7 +2632,7 @@ function render_list($path = '', $files = []) $html = str_replace('', date("Y-m-d H:i:s") . " " . getconstStr('Week')[date("w")] . " " . $_SERVER['REMOTE_ADDR'] . $city . ' Runningtime:' . $exetime . 's Mem:' . size_format(memory_get_usage()), $html); } - if ($_SERVER['admin']||!getConfig('disableChangeTheme')) { + /*if ($_SERVER['admin']||!getConfig('disableChangeTheme')) { $theme_arr = scandir(__DIR__ . $slash . 'theme'); $selecttheme = '
@@ -2658,7 +2659,7 @@ function render_list($path = '', $files = []) '; $tmp = splitfirst($html, ''); $html = $tmp[0] . $selecttheme . '' . $selectthemescript . $tmp[1]; - } + }*/ $tmp = splitfirst($html, ''); $html = $tmp[0] . '' . $authinfo . $tmp[1]; -- GitLab