diff --git a/module/bug/control.php b/module/bug/control.php index 6d7d0d8ae2..bd8750599c 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -112,7 +112,6 @@ class bug extends control $bugs = $this->bug->processBuildForBugs($bugs); /* Build the search form. */ - $this->config->bug->search['style'] = 'shortcut'; $actionURL = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID"); $this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL); $this->loadModel('search')->mergeFeatureBar('bug', 'browse'); @@ -1118,14 +1117,7 @@ class bug extends control public function saveTemplate() { $this->bug->saveUserBugTemplate(); - if(dao::isError()) - { - $error = js::error(dao::getError()); - /* Remove html and meta tag and only get script */ - $error = substr($error, strpos($error, ' +global->novice) and $this->loadModel('tutorial')->checkNovice()):?> + + app->user->account; $fields = $this->post->fields; diff --git a/module/custom/model.php b/module/custom/model.php index 4fadb8cb8d..8604e908d8 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -17,7 +17,7 @@ class customModel extends model * @access public * @return array */ - public function getAll() + public function getAllLang() { $allCustomLang = $this->dao->select('*')->from(TABLE_LANG)->orderBy('lang,id')->fetchAll('id'); @@ -71,7 +71,7 @@ class customModel extends model */ public function getItems($paramString) { - return $this->createDAO($this->parseItemParam($paramString), 'select')->orderBy('lang,id')->fetchAll('key'); + return $this->prepareSQL($this->parseItemParam($paramString), 'select')->orderBy('lang,id')->fetchAll('key'); } /** @@ -83,7 +83,7 @@ class customModel extends model */ public function deleteItems($paramString) { - $this->createDAO($this->parseItemParam($paramString), 'delete')->exec(); + $this->prepareSQL($this->parseItemParam($paramString), 'delete')->exec(); } /** @@ -114,7 +114,7 @@ class customModel extends model * @access public * @return object */ - public function createDAO($params, $method = 'select') + public function prepareSQL($params, $method = 'select') { return $this->dao->$method('*')->from(TABLE_LANG)->where('1 = 1') ->beginIF($params['lang'])->andWhere('lang')->in($params['lang'])->fi() @@ -164,7 +164,7 @@ class customModel extends model } } } - else if(is_array($menuConfig)) + elseif(is_array($menuConfig)) { foreach($menuConfig as $menuConfigItem) { @@ -219,6 +219,7 @@ class customModel extends model } $hidden = !$fixed && $isSetMenuConfig && isset($menuConfigMap[$name]) && isset($menuConfigMap[$name]->hidden) && $menuConfigMap[$name]->hidden; + if(strpos($name, 'QUERY') === 0 and !isset($menuConfigMap[$name])) $hidden = true; $menuItem = new stdclass(); $menuItem->name = $name; @@ -293,7 +294,8 @@ class customModel extends model $menuConfig = ''; if(!commonModel::isTutorialMode() && isset($config->menucustom->$configKey)) $menuConfig = $config->menucustom->$configKey; if(!empty($menuConfig) && is_string($menuConfig)) $menuConfig = json_decode($menuConfig); - return $allMenu ? self::buildMenuConfig($allMenu, $menuConfig) : null; + $menu = $allMenu ? self::buildMenuConfig($allMenu, $menuConfig) : null; + return $menu; } /** diff --git a/module/file/control.php b/module/file/control.php index 241bbd01ac..f88f749758 100644 --- a/module/file/control.php +++ b/module/file/control.php @@ -359,9 +359,9 @@ class file extends control * @access public * @return void */ - public function buildExportTpl($module, $templateID = 0) + public function buildExportTPL($module, $templateID = 0) { - $templates = $this->file->getExportTpl($module); + $templates = $this->file->getExportTemplate($module); $templatePairs[] = ''; foreach($templates as $template) $templatePairs[$template->id] = ($template->public ? "[{$this->lang->public}] " : '') . $template->title; @@ -383,15 +383,10 @@ class file extends control $templateID = $this->file->saveExportTemplate($module); if(dao::isError()) { - $error = js::error(dao::getError()); - /* Remove html and meta tag and only get script */ - $error = substr($error, strpos($error, ' diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index d955c01809..d676ec37e0 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -114,7 +114,7 @@ foreach(explode(',', $showFields) as $field) -createLink('custom', 'ajaxSaveCustom', 'module=story§ion=custom&key=batchCreateFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?> diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 3d28812966..6db49de532 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -108,6 +108,6 @@ foreach(explode(',', $showFields) as $field) -createLink('custom', 'ajaxSaveCustom', 'module=story§ion=custom&key=batchEditFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchEditFields')?> diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index 105123e181..4b27ee1c4f 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -177,7 +177,7 @@ -createLink('custom', 'ajaxSaveCustom', 'module=story§ion=custom&key=createFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=createFields')?> story->module);?> diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index d282f7ee19..c3280b93c6 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -118,7 +118,7 @@ foreach(explode(',', $showFields) as $field) task->ditto);?> -createLink('custom', 'ajaxSaveCustom', 'module=task§ion=custom&key=batchCreateFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields')?> diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index 52825b85a3..93c85d9ecd 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -95,6 +95,6 @@ foreach(explode(',', $showFields) as $field) -createLink('custom', 'ajaxSaveCustom', 'module=task§ion=custom&key=batchEditFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchEditFields')?> diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index ffeba0c4b6..58ce1e728c 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -154,6 +154,6 @@ -createLink('custom', 'ajaxSaveCustom', 'module=task§ion=custom&key=createFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=createFields')?> diff --git a/module/testcase/control.php b/module/testcase/control.php index a28b8def44..4d2e459fc8 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -102,7 +102,6 @@ class testcase extends control $cases = $this->loadModel('story')->checkNeedConfirm($cases); /* Build the search form. */ - $this->config->testcase->search['style'] = 'shortcut'; $actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID"); $this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL); $this->loadModel('search')->mergeFeatureBar('testcase', 'browse'); diff --git a/module/testcase/view/batchcreate.html.php b/module/testcase/view/batchcreate.html.php index d8d18b55f6..9fbb84b672 100644 --- a/module/testcase/view/batchcreate.html.php +++ b/module/testcase/view/batchcreate.html.php @@ -95,7 +95,7 @@ foreach(explode(',', $showFields) as $field) -createLink('custom', 'ajaxSaveCustom', 'module=testcase§ion=custom&key=batchCreateFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=batchCreateFields')?> diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php index 4999606320..063deef2ca 100644 --- a/module/testcase/view/batchedit.html.php +++ b/module/testcase/view/batchedit.html.php @@ -75,6 +75,6 @@ foreach(explode(',', $showFields) as $field) -createLink('custom', 'ajaxSaveCustom', 'module=testcase§ion=custom&key=batchEditFields')?> +createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=batchEditFields')?> diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 18c57c3c94..6bd1018044 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -180,7 +180,7 @@ -createLink('custom', 'ajaxSaveCustom', 'module=testcase§ion=custom&key=createFields');?> +createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=createFields');?> testcase->module)?> diff --git a/module/testtask/control.php b/module/testtask/control.php index 88c7de686e..a7882f6f48 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -262,7 +262,6 @@ class testtask extends control /* Build the search form. */ $this->loadModel('testcase'); - $this->config->testcase->search['style'] = 'shortcut'; $this->config->testcase->search['module'] = 'testtask'; $this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct); $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index c223e9d842..e0f4557527 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -103,8 +103,3 @@ $lang->testtask->action = new stdclass(); $lang->testtask->action->testtaskopened = '$date, 由 $actor opened test task. $extra。' . "\n"; $lang->testtask->action->testtaskstarted = '$date, 由 $actor started test task. $extra。' . "\n"; $lang->testtask->action->testtaskclosed = '$date, 由 $actor finished test task. $extra。' . "\n"; - -$lang->testtask->featurebar['cases']['all'] = $lang->testtask->allCases; -$lang->testtask->featurebar['cases']['assignedtome'] = $lang->testtask->assignedToMe; -$lang->testtask->featurebar['cases']['group'] = ''; -$lang->testtask->featurebar['groupcase'] = $lang->testtask->featurebar['cases']; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 7045f9bd12..b07da7ee4d 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -103,8 +103,3 @@ $lang->testtask->action = new stdclass(); $lang->testtask->action->testtaskopened = '$date, 由 $actor 创建版本 $extra。' . "\n"; $lang->testtask->action->testtaskstarted = '$date, 由 $actor 启动版本 $extra。' . "\n"; $lang->testtask->action->testtaskclosed = '$date, 由 $actor 完成版本 $extra。' . "\n"; - -$lang->testtask->featurebar['cases']['all'] = $lang->testtask->allCases; -$lang->testtask->featurebar['cases']['assignedtome'] = $lang->testtask->assignedToMe; -$lang->testtask->featurebar['cases']['group'] = ''; -$lang->testtask->featurebar['groupcase'] = $lang->testtask->featurebar['cases']; diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php index 6309753544..80623ee4c3 100644 --- a/module/testtask/view/caseheader.html.php +++ b/module/testtask/view/caseheader.html.php @@ -20,20 +20,11 @@ $hasCasesPriv = common::hasPriv('testtask', 'cases'); $hasGroupPriv = common::hasPriv('testtask', 'groupcase'); ?> - moduleName, $this->methodName) as $menuItem):?> hidden)) continue; - $type = $menuItem->name; - if($hasCasesPriv and strpos($type, 'QUERY') === 0) - { - $queryID = (int)substr($type, 5); - echo "