From b7edd585bcec3c2478e62c2144c6ebff87539f85 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 30 May 2023 08:24:21 +0000 Subject: [PATCH] * Fix convert importNotice; --- module/convert/control.php | 2 +- module/convert/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/convert/control.php b/module/convert/control.php index 6827f82007..37495d1357 100644 --- a/module/convert/control.php +++ b/module/convert/control.php @@ -274,7 +274,7 @@ class convert extends control if($method == 'db') { $dbName = $this->post->dbName; - if(!$this->convert->checkDBName($dbName)) die('Invalid database name.'); + if(!$dbName) { $response['result'] = 'fail'; diff --git a/module/convert/model.php b/module/convert/model.php index 5977277e84..745806dd2b 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -43,7 +43,7 @@ class convertModel extends model */ public function dbExists($dbName = '') { - if(!$this->checkDBName($dbName)) die('Invalid database name.'); + if(!$this->checkDBName($dbName)) return false; $statement = $this->dbh->prepare('SHOW DATABASES like ?'); $statement->execute(array($dbName)); return $statement->fetch();