* finish task #2703.
This commit is contained in:
@@ -1132,9 +1132,12 @@ class commonModel extends model
|
||||
$statusFile = $this->loadModel('upgrade')->checkSafeFile();
|
||||
if($statusFile)
|
||||
{
|
||||
$cmd = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? $this->lang->upgrade->createFileWinCMD : $this->lang->upgrade->createFileLinuxCMD;
|
||||
$cmd = sprintf($cmd, $statusFile);
|
||||
|
||||
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body>";
|
||||
echo "<table align='center' style='margin-top:100px; border:1px solid gray; font-size:14px;'><tr><td>";
|
||||
printf($this->lang->upgrade->setStatusFile, $statusFile, $statusFile, $statusFile);
|
||||
echo "<table align='center' style='margin-top:100px; border:1px solid gray; font-size:14px;padding:8px;'><tr><td>";
|
||||
printf($this->lang->upgrade->setStatusFile, $cmd, $statusFile);
|
||||
die('</td></tr></table></body></html>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,10 @@ $lang->install->tmpRoot = 'Temp File Directory';
|
||||
$lang->install->dataRoot = 'Uploaded File Directory';
|
||||
$lang->install->session = 'Session Save Path';
|
||||
$lang->install->sessionFail = 'Edit the php.ini file to set session.save_path.';
|
||||
$lang->install->mkdir = '<p>%s directory has to be created.<br /> Run <br /> mkdir -p %s</p> in Linux.';
|
||||
$lang->install->chmod = ' "%s" privilege has to be modified.<br /> Run <br />chmod o=rwx -R %s in Linux.';
|
||||
$lang->install->mkdirWin = '<p>%s directory has to be created.<br /> Run <br /> mkdir %s</p> in command line.';
|
||||
$lang->install->chmodWin = ' "%s" privilege has to be modified.';
|
||||
$lang->install->mkdirLinux = '<p>%s directory has to be created.<br /> Run <br /> mkdir -p %s</p> in command line.';
|
||||
$lang->install->chmodLinux = ' "%s" privilege has to be modified.<br /> Run <br />chmod o=rwx -R %s in command line.';
|
||||
|
||||
$lang->install->defaultLang = 'Default Lang';
|
||||
$lang->install->dbHost = 'Database Host';
|
||||
|
||||
@@ -66,8 +66,10 @@ $lang->install->tmpRoot = '临时文件目录';
|
||||
$lang->install->dataRoot = '上传文件目录';
|
||||
$lang->install->session = 'Session存储目录';
|
||||
$lang->install->sessionFail = '修改PHP配置文件,设置session.save_path';
|
||||
$lang->install->mkdir = '<p>需要创建目录%s。<br /> linux下面命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = '需要修改目录 "%s" 的权限。<br />linux下面命令为:<br />chmod o=rwx -R %s';
|
||||
$lang->install->mkdirWin = '<p>需要创建目录%s。命令行下面命令为:<br /> mkdir %s</p>';
|
||||
$lang->install->chmodWin = '需要修改目录 "%s" 的权限。';
|
||||
$lang->install->mkdirLinux = '<p>需要创建目录%s。<br /> 命令行下面命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmodLinux = '需要修改目录 "%s" 的权限。<br />命令行下面命令为:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->defaultLang = '默认语言';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
|
||||
@@ -53,13 +53,15 @@
|
||||
<?php
|
||||
$tmpRootInfo['exists'] ? print($lang->install->exists) : print($lang->install->notExists);
|
||||
$tmpRootInfo['writable'] ? print($lang->install->writable) : print($lang->install->notWritable);
|
||||
$mkdir = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? $lang->install->mkdirWin : $lang->install->mkdirLinux;
|
||||
$chmod = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? $lang->install->chmodWin : $lang->install->chmodLinux;
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo $tmpRootResult;?>'><?php echo $lang->install->$tmpRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$tmpRootInfo['exists']) printf($lang->install->mkdir, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
if(!$tmpRootInfo['writable']) printf($lang->install->chmod, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
if(!$tmpRootInfo['exists']) printf($mkdir, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
if(!$tmpRootInfo['writable']) printf($chmod, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -74,8 +76,8 @@
|
||||
<td class='<?php echo $dataRootResult;?>'><?php echo $lang->install->$dataRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$dataRootInfo['exists']) printf($lang->install->mkdir, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
if(!$dataRootInfo['writable']) printf($lang->install->chmod, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
if(!$dataRootInfo['exists']) printf($mkdir, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
if(!$dataRootInfo['writable']) printf($chmod, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -93,8 +95,8 @@
|
||||
<?php
|
||||
if($sessionInfo['path'])
|
||||
{
|
||||
if(!$sessionInfo['exists']) printf($lang->install->mkdir, $sessionInfo['path'], $sessionInfo['path']);
|
||||
if(!$sessionInfo['writable']) printf($lang->install->chmod, $sessionInfo['path'], $sessionInfo['path']);
|
||||
if(!$sessionInfo['exists']) printf($mkdir, $sessionInfo['path'], $sessionInfo['path']);
|
||||
if(!$sessionInfo['writable']) printf($chmod, $sessionInfo['path'], $sessionInfo['path']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -27,13 +27,14 @@ $lang->upgrade->warnningContent = <<<EOT
|
||||
e.g. mysqldump -u root -p zentao >zentao.bak
|
||||
</pre>
|
||||
EOT;
|
||||
$lang->upgrade->setStatusFile = '<h4>Please execute the following command</h4>
|
||||
<ul>
|
||||
<li>Windows: Open command line and execute<strong>echo ok > %s</strong></li>
|
||||
<li>Linux: <strong>touch %s;</strong></li>
|
||||
<li>Or delete "%s" and create ok.txt and leave it blank.</li>
|
||||
</ul>
|
||||
<strong style="color:red">I have read and done as instructed above. <a href="upgrade.php">Continue update.</a></strong>';
|
||||
$lang->upgrade->createFileWinCMD = 'Open command line, execute <strong>echo > %s</strong>';
|
||||
$lang->upgrade->createFileLinuxCMD = 'Execute in command line: <strong>touch %s;</strong>';
|
||||
$lang->upgrade->setStatusFile = '<h4>Please finish the following action</h4>
|
||||
<ul style="line-height:1.5;font-size:13px;">
|
||||
<li>%s</li>
|
||||
<li>Or delete "%s" and create ok.txt and leave it blank.</li>
|
||||
</ul>
|
||||
<p><strong style="color:red">I have read and done as instructed above. <a href="upgrade.php">Continue update.</a></strong></p>';
|
||||
$lang->upgrade->selectVersion = 'Select Version';
|
||||
$lang->upgrade->continue = 'Continue';
|
||||
$lang->upgrade->noteVersion = "Select the compatible version, or it might cause data loss.";
|
||||
|
||||
@@ -27,13 +27,14 @@ $lang->upgrade->warnningContent = <<<EOT
|
||||
比如: mysqldump -u root -p zentao >zentao.bak
|
||||
</pre>
|
||||
EOT;
|
||||
$lang->upgrade->setStatusFile = '<h4>升级之前请先执行下面的命令:</h4>
|
||||
<ul>
|
||||
<li>windows: 打开命令行,执行<strong>echo ok > %s</strong></li>
|
||||
<li>linux: <strong>touch %s;</strong></li>
|
||||
<li>或者删掉"%s" 这个文件 ,重新创建一个ok.txt文件,不需要内容。</li>
|
||||
</ul>
|
||||
<strong style="color:red">我已经仔细阅读上面提示且完成上述工作,<a href="upgrade.php">继续更新</a></strong>';
|
||||
$lang->upgrade->createFileWinCMD = '打开命令行,执行<strong>echo > %s</strong>';
|
||||
$lang->upgrade->createFileLinuxCMD = '在命令行执行: <strong>touch %s;</strong>';
|
||||
$lang->upgrade->setStatusFile = '<h4>升级之前请先完成下面的操作:</h4>
|
||||
<ul style="line-height:1.5;font-size:13px;">
|
||||
<li>%s</li>
|
||||
<li>或者删掉"%s" 这个文件 ,重新创建一个ok.txt文件,不需要内容。</li>
|
||||
</ul>
|
||||
<p><strong style="color:red">我已经仔细阅读上面提示且完成上述工作,<a href="upgrade.php">继续更新</a></strong></p>';
|
||||
$lang->upgrade->selectVersion = '选择版本';
|
||||
$lang->upgrade->continue = '继续';
|
||||
$lang->upgrade->noteVersion = "务必选择正确的版本,否则会造成数据丢失。";
|
||||
|
||||
Reference in New Issue
Block a user