mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 20:48:42 +01:00
fix some minor bugs
This commit is contained in:
parent
eeedef972a
commit
242fc1a4cb
@ -47,7 +47,7 @@ if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($cur
|
||||
$mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION),
|
||||
str_replace('/', '.', $options->version), '>'));
|
||||
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile) {
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile && 'backup.php' != $adminFile) {
|
||||
$response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl));
|
||||
} else if (!$mustUpgrade && 'upgrade.php' == $adminFile) {
|
||||
$response->redirect($options->adminUrl);
|
||||
|
@ -17,7 +17,7 @@ include 'menu.php';
|
||||
<ul>
|
||||
<li><?php _e('您已经更新了系统程序, 我们还需要执行一些后续步骤来完成升级'); ?></li>
|
||||
<li><?php _e('此程序将把您的系统从 <strong>%s</strong> 升级到 <strong>%s</strong>', $options->version, Typecho_Common::VERSION); ?></li>
|
||||
<li><strong class="warning"><?php _e('在升级之前强烈建议先备份您的数据'); ?></strong></li>
|
||||
<li><strong class="warning"><?php _e('在升级之前强烈建议先<a href="%s">备份您的数据</a>', Typecho_Common::url('backup.php', $options->adminUrl)); ?></strong></li>
|
||||
</ul>
|
||||
<p><button class="btn primary" type="submit"><?php _e('完成升级 »'); ?></button></p>
|
||||
</form>
|
||||
|
@ -1120,7 +1120,7 @@ EOF;
|
||||
$address = gethostbyname($host);
|
||||
$inet = inet_pton($address);
|
||||
|
||||
if ($inet === false) {
|
||||
if (false === $inet) {
|
||||
// 有可能是ipv6的地址
|
||||
$records = dns_get_record($host, DNS_AAAA);
|
||||
|
||||
|
@ -65,7 +65,6 @@ class Widget_Backup extends Widget_Abstract_Options implements Widget_Interface_
|
||||
private function extractData($file)
|
||||
{
|
||||
$fp = @fopen($file, 'rb');
|
||||
$end = false;
|
||||
|
||||
if (!$fp) {
|
||||
$this->widget('Widget_Notice')->set(_t('无法读取备份文件'), 'error');
|
||||
|
Loading…
x
Reference in New Issue
Block a user