* Modify install module.

This commit is contained in:
qiyu-xie
2021-03-04 17:11:03 +08:00
parent 729750ec7e
commit 102c4ec874
8 changed files with 53 additions and 53 deletions
+9 -9
View File
@@ -13,7 +13,7 @@ class install extends control
{
/**
* Construct function.
*
*
* @access public
* @return void
*/
@@ -28,7 +28,7 @@ class install extends control
/**
* Index page of install module.
*
*
* @access public
* @return void
*/
@@ -41,8 +41,8 @@ class install extends control
}
/**
* Checking agree license.
*
* Checking agree license.
*
* @access public
* @return void
*/
@@ -55,7 +55,7 @@ class install extends control
/**
* Check the system.
*
*
* @access public
* @return void
*/
@@ -97,7 +97,7 @@ class install extends control
/**
* Set configs.
*
*
* @access public
* @return void
*/
@@ -109,7 +109,7 @@ class install extends control
/**
* Create the config file.
*
*
* @access public
* @return void
*/
@@ -168,7 +168,7 @@ class install extends control
/**
* Create company, admin.
*
*
* @access public
* @return void
*/
@@ -204,7 +204,7 @@ class install extends control
/**
* Join zentao community or login pms.
*
*
* @access public
* @return void
*/
+1 -1
View File
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = 'Eingeschränkte Benutzer';
$lang->install->groupList['LIMITED']['desc'] = 'Können nur Inhalte bearbeiten, die sie selbst betreffen';
$lang->install->cronList[''] = 'Cron Anzeigen';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = 'Update Burndown Chart';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = 'Update Burndown Chart';
$lang->install->cronList['moduleName=report&methodName=remind'] = 'Täglicher Aufgaben reminder';
$lang->install->cronList['moduleName=svn&methodName=run'] = 'Synchronisiere SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = 'Synchronisiere GIT';
+1 -1
View File
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = 'Limited User';
$lang->install->groupList['LIMITED']['desc'] = 'Users can only edit contents related to themselves.';
$lang->install->cronList[''] = 'Monitor Cron';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = 'Update Burndown Chart';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = 'Update Burndown Chart';
$lang->install->cronList['moduleName=report&methodName=remind'] = 'Daily Task Reminder';
$lang->install->cronList['moduleName=svn&methodName=run'] = 'Synchronize SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = 'Synchronize GIT';
+2 -2
View File
@@ -33,7 +33,7 @@ $lang->install->links = <<<EOT
ZenTao ALM est développé par <strong><a href='https://en.easysoft.ltd' target='_blank' class='text-danger'>Nature Easy Soft Co., LTD</a></strong>.
Site Officiel : <a href='https://www.zentao.pm' target='_blank'>https://www.zentao.pm</a>
Support Technique: <a href='https://www.zentao.pm/forum/' target='_blank'>https://www.zentao.pm/forum/</a>
LinkedIn: <a href='https://www.linkedin.com/company/1156596/' target='_blank'>Nature Easy Soft</a>
LinkedIn: <a href='https://www.linkedin.com/company/1156596/' target='_blank'>Nature Easy Soft</a>
Facebook: <a href='https://www.facebook.com/natureeasysoft' target='_blank'>Nature Easy Soft</a>
Twitter: <a href='https://twitter.com/ZentaoA' target='_blank'>ZenTao ALM</a>
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = 'Utilisateur restreint';
$lang->install->groupList['LIMITED']['desc'] = 'Les utilisateurs peuvent seulement éditer ce qui les concernent.';
$lang->install->cronList[''] = 'Moniteur Cron';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = 'Mise à jour Graphe Burndown';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = 'Mise à jour Graphe Burndown';
$lang->install->cronList['moduleName=report&methodName=remind'] = 'Rappel Tâches quotidiennes';
$lang->install->cronList['moduleName=svn&methodName=run'] = 'Synchroniser SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = 'Synchroniser GIT';
+1 -1
View File
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = 'Người dùng hạn chế';
$lang->install->groupList['LIMITED']['desc'] = 'Người dùng chỉ có thể chỉnh sửa nội dung được liên kết tới của họ.';
$lang->install->cronList[''] = 'Monitor Cron';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = 'Cập nhật biểu đồ Burndown';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = 'Cập nhật biểu đồ Burndown';
$lang->install->cronList['moduleName=report&methodName=remind'] = 'Nhắc nhở nhiệm vụ hàng ngày';
$lang->install->cronList['moduleName=svn&methodName=run'] = 'Đồng bộ SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = 'Đồng bộ GIT';
+1 -1
View File
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = '受限用户';
$lang->install->groupList['LIMITED']['desc'] = '受限用户分组(只能编辑与自己相关的内容)';
$lang->install->cronList[''] = '监控定时任务';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = '更新燃尽图';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = '更新燃尽图';
$lang->install->cronList['moduleName=report&methodName=remind'] = '每日任务提醒';
$lang->install->cronList['moduleName=svn&methodName=run'] = '同步SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = '同步GIT';
+1 -1
View File
@@ -153,7 +153,7 @@ $lang->install->groupList['LIMITED']['name'] = '受限用戶';
$lang->install->groupList['LIMITED']['desc'] = '受限用戶分組(只能編輯與自己相關的內容)';
$lang->install->cronList[''] = '監控定時任務';
$lang->install->cronList['moduleName=project&methodName=computeburn'] = '更新燃盡圖';
$lang->install->cronList['moduleName=execution&methodName=computeBurn'] = '更新燃盡圖';
$lang->install->cronList['moduleName=report&methodName=remind'] = '每日任務提醒';
$lang->install->cronList['moduleName=svn&methodName=run'] = '同步SVN';
$lang->install->cronList['moduleName=git&methodName=run'] = '同步GIT';
+37 -37
View File
@@ -15,7 +15,7 @@ class installModel extends model
{
/**
* Get license according the client lang.
*
*
* @access public
* @return string
*/
@@ -32,7 +32,7 @@ class installModel extends model
/**
* Check version of zentao.
*
*
* @access public
* @return void
*/
@@ -42,7 +42,7 @@ class installModel extends model
/**
* get php version.
*
*
* @access public
* @return string
*/
@@ -53,7 +53,7 @@ class installModel extends model
/**
* Get latest release.
*
*
* @access public
* @return string or bool
*/
@@ -71,7 +71,7 @@ class installModel extends model
/**
* Check php version.
*
*
* @access public
* @return string ok|fail
*/
@@ -82,7 +82,7 @@ class installModel extends model
/**
* Check PDO.
*
*
* @access public
* @return string ok|fail
*/
@@ -92,8 +92,8 @@ class installModel extends model
}
/**
* Check PDO::MySQL
*
* Check PDO::MySQL
*
* @access public
* @return string ok|fail
*/
@@ -181,7 +181,7 @@ class installModel extends model
/**
* Get tempRoot info.
*
*
* @access public
* @return array
*/
@@ -195,7 +195,7 @@ class installModel extends model
/**
* Check tmpRoot.
*
*
* @access public
* @return string ok|fail
*/
@@ -206,10 +206,10 @@ class installModel extends model
}
/**
* Get session save path.
*
* Get session save path.
*
* @access public
* @return array
* @return array
*/
public function getSessionSavePath()
{
@@ -220,15 +220,15 @@ class installModel extends model
}
/**
* Check session save path.
*
* Check session save path.
*
* @access public
* @return string
*/
public function checkSessionSavePath()
{
$sessionSavePath = preg_replace("/\d;/", '', session_save_path());
$result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
$result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
if($result == 'fail') return $result;
/* Test session path again. Fix bug #1527. */
@@ -243,8 +243,8 @@ class installModel extends model
}
/**
* Get data root
*
* Get data root
*
* @access public
* @return array
*/
@@ -257,8 +257,8 @@ class installModel extends model
}
/**
* Check the data root.
*
* Check the data root.
*
* @access public
* @return string ok|fail
*/
@@ -270,7 +270,7 @@ class installModel extends model
/**
* Get the php.ini info.
*
*
* @access public
* @return string
*/
@@ -287,7 +287,7 @@ class installModel extends model
/**
* Check config ok or not.
*
*
* @access public
* @return array
*/
@@ -345,7 +345,7 @@ class installModel extends model
/**
* Set database params.
*
*
* @access public
* @return void
*/
@@ -362,14 +362,14 @@ class installModel extends model
/**
* Connect to database.
*
*
* @access public
* @return object
*/
public function connectDB()
{
$dsn = "mysql:host={$this->config->db->host}; port={$this->config->db->port}";
try
try
{
$dbh = new PDO($dsn, $this->config->db->user, $this->config->db->password);
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
@@ -386,7 +386,7 @@ class installModel extends model
/**
* Check db exits or not.
*
*
* @access public
* @return bool
*/
@@ -398,7 +398,7 @@ class installModel extends model
/**
* Check table exits or not.
*
*
* @access public
* @return void
*/
@@ -411,7 +411,7 @@ class installModel extends model
/**
* Get mysql version.
*
*
* @access public
* @return string
*/
@@ -424,8 +424,8 @@ class installModel extends model
/**
* Create database.
*
* @param string $version
*
* @param string $version
* @access public
* @return bool
*/
@@ -438,8 +438,8 @@ class installModel extends model
/**
* Create tables.
*
* @param string $version
*
* @param string $version
* @access public
* @return bool
*/
@@ -489,7 +489,7 @@ class installModel extends model
/**
* Create a comapny, set admin.
*
*
* @access public
* @return void
*/
@@ -530,8 +530,8 @@ class installModel extends model
}
/**
* Import demo data.
*
* Import demo data.
*
* @access public
* @return void
*/
@@ -541,10 +541,10 @@ class installModel extends model
$demoDataFile = $this->app->getAppRoot() . 'db' . DS . $demoDataFile;
$insertTables = explode(";\n", file_get_contents($demoDataFile));
foreach($insertTables as $table)
{
{
$table = trim($table);
if(empty($table)) continue;
$table = str_replace('`zt_', $this->config->db->name . '.`zt_', $table);
$table = str_replace('zt_', $this->config->db->prefix, $table);
if(!$this->dbh->query($table)) return false;