* adjust the alert info for install.php and upgrade.php.
This commit is contained in:
@@ -49,14 +49,20 @@ if(isset($_GET['mode']) and $_GET['mode'] == 'getconfig') die(helper::removeUTF8
|
||||
/* Check for need upgrade. */
|
||||
$config->installedVersion = $common->loadModel('setting')->getVersion();
|
||||
if(!(!is_numeric($config->version{0}) and $config->version{0} != $config->installedVersion{0}) and version_compare($config->version, $config->installedVersion, '>')) die(header('location: upgrade.php'));
|
||||
|
||||
/* Remove install.php and upgrade.php. */
|
||||
if(file_exists('install.php') or file_exists('upgrade.php'))
|
||||
{
|
||||
$wwwDir = dirname(__FILE__);
|
||||
echo "<html><head><meta charset='utf-8'></head><body>";
|
||||
echo "<p>目录 {$wwwDir} 下存在 install.php 和 upgrade.php 文件,为了系统的安全,请您删掉这两个文件。</p>";
|
||||
echo "<p>Please remove install.php and upgrade.php for security reason.</p>";
|
||||
echo '</body></html>';
|
||||
exit;
|
||||
echo <<<EOT
|
||||
<html><head><meta charset='utf-8'>
|
||||
<style>table{width:700px; margin-top:50px; border:1px solid gray; font-size:14px; padding:5px}</style>
|
||||
</head><body>
|
||||
<table align='center'><tr><td>安全期间,请删除{$wwwDir}目录下的install.php和upgrade.php文件。<br />
|
||||
Please remove install.php and upgrade.php under $wwwDir dir for security reason.</td></tr></table>
|
||||
</body></html>
|
||||
EOT;
|
||||
die();
|
||||
}
|
||||
|
||||
$app->parseRequest();
|
||||
|
||||
Reference in New Issue
Block a user