Update common.php

pull/31/head
qkqpttgf 2020-03-03 13:27:18 +08:00 committed by GitHub
parent fcaa61b8e3
commit 2714815bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -348,12 +348,15 @@ function get_timezone($timezone = '8')
function message($message, $title = 'Message', $statusCode = 200)
{
return output('
<html lang="' . $_SERVER['language'] . '">
<html>
<meta charset=utf-8>
<body>
<h1>' . $title . '</h1>
<p>
' . $message . '
</p>
</body>
</html>', $statusCode);
@ -482,6 +485,7 @@ function main($path)
$constStr['language'] = $_COOKIE['language'];
if ($constStr['language']=='') $constStr['language'] = getConfig('language');
if ($constStr['language']=='') $constStr['language'] = 'en-us';
$_SERVER['language'] = $constStr['language'];
$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
$_SERVER['base_disk_path'] = $_SERVER['base_path'];
$disktags = explode("|",getConfig('disktag'));
@ -789,7 +793,7 @@ function adminoperate($path)
return output($result['body'], $result['stat']);
}
if ($_GET['RefreshCache']) {
//savecache('path_' . $path1, json_decode('{}',true), 1);
savecache('path_' . $path1 . '/?password', '', 1);
savecache('path_' . $path . '/?password', '', 1);
return message('<meta http-equiv="refresh" content="2;URL=./">', getconstStr('RefreshCache'), 302);
}