diff --git a/db/update11.6.sql b/db/update11.6.sql new file mode 100644 index 0000000000..9bfd776fa2 --- /dev/null +++ b/db/update11.6.sql @@ -0,0 +1,4 @@ +ALTER TABLE `zt_translation` +CHANGE `refer` `referer` text COLLATE 'utf8_general_ci' NOT NULL AFTER `value`, +CHANGE `translationTime` `translatedTime` datetime NOT NULL AFTER `translator`, +CHANGE `reviewTime` `reviewedTime` datetime NOT NULL AFTER `reviewer`; diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 214451ade0..a0408cb1c5 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1199,7 +1199,8 @@ class baseRouter * Set the control file of the module to be called. * * @param bool $exitIfNone 没有找到该控制器文件的情况:如果该参数为true,则终止程序;如果为false,则打印错误日志 - * If control file not foundde, how to do. True, die the whole app. false, log error. + * The controller file was not found: if the parameter is true, the program is terminated; + * if false, the error log is printed. * @access public * @return bool */ diff --git a/framework/router.class.php b/framework/router.class.php index 552fe3b3d8..02c9a94cd3 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -21,22 +21,22 @@ include dirname(__FILE__) . '/base/router.class.php'; class router extends baseRouter { /** - * 工作流模块名。 - * The module name of a flow. + * 请求的原始模块名。 + * The requestd module name parsed from a URL. * * @var string * @access public */ - public $workflowModule; + public $rawModule; /** - * 工作流方法名。 - * The method name of a flow. + * 请求的原始方法名。 + * The requested method name parsed from a URL. * * @var string * @access public */ - public $workflowMethod; + public $rawMethod; /** * Add custom langs when set client lang. @@ -222,9 +222,8 @@ class router extends baseRouter } /** - * Alias load module config. - * - * Extension: set appName as empty. + * 调用父类方法时不传递$appName参数,保证父类方法中$appName值为空。 + * The $appName parameter is not passed when calling the parent class method, ensuring that the $appName value in the parent class method is null. * * @param string $moduleName * @param string $appName @@ -256,57 +255,81 @@ class router extends baseRouter } /** - * 设置要被调用的控制器文件。 - * Set the control file of the module to be called. + * 检查请求的模块和方法是否应该调用工作流引擎进行处理。 + * Check if the requested module and method should call the workflow engine for processing. * - * Extension: If the module and method is defined in workflow, run workflow engine. + * 处理逻辑: + * Processing logic: + * 1、如果当前版本不是企业版,或者当前请求处于安装模式或升级模式,调用父类方法并返回。 + * 1. If the current version is not the enterprise version, or if the current request is in install mode or upgrade mode, call the parent class method and return. + * + * 2、如果当前请求的模块在TABLE_WORKFLOW表中不存在,调用父类方法并返回。 + * 2. If the currently requested module does not exist in the TABLE_WORKFLOW table, call the parent class method and return. + * + * 3、如果当前请求的模块在TABLE_WORKFLOW表中存在并且是内置模块,并且请求的方法名是browselabel,则修改请求的模块名为flow,修改请求的方法名为browse,重新设置URI参数,调用父类方法并返回。 + * 3. If the currently requested module exists in the TABLE_WORKFLOW table and is a built-in module, and the requested method name is + * browselabel, rename the module of the request to flow and the method of the request to browse, and reset the URI, call the parent class method and return. + * + * 4、如果不满足3中的条件但当前请求的方法在TABLE_WORKFLOWACTION表中存在,且方法扩展类型为重写,则修改请求的模块名为flow,方法名根据5中的规则修改,重新设置URI参数,调用父类方法并返回。 + * 4. If the condition of 3 is not satisfied but the currently requested method exists in the TABLE_WORKFLOWACTION table, and the method + * extension type is overwrite, rename the module of the request to flow, and rename the method of the request according to the rule in 5. + * Then reset the URI, call the parent class method and return. + * + * 5、如果当前请求的方法名为browse、create、edit、view、delete、export中任意一个,则方法名不变,否则方法名改为operate。 + * 5. If the currently requested method is named any one of browse, create, edit, view, delete, or export, the method name is unchanged, otherwise the method name is changed to operate. * * @param bool $exitIfNone 没有找到该控制器文件的情况:如果该参数为true,则终止程序;如果为false,则打印错误日志 - * If control file not foundde, how to do. True, die the whole app. false, log error. + * The controller file was not found: if the parameter is true, the program is terminated; + * if false, the error log is printed. * @access public * @return bool */ public function setControlFile($exitIfNone = true) { - /* If the module and method is defined in workflow, run workflow engine. */ - if(defined('TABLE_WORKFLOW') && defined('TABLE_WORKFLOWACTION') && $this->dbh) + /* If is not a biz version or is in install mode or in in upgrade mode, call parent method. */ + if(!isset($this->config->bizVersion) or defined('IN_INSTALL') or defined('IN_UPGRADE')) return parent::setControlFile($exitIfNone); + + /* Check if the requested module is defined in workflow. */ + $flow = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOW . " WHERE `module` = '$this->moduleName'")->fetch(); + if(!$flow) return parent::setControlFile($exitIfNone); + + /** + * 工作流中配置的标签应该请求browse方法,而某些内置流程本身包含browse方法。在这里处理请求的时候会无法区分是内置的browse方法还是工作 + * 流标签的browse方法,为了避免此类冲突,在工作流中配置出的标签请求的方法改为browseLabel,在设置控制器文件时需要将其重设为browse。 + * Tags configured in the workflow should request the browse method, and some built-in processes themselves contain the browse + * method. When processing a request here, it is impossible to distinguish between the built-in browse method and the browse + * method of the workflow tag. In order to avoid such conflicts, the method of configuring the label request in the workflow + * is changed to browseLabel, which needs to be reset to browse when setting the controller file. + */ + if($flow->buildin && $this->methodName == 'browselabel') { - try + $this->rawModule = $this->moduleName; + $this->rawMethod = 'browse'; + + $moduleName = 'flow'; + $methodName = 'browse'; + + $this->setFlowURI($moduleName, $methodName); + } + else + { + $action = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOWACTION . " WHERE `module` = '$this->moduleName' AND `action` = '$this->methodName'")->fetch(); + if(zget($action, 'extensionType') == 'override') { - $flow = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOW . " WHERE `module` = '$this->moduleName'")->fetch(); - if($flow) - { - if($flow->buildin && $this->methodName == 'browselabel') - { - $this->workflowModule = $this->moduleName; - $this->workflowMethod = 'browse'; + $this->rawModule = $this->moduleName; + $this->rawMethod = $this->methodName; - $this->loadModuleConfig('workflowaction'); + $this->loadModuleConfig('workflowaction'); - $moduleName = 'flow'; - $methodName = 'browse'; + $moduleName = 'flow'; + /* + * 工作流中除了browse、create、edit、view、delete、export外其他的方法都调用operate方法来执行。 + * In addition to browse, create, edit, view, delete and export, all methods in the workflow call the operate method to execute. + */ + $methodName = in_array($this->methodName, $this->config->workflowaction->default->actions) ? $this->methodName : 'operate'; - $this->setFlowURI($moduleName, $methodName); - } - else - { - $action = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOWACTION . " WHERE `module` = '$this->moduleName' AND `action` = '$this->methodName'")->fetch(); - if(zget($action, 'extensionType') == 'override') - { - $this->workflowModule = $this->moduleName; - $this->workflowMethod = $this->methodName; - - $this->loadModuleConfig('workflowaction'); - - $moduleName = 'flow'; - $methodName = in_array($this->methodName, $this->config->workflowaction->default->actions) ? $this->methodName : 'operate'; - - $this->setFlowURI($moduleName, $methodName); - } - } - } + $this->setFlowURI($moduleName, $methodName); } - catch(PDOException $exception){} } /* Call method of parent. */ @@ -314,7 +337,22 @@ class router extends baseRouter } /** - * Reset URI to flow's URI. + * 把请求的URI重设成工作流引擎可以解析的URI。 + * Reset the requested URI to a URI that the workflow engine can resolve. + * + * e.g. /$module-browse-search-1.html => /flow-browse-$module-search-1.html + * /$module-create.html => /flow-create-$module.html + * /$module-edit-1.html => /flow-edit-$module-1.html + * /$module-view-1.html => /flow-view-$module-1.html + * /$module-delete-1.html => /flow-delete-$module-1.html + * /$module-close-1.html => /flow-operate-$module-close-1.html + * + * /index.php?m=$module&f=browse&mode=search&label=1 => /index.php?m=flow&f=browse&module=$module&mode=search&label=1 + * /index.php?m=$module&f=create&id=1 => /index.php?m=flow&f=create&module=$module&$id=1 + * /index.php?m=$module&f=edit&id=1 => /index.php?m=flow&f=edit&module=$module&$id=1 + * /index.php?m=$module&f=view&id=1 => /index.php?m=flow&f=view&module=$module&$id=1 + * /index.php?m=$module&f=delete&id=1 => /index.php?m=flow&f=delete&module=$module&$id=1 + * /index.php?m=$module&f=close&id=1 => /index.php?m=flow&f=operate&module=$module&action=close&$id=1 * * @param string $moduleName * @param string $methodName @@ -325,41 +363,45 @@ class router extends baseRouter { $this->setModuleName($moduleName); $this->setMethodName($methodName); + if($this->config->requestType != 'GET') { - $params = explode($this->config->requestFix, $this->URI); + /* e.g. $this->URI = /$module-close-1.html. */ + $params = explode($this->config->requestFix, $this->URI); // $params = array($module, 'close', 1); /* Remove module and method. */ - $params = array_slice($params, 2); + $params = array_slice($params, 2); // $params = array(1); /* Prepend other params. */ - if($methodName == 'operate') array_unshift($params, $this->workflowMethod); - array_unshift($params, $this->workflowModule); - array_unshift($params, $methodName); - array_unshift($params, $moduleName); + if($methodName == 'operate') array_unshift($params, $this->rawMethod); // $params = array('close', 1); + array_unshift($params, $this->rawModule); // $params = array($module, 'close', 1); + array_unshift($params, $methodName); // $params = array('operate', $module, 'close', 1); + array_unshift($params, $moduleName); // $params = array('flow', 'operate', $module, 'close', 1); - $this->URI = implode($this->config->requestFix, $params); + $this->URI = implode($this->config->requestFix, $params); // $this->URI = flow-operate-$module-close-1.html; } else { - $params = parse_url($this->URI); /* Extract $path and $query from $params. */ - extract($params); - parse_str($query, $params); - /* Remove module and method. */ - unset($params[$this->config->moduleVar]); - unset($params[$this->config->methodVar]); + /* e.g. $tshi->URI = /index.php?m=$module&f=browse&mode=search&label=1. */ + $params = parse_url($this->URI); // $params = array('path' => '/index.php', 'query' => m=$module&f=browse&mode=search&label=1; + extract($params); // $path = '/index.php'; $query = 'm=$module&f=browse&mode=search&label=1'; + parse_str($query, $params); // $params = array('m' => $module, 'f' => 'browse', 'mode' = 'search', 'label' => 1); - $params = array_reverse($params); + /* Remove module and method. */ + unset($params[$this->config->moduleVar]); // $params = array('f' => 'browse', 'mode' => 'search', 'label' => 1); + unset($params[$this->config->methodVar]); // $params = array('mode' => 'search', 'label' => 1); + + $params = array_reverse($params); // $params = array('label' => 1, 'mode' => 'search'); /* Prepend other params. */ - $params['module'] = $this->workflowModule; - $params[$this->config->methodVar] = $methodName; - $params[$this->config->moduleVar] = $moduleName; + $params['module'] = $this->rawModule; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module); + $params[$this->config->methodVar] = $methodName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse'); + $params[$this->config->moduleVar] = $moduleName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse', 'm' => 'flow'); - $params = array_reverse($params); + $params = array_reverse($params); // $params = array('m' => 'flow', 'f' => 'browse', 'module' => $module, 'mode' => 'search', 'label' => 1); - $this->URI = $path . '?' . http_build_query($params); + $this->URI = $path . '?' . http_build_query($params); // $this->URI = '/index.php?m=flow&f=browse&module=$module&mode=search&label=1'; } } @@ -392,10 +434,9 @@ class router extends baseRouter } /** - * 合并请求的参数和默认参数,这样就可以省略已经有默认值的参数了。 - * Merge the params passed in and the default params. Thus the params which have default values needn't pass value, just like a function. - * - * Extension: If the workflowmodule and workflowmethod is not empty, reset the passed params. + * 如果$this->rawModule和$this->rawMethod的值不为空,说明这个请求需要工作流引擎来处理,则要根据工作流引擎的需要重新设置参数。 + * If the values of $this->rawModule and $this->rawMethod are not empty, indicating that the request needs to be processed + * by the workflow engine, the parameters are reset according to the needs of the workflow engine. * * @param array $defaultParams the default params defined by the method. * @param array $passedParams the params passed in through url. @@ -404,20 +445,25 @@ class router extends baseRouter */ public function mergeParams($defaultParams, $passedParams) { - /* If the workflowmodule and workflowmethod is not empty, reset the passed params. */ - if($this->workflowModule && $this->workflowMethod) + /* If the rawModule and rawMethod is not empty, reset the passed params. */ + if($this->rawModule && $this->rawMethod) { $passedParams = array_reverse($passedParams); - if(!in_array($this->workflowMethod, $this->config->workflowaction->default->actions)) - { - $passedParams['action'] = $this->workflowMethod; - } - $passedParams['module'] = $this->workflowModule; + + /* 如果请求的方法名不是browse、create、edit、view、delete、export中的任何一个,则需要添加action参数来传递请求的方法名。 */ + /* If the requested method name is not any of browse, create, edit, view, delete, or export, you need to add an action parameter to pass the requested method name. */ + if(!in_array($this->rawMethod, $this->config->workflowaction->default->actions)) $passedParams['action'] = $this->rawMethod; + /* 添加module参数来传递请求的模块名。 */ + /* Add the module parameter to pass the requested module name. */ + $passedParams['module'] = $this->rawModule; $passedParams = array_reverse($passedParams); } + /* display参数用来标记请求是否来自禅道客户端的卡片展示页面,此处应该删掉以避免对方法调用产生影响。 */ + /* The display parameter is used to mark whether the request comes from the card display page of the ZenTao client. It should be deleted here to avoid affecting the method call. */ unset($passedParams['display']); + return parent::mergeParams($defaultParams, $passedParams); } } diff --git a/lib/pager/pager.class.php b/lib/pager/pager.class.php index 09493b48a6..ce2a0cbe5b 100644 --- a/lib/pager/pager.class.php +++ b/lib/pager/pager.class.php @@ -29,9 +29,11 @@ class pager extends basePager */ public function setModuleName() { - if(isset($this->app->workflowModule)) + /* 如果设置了请求的原始模块名,则把其赋值给$this->moduleName。*/ + /* If the original module name of the request is set, assign it to $this->moduleName. */ + if(isset($this->app->rawModule)) { - $this->moduleName = $this->app->workflowModule; + $this->moduleName = $this->app->rawModule; } else { @@ -48,9 +50,11 @@ class pager extends basePager */ public function setMethodName() { - if(isset($this->app->workflowMethod)) + /* 如果设置了请求的原始方法名,则把其赋值给$this->methodName。*/ + /* If the original method name of the request is set, assign it to $this->methodName. */ + if(isset($this->app->rawMethod)) { - $this->methodName = $this->app->workflowMethod; + $this->methodName = $this->app->rawMethod; } else { @@ -59,19 +63,19 @@ class pager extends basePager } /** - * 从请求网址中获取记录总数、每页记录数、页码。 - * Get recTotal, recPerpage, pageID from the request params, and add them to params. - * + * 如果设置了请求的原始模块名和方法名,则去掉module参数,以便分页功能生成原始请求的URL而不是转换后的工作流URL。 + * If the original module name and method name of the request are set, the module parameter is removed so that + * the paging function generates the URL of the original request instead of the converted workflow URL. + * * @access public * @return void */ public function setParams() { parent::setParams(); - if(isset($this->app->workflowModule) && isset($this->app->workflowMethod)) - { - unset($this->params['module']); - } + + /* If the original module name and method name of the request are set, the module parameter is removed. */ + if(isset($this->app->rawModule) && isset($this->app->rawMethod)) unset($this->params['module']); } /** diff --git a/module/action/model.php b/module/action/model.php index 6110f54b6f..998dd55c7b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1052,7 +1052,7 @@ class actionModel extends model foreach($actions as $action) { $timeStamp = strtotime(isset($action->originalDate) ? $action->originalDate : $action->date); - $date = common::checkEnLang() ? date('M d', $timeStamp) : date(DT_DATE4, $timeStamp); + $date = common::checkNotCN() ? date('M d', $timeStamp) : date(DT_DATE4, $timeStamp); $action->time = date(DT_TIME2, $timeStamp); $dateGroup[$date][] = $action; } diff --git a/module/admin/view/safe.html.php b/module/admin/view/safe.html.php index fc653021d2..bf41720402 100644 --- a/module/admin/view/safe.html.php +++ b/module/admin/view/safe.html.php @@ -22,7 +22,7 @@
- + diff --git a/module/backup/view/index.html.php b/module/backup/view/index.html.php index 0342d9137e..4e040d5cd9 100644 --- a/module/backup/view/index.html.php +++ b/module/backup/view/index.html.php @@ -36,7 +36,7 @@ - + diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index cbf39a4bce..4637747c69 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -20,7 +20,7 @@ - + diff --git a/module/block/view/todoblock.html.php b/module/block/view/todoblock.html.php index 3a37fb83d9..56da2fa3e2 100644 --- a/module/block/view/todoblock.html.php +++ b/module/block/view/todoblock.html.php @@ -41,7 +41,7 @@ if(!$selfCall) die(include('./todolist.html.php')); '>

todo->create;?>

- +
diff --git a/module/branch/model.php b/module/branch/model.php index 2b5673fa27..238ab82aa5 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -46,7 +46,7 @@ class branchModel extends model $product = $this->loadModel('product')->getById($productID); if(!$product or $product->type == 'normal') return array(); - $space = common::checkEnLang() ? ' ' : ''; + $space = common::checkNotCN() ? ' ' : ''; $branches = array('0' => $this->lang->branch->all . $space . $this->lang->product->branchName[$product->type]) + $branches; } return $branches; @@ -107,7 +107,7 @@ class branchModel extends model } } - $space = common::checkEnLang() ? ' ' : ''; + $space = common::checkNotCN() ? ' ' : ''; foreach($products as $product) { if($product->type == 'normal') continue; diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 7171f01633..7453a89eb2 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -116,7 +116,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow ?> - + " . $lang->bug->batchCreate, '', "class='btn btn-secondary'"); if(commonModel::isTutorialMode()) @@ -208,9 +208,9 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow { if($value->show) { - if(common::checkEnLang() and $value->id == 'severity') $value->name = $lang->bug->severity; - if(common::checkEnLang() and $value->id == 'pri') $value->name = $lang->bug->pri; - if(common::checkEnLang() and $value->id == 'confirmed') $value->name = $lang->bug->confirmed; + if(common::checkNotCN() and $value->id == 'severity') $value->name = $lang->bug->severity; + if(common::checkNotCN() and $value->id == 'pri') $value->name = $lang->bug->pri; + if(common::checkNotCN() and $value->id == 'confirmed') $value->name = $lang->bug->confirmed; $this->datatable->printHead($value, $orderBy, $vars); $columns ++; } diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 0f31932abe..f4e9e45967 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -212,7 +212,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
admin->safe->password?> admin->safe->modeList, isset($config->safe->mode) ? $config->safe->mode : 0, "onclick=showModeRule(this.value)")?> admin->safe->noticeMode?>backup->time?> backup->files?> backup->size?> actions?>
project->name;?> project->end;?> statusAB;?> project->totalEstimate;?> project->totalConsumed;?>
- + @@ -266,7 +266,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
bug->openedBy;?> openedBy];?>
- + diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index 82c53c74fd..8060c52013 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -32,7 +32,7 @@ js::set('productID' , $bug->product);
bug->linkBug;?> createLink('bug', 'linkBugs', "bugID=$bug->id", '', true), $lang->bug->linkBugs, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");?>
- + diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index b18b043245..7b11f510b8 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -102,7 +102,7 @@
- +
bug->resolution;?> bug->resolutionList, '', "class='form-control chosen' onchange=setDuplicate(this.value)");?>
@@ -271,7 +271,7 @@
- +
diff --git a/module/common/model.php b/module/common/model.php index 9f63cd4a6b..b0af0b2c0e 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1726,13 +1726,13 @@ EOD; } /** - * Check English Lang. + * Check Not CN Lang. * * @static * @access public * @return bool */ - public static function checkEnLang() + public static function checkNotCN() { global $app; return strpos('|zh-cn|zh-tw|', '|' . $app->getClientLang() . '|') === false; diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index 7abb8f5025..b9c9aa75ce 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -40,7 +40,7 @@ $actions):?>
- + diff --git a/module/custom/view/required.html.php b/module/custom/view/required.html.php index 7146bd2fdd..8c4ecb30c1 100644 --- a/module/custom/view/required.html.php +++ b/module/custom/view/required.html.php @@ -33,7 +33,7 @@
company->name;?> name, "class='form-control'");?>
- + $requiredField):?> diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index 95bca4a0a4..686963ac20 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -54,7 +54,7 @@ EOT;
- + diff --git a/module/dept/view/edit.html.php b/module/dept/view/edit.html.php index 979542ecd0..47336fe9fa 100644 --- a/module/dept/view/edit.html.php +++ b/module/dept/view/edit.html.php @@ -23,7 +23,7 @@ $jsRoot = $webRoot . "js/";
custom->storyReview;?> custom->reviewList, $needReview);?>
- + diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index fdebc613ae..5260240b8a 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -125,7 +125,7 @@
-
project->undone . (common::checkEnLang() ? ' ' : '') . (common::checkEnLang() ? "{$lang->projectCommon}s" : "$lang->projectCommon");?>
+
project->undone . (common::checkNotCN() ? ' ' : '') . (common::checkNotCN() ? "{$lang->projectCommon}s" : "$lang->projectCommon");?>
diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index 78e0f727e0..d2426215b9 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -12,7 +12,7 @@ if($this->methodName != 'browse') $moduleID = ''; } if(empty($type)) $type = 'product'; -$sideWidth = common::checkEnLang() ? '270' : '238'; +$sideWidth = common::checkNotCN() ? '270' : '238'; ?>
diff --git a/module/group/view/manageview.html.php b/module/group/view/manageview.html.php index c31b8e3dd9..99bf7c52bf 100644 --- a/module/group/view/manageview.html.php +++ b/module/group/view/manageview.html.php @@ -21,7 +21,7 @@
dept->parent;?> parent, "class='form-control chosen'");?>
- + '> - +
group->viewList;?> menu as $menuKey => $menu):?> diff --git a/module/group/view/privbygroup.html.php b/module/group/view/privbygroup.html.php index 56f0a454be..237a6bca79 100644 --- a/module/group/view/privbygroup.html.php +++ b/module/group/view/privbygroup.html.php @@ -26,7 +26,7 @@
my->common;?>
@@ -73,7 +73,7 @@ - + @@ -98,7 +98,7 @@ } ?> '> - +
group->module;?> group->method;?>
diff --git a/module/mail/view/index.html.php b/module/mail/view/index.html.php index 42c0761a0c..39acf727ec 100755 --- a/module/mail/view/index.html.php +++ b/module/mail/view/index.html.php @@ -21,7 +21,7 @@
- + mail->ztCloud, '', "class='btn w-120px'")?> diff --git a/module/message/css/setting.css b/module/message/css/setting.css index 9279a6ca13..e4fcb9af50 100644 --- a/module/message/css/setting.css +++ b/module/message/css/setting.css @@ -1,6 +1,6 @@ .checkbox-primary + .checkbox-primary {margin:0px;} .checkbox-primary {margin:0px; margin-right:10px !important; width:120px;display:inline-block} -.checkbox-primary label{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;} +.checkbox-primary label{white-space:nowrap; overflow:visible; text-overflow:ellipsis;} div.chosen-container + select + div.chosen-container > .chosen-choices {border-top:0px;} .table-bordered thead .checkbox-primary{width:200px;} diff --git a/module/message/model.php b/module/message/model.php index 2ac554a8f9..693328dbe4 100644 --- a/module/message/model.php +++ b/module/message/model.php @@ -123,7 +123,7 @@ class messageModel extends model if($toList == $this->app->user->account) return false; $moduleName = $objectType == 'case' ? 'testcase' : $objectType; - $space = common::checkEnLang() ? ' ' : ''; + $space = common::checkNotCN() ? ' ' : ''; $data = $this->app->user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType]; $data .= ' ' . html::a(helper::createLink($moduleName, 'view', "id=$objectID"), "[#{$objectID}::{$object->$field}]"); diff --git a/module/misc/view/changelog.html.php b/module/misc/view/changelog.html.php index 9a0d9c68df..efd3275072 100644 --- a/module/misc/view/changelog.html.php +++ b/module/misc/view/changelog.html.php @@ -28,7 +28,7 @@ - +
misc->feature->detailed;?>
diff --git a/module/my/view/changepassword.html.php b/module/my/view/changepassword.html.php index e9f57df1e7..77c77b9399 100755 --- a/module/my/view/changepassword.html.php +++ b/module/my/view/changepassword.html.php @@ -22,7 +22,7 @@
- + diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 1524ef79a8..08a961202e 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -84,7 +84,7 @@ ?> - + createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), " {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?> $actions):?>
-
year) : '');?>
+
year) : '');?>
product->iterationInfo, count($groupRoadmaps, 1) - count($groupRoadmaps));?>
diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 4d922a3a63..d0b2dab052 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -200,7 +200,7 @@
user->account;?> account . html::hidden('account',$user->account);?>
- + diff --git a/module/project/control.php b/module/project/control.php index 4c4ba81e6e..c5156ad056 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -902,7 +902,7 @@ class project extends control $chartData = $this->project->buildBurnData($projectID, $dateList, $type); /* Set a space when assemble the string for english. */ - $space = common::checkEnLang() ? ' ' : ''; + $space = common::checkNotCN() ? ' ' : ''; $dayList = array_fill(1, floor($project->days / $this->config->project->maxBurnDay) + 5, ''); foreach($dayList as $key => $val) $dayList[$key] = $this->lang->project->interval . $space . ($key + 1) . $space . $this->lang->day; diff --git a/module/project/view/all.html.php b/module/project/view/all.html.php index 8542e3235f..90c8cd7d90 100644 --- a/module/project/view/all.html.php +++ b/module/project/view/all.html.php @@ -40,7 +40,7 @@ - + diff --git a/module/project/view/burn.html.php b/module/project/view/burn.html.php index a44c4938b5..e4fc832057 100644 --- a/module/project/view/burn.html.php +++ b/module/project/view/burn.html.php @@ -27,7 +27,7 @@ echo $lang->project->howToUpdateBurn; ?> -
+
diff --git a/module/project/view/dynamic.html.php b/module/project/view/dynamic.html.php index e6c2eb8a35..66cf4d87b1 100755 --- a/module/project/view/dynamic.html.php +++ b/module/project/view/dynamic.html.php @@ -67,7 +67,7 @@ $actions):?> project = $projectID; ?> - + createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); diff --git a/module/project/view/treestory.html.php b/module/project/view/treestory.html.php index b4f00dcc42..f5df5df76d 100644 --- a/module/project/view/treestory.html.php +++ b/module/project/view/treestory.html.php @@ -196,7 +196,7 @@
story->statusList['active'] . $space . $lang->story->common;?> stories['active']?> project->name);?> project->code);?> project->PM);?> project->end);?> project->status);?>
- + global->flow != 'onlyStory'):?> diff --git a/module/report/view/bugassign.html.php b/module/report/view/bugassign.html.php index 6bc2dd6949..26f9a73bc9 100644 --- a/module/report/view/bugassign.html.php +++ b/module/report/view/bugassign.html.php @@ -4,7 +4,7 @@
- PRO  report->proVersionEn : $lang->report->proVersion; ?> + PRO  report->proVersionEn : $lang->report->proVersion; ?>
diff --git a/module/report/view/bugcreate.html.php b/module/report/view/bugcreate.html.php index 53e7292ed1..123bc907fd 100644 --- a/module/report/view/bugcreate.html.php +++ b/module/report/view/bugcreate.html.php @@ -5,7 +5,7 @@
- PRO  report->proVersionEn : $lang->report->proVersion; ?> + PRO  report->proVersionEn : $lang->report->proVersion; ?>
diff --git a/module/report/view/productsummary.html.php b/module/report/view/productsummary.html.php index 8822138ec1..a1d571d7d1 100644 --- a/module/report/view/productsummary.html.php +++ b/module/report/view/productsummary.html.php @@ -1,5 +1,5 @@ - +
@@ -7,7 +7,7 @@
- PRO  report->proVersionEn : $lang->report->proVersion; ?> + PRO  report->proVersionEn : $lang->report->proVersion; ?>
diff --git a/module/report/view/projectdeviation.html.php b/module/report/view/projectdeviation.html.php index 40ef7c9be4..dcb6b4a90a 100644 --- a/module/report/view/projectdeviation.html.php +++ b/module/report/view/projectdeviation.html.php @@ -6,7 +6,7 @@
- PRO  report->proVersionEn : $lang->report->proVersion; ?> + PRO  report->proVersionEn : $lang->report->proVersion; ?>
diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 28e77db34e..f627faf12f 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -5,7 +5,7 @@
- PRO  report->proVersionEn : $lang->report->proVersion; ?> + PRO  report->proVersionEn : $lang->report->proVersion; ?>
diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index b23e58def0..9b09f5e407 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -15,8 +15,8 @@ $jsRoot = $this->app->getWebRoot() . "js/"; include '../../common/view/datepicker.html.php'; include '../../common/view/chosen.html.php'; $formId = 'searchForm-' . uniqid(''); -$fieldWidth = common::checkEnLang() ? 'w-130px' : 'w-110px'; -$operatorWidth = common::checkEnLang() ? 'w-110px' : 'w-90px'; +$fieldWidth = common::checkNotCN() ? 'w-130px' : 'w-110px'; +$operatorWidth = common::checkNotCN() ? 'w-110px' : 'w-90px'; ?>
diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index a95ef0de5c..3fb5903ee9 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -67,7 +67,7 @@
story->legendBasicInfo;?>
- + - + diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index 5ffb7c0650..c86198a4bd 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -27,7 +27,7 @@ var assignedTo = 'lastEditedBy ? print($story->lastEditedBy) : pri
story->product;?>
@@ -210,7 +210,7 @@
>story->linkStories;?> createLink('story', 'linkStory', "storyID=$story->id&type=linkStories", '', true), $lang->story->linkStory, '', "data-toggle='modal' data-type='iframe' data-width='95%'");?>
- + diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 3ecd264244..aa10740f5f 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -232,7 +232,7 @@
story->reviewedDate;?>
- + @@ -314,7 +314,7 @@
- +
global->flow != 'onlyStory'):?> diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php index fe7f4312cd..8039ed1cb5 100644 --- a/module/story/view/zerocase.html.php +++ b/module/story/view/zerocase.html.php @@ -32,7 +32,7 @@ - + diff --git a/module/task/view/activate.html.php b/module/task/view/activate.html.php index 52c9ecd1ca..53c5018c63 100644 --- a/module/task/view/activate.html.php +++ b/module/task/view/activate.html.php @@ -27,7 +27,7 @@
priAB);?> story->title);?> story->planAB);?> story->source);?> openedByAB);?> assignedToAB);?>
- + diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index 09e99811e3..ef15ce34d9 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -20,7 +20,7 @@ task->confirmChangeProject);?> team) < 6 ? 6 - count($task->team) : 1);?> - +
@@ -177,7 +177,7 @@
task->legendLife;?>
- +
task->assignedTo;?> finishedBy, "class='form-control chosen'");?>
diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php index 651c97f211..fb3fa41dd9 100644 --- a/module/task/view/finish.html.php +++ b/module/task/view/finish.html.php @@ -35,7 +35,7 @@
>task->openedBy;?>
- + diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index bf5b3e2d3a..6b15993338 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -24,7 +24,7 @@ team);?> assignedTo != end($team)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?> task->noticeSaveRecord);?> - +
diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index c18e939064..2715f27be8 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -288,7 +288,7 @@
team) ? $lang->task->common . $lang->task->consumed : $lang->task->hasConsumed;?> consumed;?> workingHour;?>
- + @@ -344,7 +344,7 @@ task->legendEffort;?>
task->openedBy;?>
- + diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index 1dd2c5699a..647cdd2f01 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -119,7 +119,7 @@ - + testcase->legendBasicInfo;?>
- +
task->estimate;?> estimate . $lang->workingHour;?>
@@ -276,7 +276,7 @@
testcase->legendLinkBugs;?>
- +
fromBug):?> @@ -306,7 +306,7 @@
testcase->legendOpenAndEdit;?>
- +
diff --git a/module/todo/view/create.html.php b/module/todo/view/create.html.php index f86c9bb7de..7e4de03a36 100644 --- a/module/todo/view/create.html.php +++ b/module/todo/view/create.html.php @@ -22,7 +22,7 @@
testcase->openedBy;?>
- + diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php index 9dbfa6ee89..1b0fc626f4 100644 --- a/module/todo/view/edit.html.php +++ b/module/todo/view/edit.html.php @@ -13,7 +13,7 @@ - +
todo->date;?>
@@ -76,7 +76,7 @@
-
; padding-top:5px;'> +
; padding-top:5px;'> todo->beforeDays, html::input('config[beforeDays]', 0, "class='form-control'"));?>
- + @@ -137,7 +137,7 @@
todo->pri;?> pri;?>' title='todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri)?>
- + diff --git a/module/translate/control.php b/module/translate/control.php index 4d49efd32d..ec9374e2c2 100644 --- a/module/translate/control.php +++ b/module/translate/control.php @@ -259,7 +259,7 @@ class translate extends control { if($result == 'pass') { - $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('reviewed')->set('reviewer')->eq($this->app->user->account)->set('reviewTime')->eq(helper::now())->where('id')->eq($translationID)->exec(); + $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('reviewed')->set('reviewer')->eq($this->app->user->account)->set('reviewedTime')->eq(helper::now())->where('id')->eq($translationID)->exec(); die(js::reload()); } if($result == 'reject' and empty($_POST)) die($this->display()); @@ -267,7 +267,7 @@ class translate extends control { $data = fixer::input('post')->get(); if(empty($data->reason)) $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->error->notempty, $this->lang->translate->reason))); - $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('rejected')->set('reviewer')->eq($this->app->user->account)->set('reviewTime')->eq(helper::now())->set('reason')->eq($data->reason)->where('id')->eq($translationID)->exec(); + $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('rejected')->set('reviewer')->eq($this->app->user->account)->set('reviewedTime')->eq(helper::now())->set('reason')->eq($data->reason)->where('id')->eq($translationID)->exec(); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.reloadStatus($translationID)")); } } @@ -280,7 +280,7 @@ class translate extends control */ public function batchPass() { - $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('reviewed')->set('reviewer')->eq($this->app->user->account)->set('reviewTime')->eq(helper::now())->where('id')->in($this->post->idList)->exec(); + $this->dao->update(TABLE_TRANSLATION)->set('status')->eq('reviewed')->set('reviewer')->eq($this->app->user->account)->set('reviewedTime')->eq(helper::now())->where('id')->in($this->post->idList)->exec(); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } diff --git a/module/translate/model.php b/module/translate/model.php index cd96aa86b2..fc2b70e49f 100644 --- a/module/translate/model.php +++ b/module/translate/model.php @@ -71,11 +71,11 @@ class translateModel extends model $translation->module = $moduleName; $translation->key = $key; $translation->value = $value; - $translation->refer = htmlspecialchars($translation->value); + $translation->referer = htmlspecialchars($translation->value); $translation->status = 'waiting'; $translation->version = $this->config->version; $translation->translator = $this->app->user->account; - $translation->translationTime = $now; + $translation->translatedTime = $now; $translation->mode = $flow; $this->dao->replace(TABLE_TRANSLATION)->data($translation)->exec(); } @@ -354,10 +354,10 @@ class translateModel extends model if($dbItem->value != $value) { $translation->value = $value; - $translation->refer = $refer; + $translation->referer = $refer; $translation->status = 'translated'; $translation->translator = $this->app->user->account; - $translation->translationTime = $now; + $translation->translatedTime = $now; if($translation->reason) $translation->reason = ''; } elseif(!empty($_POST['values'][$i]) and strpos("waiting|changed", $translation->status) !== false) @@ -372,10 +372,10 @@ class translateModel extends model $translation->module = $module; $translation->key = $key; $translation->value = $value; - $translation->refer = $refer; + $translation->referer = $refer; $translation->status = 'translated'; $translation->translator = $this->app->user->account; - $translation->translationTime = $now; + $translation->translatedTime = $now; $translation->version = $this->config->version; $translation->mode = $flow; } @@ -435,8 +435,8 @@ class translateModel extends model { $translators[$translation->translator] = $translation->translator; $reviewers[$translation->reviewer] = $translation->reviewer; - if(empty($lastReviewTime)) $lastReviewTime = $translation->reviewTime; - if($lastReviewTime < $translation->reviewTime) $lastReviewTime = $translation->reviewTime; + if(empty($lastReviewTime)) $lastReviewTime = $translation->reviewedTime; + if($lastReviewTime < $translation->reviewedTime) $lastReviewTime = $translation->reviewedTime; } } @@ -697,10 +697,10 @@ class translateModel extends model $translation->module = $moduleName; $translation->key = $langKey; $translation->value = $langValue; - $translation->refer = htmlspecialchars($langValue); + $translation->referer = htmlspecialchars($langValue); $translation->status = 'waiting'; $translation->translator = $this->app->user->account; - $translation->translationTime = helper::now(); + $translation->translatedTime = helper::now(); $translation->version = $version; $translation->mode = $flow; $this->dao->replace(TABLE_TRANSLATION)->data($translation)->exec(); @@ -709,13 +709,13 @@ class translateModel extends model { if(!isset($translateIdList[$translation->id])) continue; $specialedValue = htmlspecialchars($langValue); - if($specialedValue == $translation->refer) + if($specialedValue == $translation->referer) { $this->dao->update(TABLE_TRANSLATION)->set('version')->eq($version)->where('id')->eq($translation->id)->exec(); } - elseif($specialedValue != $translation->refer) + elseif($specialedValue != $translation->referer) { - $this->dao->update(TABLE_TRANSLATION)->set('version')->eq($version)->set('status')->eq('changed')->set('refer')->eq($specialedValue)->where('id')->eq($translation->id)->exec(); + $this->dao->update(TABLE_TRANSLATION)->set('version')->eq($version)->set('status')->eq('changed')->set('referer')->eq($specialedValue)->where('id')->eq($translation->id)->exec(); } unset($translateIdList[$translation->id]); } diff --git a/module/translate/view/choosemodule.html.php b/module/translate/view/choosemodule.html.php index 1384b4e9f6..1001866d7a 100644 --- a/module/translate/view/choosemodule.html.php +++ b/module/translate/view/choosemodule.html.php @@ -33,7 +33,7 @@ translate->needReview):?> - + diff --git a/module/translate/view/index.html.php b/module/translate/view/index.html.php index b0fa00658c..7aaf8ec116 100644 --- a/module/translate/view/index.html.php +++ b/module/translate/view/index.html.php @@ -48,7 +48,7 @@ -
todo->beginAndEnd?> config->begin . " ~ " . $todo->config->end;?>
translate->reviewedProgress;?> '>actions;?>'>actions;?>
name;?> translate->progress, ($data->progress * 100) . '%');?>'> + '> translate->common, '', "class='btn btn-sm $disabled'"); echo html::a(inlink('export', "language=$langKey"), $lang->export, '', "class='btn btn-sm iframe $disabled'"); diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 7b84a861ac..5b489ad577 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -23,7 +23,7 @@ js::set('type', $type);