From 86db9e7da4e4ab96137d885e2079f2674a9b91be Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 17 Apr 2023 13:13:22 +0800 Subject: [PATCH 1/5] * Code for bug 34252, Modidy database tyle language. --- module/install/lang/zh-cn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index 32515e84cc..7f55dbe796 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -121,7 +121,7 @@ $lang->install->chmodLinux = '需要修改目录 "%s" 的权限。
命令 $lang->install->timezone = '时区设置'; $lang->install->defaultLang = '默认语言'; -$lang->install->dbDriver = 'Database Driver'; +$lang->install->dbDriver = '数据库类型'; $lang->install->dbHost = '数据库服务器'; $lang->install->dbHostNote = '如果127.0.0.1无法访问,尝试使用localhost'; $lang->install->dbPort = '服务器端口'; From dabe30f67d058a4b07ddc0603f9c153d8b49cd70 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 17 Apr 2023 13:56:33 +0800 Subject: [PATCH 2/5] * Code for bug 34254, Modify file remove error. --- module/install/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/install/control.php b/module/install/control.php index 211a03661a..450b308cdf 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -296,12 +296,13 @@ class install extends control */ public function step6() { - $installFileDeleted = unlink($this->app->getAppRoot() . 'www/install.php'); + $canDelFile = is_writable($this->app->getAppRoot() . 'www'); + $installFileDeleted = $canDelFile ? unlink($this->app->getAppRoot() . 'www/install.php') : false; $this->view->installFileDeleted = $installFileDeleted; $this->view->title = $this->lang->install->success; $this->display(); - unlink($this->app->getAppRoot() . 'www/upgrade.php'); + if($canDelFile) unlink($this->app->getAppRoot() . 'www/upgrade.php'); unset($_SESSION['installing']); session_destroy(); } From c843469210b0be4bbad21b8e1966ff798dd73727 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 17 Apr 2023 13:57:55 +0800 Subject: [PATCH 3/5] * Modify sql error. --- module/program/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/program/model.php b/module/program/model.php index 6410e39ec8..17f0337bdc 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1669,7 +1669,7 @@ class programModel extends model if($program) return $program->id; $account = isset($this->app->user->account) ? $this->app->user->account : ''; - $minBegin = $this->dao->select('min(begin) as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); + $minBegin = $this->dao->select('min("begin") as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); $program = new stdclass(); $program->name = $this->lang->program->defaultProgram; From b57c935be42ad85c115ca6f00d321e20485b299a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 17 Apr 2023 14:00:40 +0800 Subject: [PATCH 4/5] * Revert code. --- module/program/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/program/model.php b/module/program/model.php index 17f0337bdc..6410e39ec8 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1669,7 +1669,7 @@ class programModel extends model if($program) return $program->id; $account = isset($this->app->user->account) ? $this->app->user->account : ''; - $minBegin = $this->dao->select('min("begin") as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); + $minBegin = $this->dao->select('min(begin) as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); $program = new stdclass(); $program->name = $this->lang->program->defaultProgram; From 9d9378e1dc662c3a526653dcf554916b315632b0 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 17 Apr 2023 14:20:20 +0800 Subject: [PATCH 5/5] * Modify db field. --- module/program/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/program/model.php b/module/program/model.php index 6410e39ec8..ebe092f12a 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1669,7 +1669,7 @@ class programModel extends model if($program) return $program->id; $account = isset($this->app->user->account) ? $this->app->user->account : ''; - $minBegin = $this->dao->select('min(begin) as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); + $minBegin = $this->dao->select('min(`begin`) as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min'); $program = new stdclass(); $program->name = $this->lang->program->defaultProgram;