bug fixes
This commit is contained in:
parent
cf8c6f38b3
commit
63ccf02f3b
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-02-02 21:59:06
|
* @Date: 2016-02-02 21:59:06
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: printempw
|
||||||
* @Last Modified time: 2016-03-18 17:53:47
|
* @Last Modified time: 2016-03-18 18:43:11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database;
|
namespace Database;
|
||||||
|
|
@ -29,7 +29,8 @@ class Database implements EncryptInterface, SyncInterface
|
||||||
if ($conn->connect_error)
|
if ($conn->connect_error)
|
||||||
Utils::showErrorPage($conn->connect_errno,
|
Utils::showErrorPage($conn->connect_errno,
|
||||||
"无法连接至 MySQL 服务器。请确认 config.php 中的配置是否正确:".$conn->connect_error);
|
"无法连接至 MySQL 服务器。请确认 config.php 中的配置是否正确:".$conn->connect_error);
|
||||||
self::checkTableExist($conn);
|
if (self::checkTableExist($conn))
|
||||||
|
Utils::showErrorPage(-1, "数据库中不存在 ".DB_PREFIX."users 或 ".DB_PREFIX."options 表。请先运行 /admin/install.php 进行安装。");
|
||||||
if (!is_dir(BASE_DIR."/textures/"))
|
if (!is_dir(BASE_DIR."/textures/"))
|
||||||
Utils::showErrorPage(-1, "textures 文件夹不存在。请先运行 /admin/install.php 进行安装,或者手动放置一个。");
|
Utils::showErrorPage(-1, "textures 文件夹不存在。请先运行 /admin/install.php 进行安装,或者手动放置一个。");
|
||||||
|
|
||||||
|
|
@ -42,7 +43,8 @@ class Database implements EncryptInterface, SyncInterface
|
||||||
OR table_name ='".DB_PREFIX."options') AND TABLE_SCHEMA='".DB_NAME."'";
|
OR table_name ='".DB_PREFIX."options') AND TABLE_SCHEMA='".DB_NAME."'";
|
||||||
|
|
||||||
if ($conn->query($sql)->num_rows != 2)
|
if ($conn->query($sql)->num_rows != 2)
|
||||||
Utils::showErrorPage(-1, "数据库中不存在 ".DB_PREFIX."users 或 ".DB_PREFIX."options 表。请先运行 /admin/install.php 进行安装。");
|
return false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function query($sql) {
|
public function query($sql) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user