diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 90984425de..282c550ee5 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -436,25 +436,6 @@ $lang->error->noData = 'No Data'; $lang->error->editedByOther = 'This record might have been changed. Please refresh and try to edit again!'; $lang->error->tutorialData = 'No data can be imported in tutorial mode. Please exit tutorial first!'; -if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301); -if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302); -if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311); -if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312); -if(!defined('IP_DENIED')) define('IP_DENIED', 321); -if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331); -if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341); -if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342); - -$lang->error->entry = array(); -$lang->error->entry['PARAM_CODE_MISSING'] = 'Param code is missing.'; -$lang->error->entry['PARAM_TOKEN_MISSING'] = 'Param token is missing.'; -$lang->error->entry['INVALID_ENTRY'] = 'Entry does not exist.'; -$lang->error->entry['EMPTY_KEY'] = 'Key of entry is missing.'; -$lang->error->entry['IP_DENIED'] = 'IP is denied.'; -$lang->error->entry['INVALID_TOKEN'] = 'Invalid token.'; -$lang->error->entry['SESSION_CODE_MISSING'] = 'Session code is missing.'; -$lang->error->entry['SESSION_VERIFY_FAILED'] = 'Session verification failed.'; - /* 分页信息。*/ $lang->pager = new stdclass(); $lang->pager->noRecord = "No Records"; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index acf66b64cc..7fc0082aac 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -436,25 +436,6 @@ $lang->error->noData = '没有数据'; $lang->error->editedByOther = '该记录可能已经被改动。请刷新页面重新编辑!'; $lang->error->tutorialData = '新手模式下不会插入数据,请退出新手模式操作'; -if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301); -if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302); -if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311); -if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312); -if(!defined('IP_DENIED')) define('IP_DENIED', 321); -if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331); -if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341); -if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342); - -$lang->error->entry = array(); -$lang->error->entry['PARAM_CODE_MISSING'] = '缺少code参数'; -$lang->error->entry['PARAM_TOKEN_MISSING'] = '缺少token参数'; -$lang->error->entry['INVALID_ENTRY'] = '应用不存在'; -$lang->error->entry['EMPTY_KEY'] = '应用未设置密钥'; -$lang->error->entry['IP_DENIED'] = '该IP访问被限制访问'; -$lang->error->entry['INVALID_TOKEN'] = '不合法的token参数'; -$lang->error->entry['SESSION_CODE_MISSING'] = '缺少session code'; -$lang->error->entry['SESSION_VERIFY_FAILED'] = 'session验证失败'; - /* 分页信息。*/ $lang->pager = new stdclass(); $lang->pager->noRecord = "暂时没有记录"; diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php index 76e9de3f8b..5f23ba0fd3 100644 --- a/module/common/lang/zh-tw.php +++ b/module/common/lang/zh-tw.php @@ -436,25 +436,6 @@ $lang->error->noData = '沒有數據'; $lang->error->editedByOther = '該記錄可能已經被改動。請刷新頁面重新編輯!'; $lang->error->tutorialData = '新手模式下不會插入數據,請退出新手模式操作'; -if(!defined('PARAM_CODE_MISSING')) define('PARAM_CODE_MISSING', 301); -if(!defined('PARAM_TOKEN_MISSING')) define('PARAM_TOKEN_MISSING', 302); -if(!defined('INVALID_ENTRY')) define('INVALID_ENTRY', 311); -if(!defined('EMPTY_KEY')) define('EMPTY_KEY', 312); -if(!defined('IP_DENIED')) define('IP_DENIED', 321); -if(!defined('INVALID_TOKEN')) define('INVALID_TOKEN', 331); -if(!defined('SESSION_CODE_MISSING')) define('SESSION_CODE_MISSING', 341); -if(!defined('SESSION_VERIFY_FAILED')) define('SESSION_VERIFY_FAILED', 342); - -$lang->error->entry = array(); -$lang->error->entry['PARAM_CODE_MISSING'] = '缺少code參數'; -$lang->error->entry['PARAM_TOKEN_MISSING'] = '缺少token參數'; -$lang->error->entry['INVALID_ENTRY'] = '應用不存在'; -$lang->error->entry['EMPTY_KEY'] = '應用未設置密鑰'; -$lang->error->entry['IP_DENIED'] = '該IP訪問被限制訪問'; -$lang->error->entry['INVALID_TOKEN'] = '不合法的token參數'; -$lang->error->entry['SESSION_CODE_MISSING'] = '缺少session code'; -$lang->error->entry['SESSION_VERIFY_FAILED'] = 'session驗證失敗'; - /* 分頁信息。*/ $lang->pager = new stdclass(); $lang->pager->noRecord = "暫時沒有記錄"; diff --git a/module/common/model.php b/module/common/model.php index 51533490bd..8f3a86d4b6 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1192,7 +1192,7 @@ class commonModel extends model // limited project $limitedProject = false; if(!empty($module) && $module == 'task' && !empty($object->project) or - !empty($module) && $module == 'project' && !empty($object->id)) + !empty($module) && $module == 'project' && !empty($object->id)) { $objectID = ''; if(!empty($object->id)) $objectID = $object->id; @@ -1212,14 +1212,14 @@ class commonModel extends model if(is_null($object)) return true; if(!empty($object->openedBy) && $object->openedBy == $app->user->account or - !empty($object->addedBy) && $object->addedBy == $app->user->account or - !empty($object->assignedTo) && $object->assignedTo == $app->user->account or - !empty($object->finishedBy) && $object->finishedBy == $app->user->account or - !empty($object->canceledBy) && $object->canceledBy == $app->user->account or - !empty($object->closedBy) && $object->closedBy == $app->user->account or - !empty($object->lastEditedBy) && $object->lastEditedBy == $app->user->account) + !empty($object->addedBy) && $object->addedBy == $app->user->account or + !empty($object->assignedTo) && $object->assignedTo == $app->user->account or + !empty($object->finishedBy) && $object->finishedBy == $app->user->account or + !empty($object->canceledBy) && $object->canceledBy == $app->user->account or + !empty($object->closedBy) && $object->closedBy == $app->user->account or + !empty($object->lastEditedBy) && $object->lastEditedBy == $app->user->account) { - return true; + return true; } return false; @@ -1387,25 +1387,30 @@ class commonModel extends model */ public function checkEntry() { + $this->loadModel('entry'); + if($this->session->valid_entry) { - if(!$this->session->entry_code) $this->response(SESSION_CODE_MISSING); - if($this->session->valid_entry != md5(md5($this->get->code) . $this->server->remote_addr)) $this->response(SESSION_VERIFY_FAILED); + if(!$this->session->entry_code) $this->response('SESSION_CODE_MISSING'); + if($this->session->valid_entry != md5(md5($this->get->code) . $this->server->remote_addr)) $this->response('SESSION_VERIFY_FAILED'); return true; } - if(!$this->get->code) $this->response(PARAM_CODE_MISSING); - if(!$this->get->token) $this->response(PARAM_TOKEN_MISSING); + if(!$this->get->code) $this->response('PARAM_CODE_MISSING'); + if(!$this->get->token) $this->response('PARAM_TOKEN_MISSING'); - $entry = $this->loadModel('entry')->getByCode($this->get->code); - if(!$entry) $this->response(INVALID_ENTRY); - if(!$entry->key) $this->response(EMPTY_KEY); - if(!$this->checkIP($entry->ip)) $this->response(IP_DENIED); - if(!$this->checkEntryToken($entry->key)) $this->response(INVALID_TOKEN); + $entry = $this->entry->getByCode($this->get->code); + if(!$entry) $this->response('EMPTY_ENTRY'); + if(!$entry->key) $this->response('EMPTY_KEY'); + if(!$this->checkIP($entry->ip)) $this->response('IP_DENIED'); + if(!$this->checkEntryToken($entry->key)) $this->response('INVALID_TOKEN'); $this->session->set('ENTRY_CODE', $this->get->code); $this->session->set('VALID_ENTRY', md5(md5($this->get->code) . $this->server->remote_addr)); $this->loadModel('entry')->saveLog($entry->id, $this->server->request_uri); + + unset($_GET['code']); + unset($_GET['token']); } /** @@ -1426,15 +1431,15 @@ class commonModel extends model /** * Response. * - * @param int $code + * @param string $code * @access public * @return void */ public function response($code) { $response = new stdclass(); - $response->errcode = $code; - $response->errmsg = $this->lang->error->entry[$code]; + $response->errcode = $this->config->entry->errcode[$code]; + $response->errmsg = $this->lang->entry->errmsg[$code]; die(helper::jsonEncode($response)); } @@ -1480,13 +1485,13 @@ class commonModel extends model if(!file_exists($logFile)) file_put_contents($logFile, ''); $fh = @fopen($logFile, 'a'); - if($fh) - { - fwrite($fh, date('Ymd H:i:s') . ": " . $app->getURI() . "\n"); - fwrite($fh, "url: " . $url . "\n"); - fwrite($fh, "results:" . print_r($response, true) . "\n"); - fclose($fh); - } + if($fh) + { + fwrite($fh, date('Ymd H:i:s') . ": " . $app->getURI() . "\n"); + fwrite($fh, "url: " . $url . "\n"); + fwrite($fh, "results:" . print_r($response, true) . "\n"); + fclose($fh); + } return $response; } diff --git a/module/common/view/footer.html.php b/module/common/view/footer.html.php index e8a564c25b..0dc2f252a0 100755 --- a/module/common/view/footer.html.php +++ b/module/common/view/footer.html.php @@ -46,10 +46,10 @@ $(function() else { if(data) - { - if(typeof data == 'string') data = $.parseJSON(data); - if(typeof data.message == 'string') notifyMessage(data.message); - } + { + if(typeof data == 'string') data = $.parseJSON(data); + if(typeof data.message == 'string') notifyMessage(data.message); + } } }); }, 60 * 1000); diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index d78a690368..022b92a385 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -12,6 +12,7 @@ $clientTheme = $this->app->getClientTheme(); + zentaoPMS); diff --git a/module/entry/config.php b/module/entry/config.php index 051b241f36..7f529f1375 100644 --- a/module/entry/config.php +++ b/module/entry/config.php @@ -6,3 +6,12 @@ $config->entry->edit = new stdclass(); $config->entry->edit->requiredFields = 'name, code, key'; $config->entry->help = 'http://www.zentao.net/book/zentaopmshelp/integration-287.html'; + +$config->entry->errcode['PARAM_CODE_MISSING'] = 401; +$config->entry->errcode['PARAM_TOKEN_MISSING'] = 401; +$config->entry->errcode['SESSION_CODE_MISSING'] = 401; +$config->entry->errcode['EMPTY_KEY'] = 401; +$config->entry->errcode['INVALID_TOKEN'] = 401; +$config->entry->errcode['SESSION_VERIFY_FAILED'] = 401; +$config->entry->errcode['IP_DENIED'] = 403; +$config->entry->errcode['EMPTY_ENTRY'] = 404; diff --git a/module/entry/lang/en.php b/module/entry/lang/en.php index f7ded928be..d99fbc11b7 100644 --- a/module/entry/lang/en.php +++ b/module/entry/lang/en.php @@ -34,3 +34,12 @@ $lang->entry->note->name = 'Name'; $lang->entry->note->code = 'Code, should be english and number.'; $lang->entry->note->ip = "Use comma between two IPs. IP segment is supported, e.g. 192.168.1.*"; $lang->entry->note->allIP = 'All'; + +$lang->entry->errmsg['PARAM_CODE_MISSING'] = 'Param code is missing.'; +$lang->entry->errmsg['PARAM_TOKEN_MISSING'] = 'Param token is missing.'; +$lang->entry->errmsg['SESSION_CODE_MISSING'] = 'Session code is missing.'; +$lang->entry->errmsg['EMPTY_KEY'] = 'Key of entry is missing.'; +$lang->entry->errmsg['INVALID_TOKEN'] = 'Invalid token.'; +$lang->entry->errmsg['SESSION_VERIFY_FAILED'] = 'Session verification failed.'; +$lang->entry->errmsg['IP_DENIED'] = 'IP is denied.'; +$lang->entry->errmsg['EMPTY_ENTRY'] = 'Key of entry is missing.'; diff --git a/module/entry/lang/zh-cn.php b/module/entry/lang/zh-cn.php index af5ce13432..c2afc09d0d 100644 --- a/module/entry/lang/zh-cn.php +++ b/module/entry/lang/zh-cn.php @@ -34,3 +34,12 @@ $lang->entry->note->name = '授权应用名称'; $lang->entry->note->code = '授权应用代号,必须为字母或数字的组合'; $lang->entry->note->ip = "允许访问API的应用ip,多个ip用逗号隔开。支持IP段,如192.168.1.*"; $lang->entry->note->allIP = '无限制'; + +$lang->entry->errmsg['PARAM_CODE_MISSING'] = '缺少code参数'; +$lang->entry->errmsg['PARAM_TOKEN_MISSING'] = '缺少token参数'; +$lang->entry->errmsg['SESSION_CODE_MISSING'] = '缺少session code'; +$lang->entry->errmsg['EMPTY_KEY'] = '应用未设置密钥'; +$lang->entry->errmsg['INVALID_TOKEN'] = '无效的token参数'; +$lang->entry->errmsg['SESSION_VERIFY_FAILED'] = 'session验证失败'; +$lang->entry->errmsg['IP_DENIED'] = '该IP被限制访问'; +$lang->entry->errmsg['EMPTY_ENTRY'] = '应用不存在'; diff --git a/module/install/model.php b/module/install/model.php index bf9e69bd7c..ea0170b1be 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -26,7 +26,7 @@ class installModel extends model $licenseCN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.CN'); $licenseEN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.EN'); - if($clientLang == 'zh' or $clientLang == 'zh-tw') return $licenseCN . $licenseEN; + if($clientLang == 'zh-cn' or $clientLang == 'zh-tw') return $licenseCN . $licenseEN; return $licenseEN . $licenseCN; } diff --git a/module/install/view/index.html.php b/module/install/view/index.html.php index 928ace7dde..d3766fc2d0 100644 --- a/module/install/view/index.html.php +++ b/module/install/view/index.html.php @@ -43,7 +43,7 @@
install->promotion?>
install->product as $product):?> -
+
diff --git a/module/message/view/header.html.php b/module/message/view/header.html.php index 12a92c046c..d26d729de4 100644 --- a/module/message/view/header.html.php +++ b/module/message/view/header.html.php @@ -4,6 +4,7 @@ message->typeList as $type => $typeName):?> message->typeLink[$type])):?> message->typeLink[$type]);?> +
  • createLink($moduleName, $methodName), $typeName)?>
  • diff --git a/module/my/model.php b/module/my/model.php index 1e8e8174ba..e460ec0bd5 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -21,7 +21,7 @@ class myModel extends model */ public function setMenu() { - $this->lang->my->menu->account['link'] = sprintf($this->lang->my->menu->account['link'], $this->app->user->realname); + if(isset($this->lang->my->menu->account['link'])) $this->lang->my->menu->account['link'] = sprintf($this->lang->my->menu->account['link'], $this->app->user->realname); /* Adjust the menu order according to the user role. */ $role = $this->app->user->role; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index a9307e0581..77e950a488 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -43,6 +43,7 @@ $lang->product->doc = 'Doc'; $lang->product->project = $lang->projectCommon . 'List'; $lang->product->build = 'Build'; +$lang->product->currentProject = 'Current Project'; $lang->product->activeStories = 'Activated Story'; $lang->product->changedStories = 'Changed Story'; $lang->product->draftStories = 'Draft Story'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index c47a0f512c..086cea20db 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -43,6 +43,7 @@ $lang->product->doc = '文档列表'; $lang->product->project = $lang->projectCommon . '列表'; $lang->product->build = '版本列表'; +$lang->product->currentProject = '当前项目'; $lang->product->activeStories = '激活需求'; $lang->product->changedStories = '已变更需求'; $lang->product->draftStories = '草稿需求'; diff --git a/module/product/lang/zh-tw.php b/module/product/lang/zh-tw.php index b9f14bbcfd..72c90a08b6 100644 --- a/module/product/lang/zh-tw.php +++ b/module/product/lang/zh-tw.php @@ -43,6 +43,7 @@ $lang->product->doc = '文檔列表'; $lang->product->project = $lang->projectCommon . '列表'; $lang->product->build = '版本列表'; +$lang->product->currentProject = '當前項目'; $lang->product->activeStories = '激活需求'; $lang->product->changedStories = '已變更需求'; $lang->product->draftStories = '草稿需求'; diff --git a/module/product/model.php b/module/product/model.php index b12ecd2e41..88eddf0328 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -792,15 +792,11 @@ class productModel extends model foreach($this->app->user->groups as $group) $groups .= ",$group,"; } - $stmt = $this->dao->select('distinct t1.*,t3.account as teamAccount')->from(TABLE_PRODUCT)->alias('t1') + $stmt = $this->dao->select('distinct t1.*,t3.type as teamType,t3.account as teamAccount,t4.deleted as projectDeleted')->from(TABLE_PRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id = t2.product') ->leftJoin(TABLE_TEAM)->alias('t3')->on('t2.project = t3.root') ->leftJoin(TABLE_PROJECT)->alias('t4')->on('t2.project = t4.id') ->where('t1.deleted')->eq(0) - ->beginIF(!$this->app->user->admin) - ->andWhere('t3.type')->eq('project') - ->andWhere('t4.deleted')->eq(0) - ->fi() ->query(); $products = array(); @@ -814,7 +810,12 @@ class productModel extends model } else { - if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy != $account OR $product->teamAccount == $account) + if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account) + { + $products[$id] = $id; + continue; + } + if($product->teamType == 'project' and $product->teamAccount == $account and $product->projectDeleted == '0') { $products[$id] = $id; continue; diff --git a/module/story/model.php b/module/story/model.php index d7dea79d69..3568ffe48b 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1820,7 +1820,7 @@ class storyModel extends model ->andWhere('assignedTo')->eq($account) ->orderBy('id_desc') ->limit($limit) - ->fetchAll(); + ->fetchPairs('id', 'title'); } /** diff --git a/module/todo/js/common.js b/module/todo/js/common.js index a9c90ecc98..1e332fe889 100644 --- a/module/todo/js/common.js +++ b/module/todo/js/common.js @@ -73,6 +73,7 @@ function setBeginsAndEnds(i, beginOrEnd) { if(j != 0) $("#begins" + j)[0].selectedIndex = $("#ends" + (j - 1))[0].selectedIndex; $("#ends" + j)[0].selectedIndex = $("#begins" + j)[0].selectedIndex + 3; + $("#begins" + j).trigger('chosen:updated'); $("#ends" + j).trigger('chosen:updated'); } } diff --git a/module/tree/model.php b/module/tree/model.php index accd40cb20..5971b0c427 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1477,7 +1477,7 @@ class treeModel extends model if(empty($branches)) $branches = $this->post->branch; $branches = array_unique($branches); - if($this->isMergeModule($rootID, $viewType)) $viewType .= ',story'; + if($this->isMergeModule($rootID, $viewType) and $viewType != 'task') $viewType .= ',story'; $existsModules = $this->dao->select('id,branch,name')->from(TABLE_MODULE)->where('root')->eq($rootID)->andWhere('type')->in($viewType)->andWhere('parent')->eq($parentModuleID)->andWhere('branch')->in($branches)->andWhere('deleted')->eq(0)->fetchAll(); $repeatName = ''; diff --git a/module/tutorial/model.php b/module/tutorial/model.php index dc5ca1866e..72464b3f55 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -242,4 +242,15 @@ class tutorialModel extends model $users['test'] = 'Test'; return $users; } + + /** + * Get tutorialed. + * + * @access public + * @return string + */ + public function getTutorialed() + { + return $this->dao->select('*')->from(TABLE_CONFIG)->where('module')->eq('tutorial')->andWhere('owner')->eq($this->app->user->account)->andWhere('section')->eq('tasks')->andWhere('`key`')->eq('setting')->fetch('value'); + } } diff --git a/module/upgrade/control.php b/module/upgrade/control.php index 8052d9b7bf..44a1bf707c 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -37,8 +37,15 @@ class upgrade extends control { if($this->get->agree == true) $this->locate(inlink('backup')); + $clientLang = $this->app->getClientLang(); + $licenseCN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.CN'); + $licenseEN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.EN'); + + $license = $licenseEN . $licenseCN; + if($clientLang == 'zh-cn' or $clientLang == 'zh-tw') $license = $licenseCN . $licenseEN; + $this->view->title = $this->lang->upgrade->common; - $this->view->license = file_get_contents($this->app->getBasePath() . 'doc/LICENSE'); + $this->view->license = $license; $this->display(); } diff --git a/module/upgrade/css/afterexec.css b/module/upgrade/css/afterexec.css index 3151ee49a3..8d820e952d 100644 --- a/module/upgrade/css/afterexec.css +++ b/module/upgrade/css/afterexec.css @@ -1,19 +1,10 @@ .adbox{margin-top:20px;} -.card { - border: none; - border-radius: 0px; - box-shadow: none; - display: block; - margin-bottom: 0px; - overflow: hidden; - padding: 0; - position: relative; - transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1) 0s; -} + +.card.ad{margin-bottom:0px;} .card.ad > .img-wrapper { background-position: center; background-repeat: no-repeat; - height: 85px; + height: 115px; width: 100%; } .card.ad > .img-wrapper > img{display: none;} diff --git a/module/upgrade/model.php b/module/upgrade/model.php index ddc7969562..7803f4007a 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -207,6 +207,7 @@ class upgradeModel extends model $this->moveData2Notify(); case '9_8': $this->fixFinishedBy(); + case '9_8_1': } $this->deletePatch(); @@ -311,6 +312,7 @@ class upgradeModel extends model case '9_6_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.6.3')); case '9_7': $confirmContent .= file_get_contents($this->getUpgradeFile('9.7')); case '9_8': + case '9_8_1': } return str_replace('zt_', $this->config->db->prefix, $confirmContent); } diff --git a/module/upgrade/view/afterexec.html.php b/module/upgrade/view/afterexec.html.php index b2b1d9fc1c..0590377b09 100644 --- a/module/upgrade/view/afterexec.html.php +++ b/module/upgrade/view/afterexec.html.php @@ -22,22 +22,18 @@
    install->promotion?>
    -
    diff --git a/module/webhook/view/header.html.php b/module/webhook/view/header.html.php index 89e41eab12..6d0254836c 100644 --- a/module/webhook/view/header.html.php +++ b/module/webhook/view/header.html.php @@ -16,6 +16,7 @@ message->typeList as $type => $typeName):?> message->typeLink[$type])):?> message->typeLink[$type]);?> +
  • >createLink($moduleName, $methodName), $typeName)?>
  • diff --git a/www/upgrade.php.tmp b/www/upgrade.php.tmp index 102fa22b3f..609ed1c84b 100644 --- a/www/upgrade.php.tmp +++ b/www/upgrade.php.tmp @@ -12,23 +12,28 @@ /* Judge my.php exists or not. */ define('IN_UPGRADE', true); $dbConfig = dirname(dirname(__FILE__)) . '/config/db.php'; -if(!file_exists($dbConfig)) +if(file_exists($dbConfig)) { $myConfig = dirname(dirname(__FILE__)) . '/config/my.php'; - if(!file_exists($myConfig)) + if(file_exists($myConfig)) { - echo "文件" . $dbConfig . "不存在! 提示:不要重命名原来的禅道安装目录,下载最新的源码包,覆盖即可。" . "
    "; - echo $dbConfig . " doesn't exists! Please don't rename zentao before overriding the source code!"; - exit; + $myContent = trim(file_get_contents($myConfig)); + $myContent = str_replace('"; echo "Please execute the command 'chmod 777 $configDir' to modify the permissions to ensure that the ZenTao has operating file permissions in this directory"; exit; } - file_put_contents($myConfig, "