diff --git a/admin/common.php b/admin/common.php
index e3a67023..371ac64f 100644
--- a/admin/common.php
+++ b/admin/common.php
@@ -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);
diff --git a/admin/upgrade.php b/admin/upgrade.php
index 718d47a0..a4565566 100644
--- a/admin/upgrade.php
+++ b/admin/upgrade.php
@@ -17,7 +17,7 @@ include 'menu.php';
- %s 升级到 %s', $options->version, Typecho_Common::VERSION); ?>
-
+ - 备份您的数据', Typecho_Common::url('backup.php', $options->adminUrl)); ?>
diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php
index 83d10c66..b1132619 100644
--- a/var/Typecho/Common.php
+++ b/var/Typecho/Common.php
@@ -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);
diff --git a/var/Widget/Backup.php b/var/Widget/Backup.php
index 6eed4988..ece7be34 100644
--- a/var/Widget/Backup.php
+++ b/var/Widget/Backup.php
@@ -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');