From 975a7b53c7991f7d361b9a8a7610dd49751af4cf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 18 Apr 2017 17:06:33 +0800 Subject: [PATCH] * adjust for check table. --- lib/base/dao/dao.class.php | 4 ++-- module/misc/view/checktable.html.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php index 62c5131559..5c6343402f 100644 --- a/lib/base/dao/dao.class.php +++ b/lib/base/dao/dao.class.php @@ -1308,10 +1308,10 @@ class baseDAO $errorCode = $errorInfo[1]; $errorMsg = $errorInfo[2]; $message = $exception->getMessage(); - if(strpos($this->repairCode, "|$errorCode|") !== false or ($errorCode == '1016' and strpos($errorMsg, 'errno: 145') !== false)) + if(strpos($this->repairCode, "|$errorCode|") !== false or ($errorCode == '1016' and strpos($errorMsg, 'errno: 145') !== false) or strpos($message, 'repair') !== false) { global $config; - if(isset($config->framework->autoRepairTable) and $config->framework->autoRepairTable) die(js::locate(helper::createLink('misc', 'checkTable'))); + if(isset($config->framework->autoRepairTable) and $config->framework->autoRepairTable) die(js::locate(helper::createLink('misc', 'checkTable'), 'top')); $message .= ' ' . $this->lang->repairTable; } $sql = $this->sqlobj->get(); diff --git a/module/misc/view/checktable.html.php b/module/misc/view/checktable.html.php index 5d57c9e77c..82b9567125 100644 --- a/module/misc/view/checktable.html.php +++ b/module/misc/view/checktable.html.php @@ -46,5 +46,8 @@ - - + + +