diff --git a/module/admin/config.php b/module/admin/config.php index f86f03b0f5..eaec7e702a 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -57,6 +57,7 @@ $config->admin->plugIns[30]->viewLink = 'https://www.zentao.net/extension-viewEx $config->admin->apiRoot = 'https://www.zentao.net/'; $config->admin->classURL = 'https://www.zentao.net/publicclass.html'; $config->admin->extensionURL = 'https://www.zentao.net/extension-browse.html'; +$config->admin->liteMenuList = array('system', 'user', 'feature', 'message', 'extension', 'dev'); $config->admin->helpURL['system'] = 'https://www.zentao.net/book/zentaopms/538.html'; $config->admin->helpURL['user'] = 'https://www.zentao.net/book/zentaopms/538.html'; diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 5f7dba20ba..368e916c06 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -16,6 +16,7 @@ .settings-list > .setting-box.btn[disabled] > a {pointer-events: none;} .settings-list > .setting-box > h4 > img {padding-right: 10px; padding-bottom: 3px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} +.settings-list.lite-setting > .setting-box {flex: 1 1 30%;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px;} diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index e4a13779bc..1ddd50ad48 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -120,16 +120,6 @@ $lang->admin->menuList->dev['menuOrder']['10'] = 'db'; $lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; $lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; -if($config->vision == 'lite') -{ - unset($lang->admin->menuList->system['subMenu']['mode']); - unset($lang->admin->menuList->system['subMenu']['buildindex']); - unset($lang->admin->menuList->system['subMenu']['tableengine']); - unset($lang->admin->menuList->system['menuOrder']['5']); - unset($lang->admin->menuList->system['menuOrder']['45']); - unset($lang->admin->menuList->system['menuOrder']['50']); -} - if($config->edition != 'max') unset($lang->admin->menuList->model['subMenu']['scrum']); if(!helper::hasFeature('waterfall')) { @@ -147,3 +137,23 @@ if($config->edition == 'max' and !helper::hasFeature('scrum_auditplan')) unset($lang->admin->menuList->model['subMenu']['scrum']); } } + +if($config->vision == 'lite') +{ + unset($lang->admin->menuList->system['subMenu']['mode']); + unset($lang->admin->menuList->system['subMenu']['buildindex']); + unset($lang->admin->menuList->system['subMenu']['tableengine']); + unset($lang->admin->menuList->system['menuOrder']['5']); + unset($lang->admin->menuList->system['menuOrder']['45']); + unset($lang->admin->menuList->system['menuOrder']['50']); + + unset($lang->admin->menuList->model['subMenu']['scrum']); + unset($lang->admin->menuList->model['subMenu']['waterfall']); + unset($lang->admin->menuList->model['menuOrder']['10']); + unset($lang->admin->menuList->model['menuOrder']['15']); + + unset($lang->admin->menuList->feature['subMenu']['execution']); + unset($lang->admin->menuList->feature['subMenu']['qa']); + unset($lang->admin->menuList->feature['menuOrder']['15']); + unset($lang->admin->menuList->feature['menuOrder']['20']); +} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 0d7b351362..10721b69d9 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -16,8 +16,9 @@
admin->setting?>
-
+
admin->menuList as $menuKey => $menu):?> + vision == 'lite' and !in_array($menuKey, $config->admin->liteMenuList)) continue;?>
-
+ diff --git a/module/backup/control.php b/module/backup/control.php index 26713a2d5e..9d4576c6c2 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -93,12 +93,12 @@ class backup extends control $backFileName = "{$this->backupPath}{$fileName}.sql"; if(!$nosafe) $backFileName .= '.php'; $result = $this->backup->backSQL($backFileName); + if(!$result->result) { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->noWritable, $this->backupPath)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->noWritable, $this->backupPath)); } else { @@ -112,12 +112,12 @@ class backup extends control $backFileName = "{$this->backupPath}{$fileName}.file"; $result = $this->backup->backFile($backFileName); + if(!$result->result) { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->backupFile, $result->error)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->backupFile, $result->error)); } else { @@ -132,8 +132,7 @@ class backup extends control { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->backupCode, $result->error)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->backupCode, $result->error)); } else { @@ -164,7 +163,7 @@ class backup extends control } } - if($reload == 'yes') return print(js::reload('parent')); + if($reload == 'yes') return print($this->lang->backup->success->backup); echo $this->lang->backup->success->backup . "\n"; } diff --git a/module/backup/js/index.js b/module/backup/js/index.js index 4fc094c196..6a46f3dd21 100644 --- a/module/backup/js/index.js +++ b/module/backup/js/index.js @@ -2,9 +2,32 @@ $(function() { $('.backup').click(function() { + var timeID = null; + + $.ajax({ + url: $(this).attr('data-link'), + success: function(data) + { + clearInterval(timeID); + + $('#waitting .modal-body #message').append(data); + + setTimeout(function(){return location.reload();}, 2000); + }, + error: function(request, textstatus, error) + { + clearInterval(timeID); + + if(textstatus == 'timeout') $('#waitting .modal-body #message').append("

" + backupTimeout + '

'); + + setTimeout(function(){return location.reload();}, 2000); + } + }); + $('#waitting .modal-body #backupType').html(backup); $('#waitting').modal('show'); - setInterval(function() + + timeID = setInterval(function() { $.get(createLink('backup', 'ajaxGetProgress'), function(data) { @@ -12,6 +35,7 @@ $(function() }); }, 1000); }) + $('.rmPHPHeader').click(function() { $('#waitting .modal-body #backupType').html(rmPHPHeader); diff --git a/module/backup/lang/de.php b/module/backup/lang/de.php index d4078fad1c..4b57e619bb 100644 --- a/module/backup/lang/de.php +++ b/module/backup/lang/de.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Datenbankwiederherstellung fehlgeschlagen. $lang->backup->error->restoreFile = "Dateiwiederherstellung fehlgeschlagen. Error: %s."; $lang->backup->error->backupFile = "Dateibackup fehlgeschlagen. Error: %s."; $lang->backup->error->backupCode = "Codebackup fehlgeschlagen. Error: %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/en.php b/module/backup/lang/en.php index 2b5109c58b..5a07230909 100644 --- a/module/backup/lang/en.php +++ b/module/backup/lang/en.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Failed to restore the database library. Err $lang->backup->error->restoreFile = "Failed to restore the file. Error %s."; $lang->backup->error->backupFile = "Failed to back up the file. Error %s."; $lang->backup->error->backupCode = "Failed to back up the code. Error %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/fr.php b/module/backup/lang/fr.php index 2bcc5e5581..9c46497f40 100644 --- a/module/backup/lang/fr.php +++ b/module/backup/lang/fr.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Echec pour restaurer la database library. E $lang->backup->error->restoreFile = "Echec pour restaurer le fichier. Erreur %s."; $lang->backup->error->backupFile = "Echec pour sauvegarder le fichier. Erreur %s."; $lang->backup->error->backupCode = "Echec pour sauvegarder le code. Erreur %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/zh-cn.php b/module/backup/lang/zh-cn.php index f47c2a1137..d75db5bfca 100644 --- a/module/backup/lang/zh-cn.php +++ b/module/backup/lang/zh-cn.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "数据库还原失败,错误:%s"; $lang->backup->error->restoreFile = "附件还原失败,错误:%s"; $lang->backup->error->backupFile = "附件备份失败,错误:%s"; $lang->backup->error->backupCode = "代码备份失败,错误:%s"; +$lang->backup->error->timeout = "备份超时"; diff --git a/module/backup/view/index.html.php b/module/backup/view/index.html.php index 4a642163ff..43bc042b3a 100644 --- a/module/backup/view/index.html.php +++ b/module/backup/view/index.html.php @@ -27,7 +27,13 @@
" . $lang->backup->setting, '', "data-width='500' class='iframe btn btn-primary'");?> - " . $lang->backup->backup, 'hiddenwin', "class='btn btn-primary backup'");?> + " . $lang->backup->backup, "data-link='{$backupLink}'", 'btn btn-primary backup'); + } + ?>
@@ -114,4 +120,5 @@ backup->rmPHPHeader);?> backup->confirmRestore);?> backup->restore);?> +backup->error->timeout);?> diff --git a/module/doc/control.php b/module/doc/control.php index 9316978bdd..48de070f6a 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -541,7 +541,7 @@ class doc extends control $this->view->doc = $doc; $this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0); $this->view->type = $type; - $this->view->libs = $this->doc->getLibs('all', $extra = 'withObject|noBook', $libID, $objectID); + $this->view->libs = $this->doc->getLibs('all', 'withObject', $libID, $objectID, 'book'); $this->view->lib = $lib; $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users); diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 959518bd0f..477a72a53b 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -296,7 +296,7 @@ $(function() { var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false}); - //simplemde.value(String(markdownText)); + simplemde.value(String(markdownText)); simplemde.togglePreview(); $('#content .CodeMirror .editor-preview a').attr('target', '_blank'); diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 9b7090080f..5f3c5be6a7 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -249,7 +249,7 @@ js::set('docID', $doc->id); $(function() { var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false}); - //simplemde.value(String(markdownText)); + simplemde.value(String(markdownText)); simplemde.togglePreview(); $('#content .CodeMirror .editor-preview a').attr('target', '_blank'); diff --git a/module/group/control.php b/module/group/control.php index f44fccacb6..462bd14904 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -213,7 +213,7 @@ class group extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if($type == 'byGroup') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); - if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'window.parent.location.reload()')); + if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } if($type == 'byGroup') diff --git a/module/group/view/privbymodule.html.php b/module/group/view/privbymodule.html.php index d5ce653d8e..0bac3f2b30 100644 --- a/module/group/view/privbymodule.html.php +++ b/module/group/view/privbymodule.html.php @@ -18,7 +18,7 @@ - +
diff --git a/module/programplan/model.php b/module/programplan/model.php index cc18f4a942..a09996d7a6 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -324,14 +324,14 @@ class programplanModel extends model if($stage['planID'] == $task->execution) { $stageIndex[$index]['progress']['totalEstimate'] += $task->estimate; - $stageIndex[$index]['progress']['totalConsumed'] += $task->consumed; + $stageIndex[$index]['progress']['totalConsumed'] += $task->parent == '-1' ? 0 : $task->consumed; $stageIndex[$index]['progress']['totalReal'] += ($task->left + $task->consumed); $parent = $stage['parent']; if(isset($stageIndex[$parent])) { $stageIndex[$parent]['progress']['totalEstimate'] += $task->estimate; - $stageIndex[$parent]['progress']['totalConsumed'] += $task->consumed; + $stageIndex[$parent]['progress']['totalConsumed'] += $task->parent == '-1' ? 0 : $task->consumed; $stageIndex[$parent]['progress']['totalReal'] += ($task->left + $task->consumed); } } diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index e583097b6c..93526300db 100755 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -734,7 +734,7 @@ $(function() gantt.showDate(new Date()); // Show task in modal on click task - var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '80%'}); + var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%'}); gantt.attachEvent('onTaskClick', function(id, e) { if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false; diff --git a/module/project/model.php b/module/project/model.php index 2d5fedce17..be500760cc 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2274,13 +2274,15 @@ class projectModel extends model } break; case 'name': - $prefix = ''; - $suffix = ''; + $prefix = ''; + $suffix = ''; + $projectIcon = ''; if(isset($project->delay)) $suffix = "{$this->lang->project->statusList['delay']}"; $projectType = $project->model == 'scrum' ? 'sprint' : $project->model; if(!empty($suffix) or !empty($prefix)) echo '
'; if(!empty($prefix)) echo $prefix; - echo html::a($projectLink, " " . $project->name, '', "class='text-ellipsis text-primary'"); + if($this->config->vision == 'rnd') $projectIcon = " "; + echo html::a($projectLink, $projectIcon . $project->name, '', "class='text-ellipsis text-primary'"); if(!empty($suffix)) echo $suffix; if(!empty($suffix) or !empty($prefix)) echo '
'; break; diff --git a/module/projectrelease/view/create.html.php b/module/projectrelease/view/create.html.php index a06d0bb92d..b10d61636e 100644 --- a/module/projectrelease/view/create.html.php +++ b/module/projectrelease/view/create.html.php @@ -45,7 +45,7 @@ - + - + - - - - - - - - - + + + + + + + + +
group->module;?>
release->includedBuild;?>build->placeholder->multipleSelect}'");?>build->placeholder->multipleSelect}'");?>
diff --git a/module/release/view/create.html.php b/module/release/view/create.html.php index 5bc476e931..16570cafe0 100644 --- a/module/release/view/create.html.php +++ b/module/release/view/create.html.php @@ -33,7 +33,7 @@
release->includedBuild;?>build->placeholder->multipleSelect}'");?>build->placeholder->multipleSelect}'");?>
diff --git a/module/search/model.php b/module/search/model.php index 1021d77782..d3d4f9321a 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -675,13 +675,10 @@ class searchModel extends model $typeCount = $this->dao->select("objectType, count(*) as objectCount") ->from(TABLE_SEARCHINDEX) ->where('((vision')->eq($this->config->vision) - ->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi() + ->andWhere('objectType')->in($allowedObject) ->markRight(1) - ->beginIF(!empty($filterObject)) ->orWhere('(objectType')->in($filterObject) - ->markRight(1) - ->fi() - ->markRight(1) + ->markRight(2) ->andWhere('addedDate')->le(helper::now()) ->groupBy('objectType') ->fetchPairs('objectType', 'objectCount'); @@ -717,13 +714,10 @@ class searchModel extends model ->from(TABLE_SEARCHINDEX) ->where("(MATCH(title,content) AGAINST('{$againstCond}' IN BOOLEAN MODE) >= 1 {$likeCondition})") ->andWhere('((vision')->eq($this->config->vision) - ->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi() + ->andWhere('objectType')->in($allowedObject) ->markRight(1) - ->beginIF(!empty($filterObject)) ->orWhere('(objectType')->in($filterObject) - ->markRight(1) - ->fi() - ->markRight(1) + ->markRight(2) ->andWhere('addedDate')->le(helper::now()) ->orderBy('score_desc, editedDate_desc') ->query(); diff --git a/module/story/control.php b/module/story/control.php index fdc90208ab..db9c8bbf22 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -341,6 +341,7 @@ class story extends control $verify = htmlSpecialString($story->verify); $keywords = $story->keywords; $mailto = $story->mailto; + $category = $story->category; } if($bugID > 0) @@ -475,6 +476,7 @@ class story extends control $this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement') : ''; $this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : ""; $this->view->type = $storyType; + $this->view->category = $category ? $category : 'feature'; $this->display(); } @@ -2282,7 +2284,7 @@ class story extends control } else { - return print(js::closeModal('parent.parent', 'this', 'function(){parent.parent.$(\'[data-ride="searchList"]\').searchList();}')); + return print(js::reload('parent.parent')); } } return print(js::locate($this->createLink('story', 'view', "storyID=$storyID&version=0¶m=0&storyType=$storyType"), 'parent')); diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index fc17f87f1d..f0b00295fa 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -265,7 +265,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
story->category;?> - story->categoryList, 'feature', "class='form-control chosen'");?> + story->categoryList, $category, "class='form-control chosen'");?>
diff --git a/module/story/view/processstorychange.html.php b/module/story/view/processstorychange.html.php index b23c873843..7fd5223473 100644 --- a/module/story/view/processstorychange.html.php +++ b/module/story/view/processstorychange.html.php @@ -24,15 +24,15 @@
id;?>title;?>story->changed;?>version;?>openedBy);?>
id;?>title;?>story->changed;?>version;?>openedBy);?>
diff --git a/module/task/model.php b/module/task/model.php index 4fc055fdb8..99562a7d2f 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1479,9 +1479,6 @@ class taskModel extends model return false; } - $project = $this->loadModel('project')->getByID($oldTask->project); - if($project->model == 'waterfall') $this->config->task->edit->requiredFields .= ',estStarted,deadline'; - foreach(explode(',', $this->config->task->edit->requiredFields) as $field) { $field = trim($field); diff --git a/module/testcase/control.php b/module/testcase/control.php index 0dc9edb3bd..8f44396214 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -998,7 +998,14 @@ class testcase extends control if($case->module) $moduleIdList = $this->tree->getAllChildID($case->module); $moduleIdList = (!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) ? 0 : $moduleIdList; - $stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false); + if($this->app->tab == 'execution') + { + $stories = $this->story->getExecutionStoryPairs($case->execution, $productID, $case->branch, $moduleIdList); + } + else + { + $stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false); + } $this->view->productID = $productID; $this->view->product = $product; diff --git a/module/testtask/control.php b/module/testtask/control.php index 6a6b20f42a..963563ae4b 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -538,7 +538,7 @@ class testtask extends control $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'); - $this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testtask->statusList; + $this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testcase->statusList; $this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries(); $this->config->testcase->search['queryID'] = $queryID; diff --git a/module/testtask/model.php b/module/testtask/model.php index 5058062f25..a1324c153a 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1082,7 +1082,7 @@ class testtaskModel extends model } $caseQuery = preg_replace('/`(\w+)`/', 't2.`$1`', $caseQuery); - $caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`', 't2.`status`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`', 't1.`status`'), $caseQuery); + $caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`'), $caseQuery); /* Select the table for these special fields. */ $specialFields = ',assignedTo,status,lastRunResult,lastRunner,lastRunDate,'; diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 7b014e9ed7..058c091e55 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -58,7 +58,11 @@ if(isset($pageCSS)) css::internal($pageCSS); type != 'line'):?> > tree->parentCate : $lang->tree->parent;?> - parent, "class='form-control chosen'");?> + +
+ parent, "class='form-control chosen'");?> +
+ > @@ -184,13 +188,12 @@ function loadModules(branch) var productID = $('#root').val(); var branchID = $(branch).val(); var moduleID = $('#parent').val(); - var moduleBox = $('#parent').closest('tr').children('td'); if(typeof(branchID) == 'undefined') branchID = 0; if(typeof(moduleID) == 'undefined') moduleID = 0; - link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=' + type + '&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=excludeModuleID=' + id;?> + ',noMainBranch,nodeleted¤tModuleID=' + moduleID); - $(moduleBox).load(link, function() + link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=' + type + '&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=false&extra=excludeModuleID=' + id;?> + ',noMainBranch,nodeleted¤tModuleID=' + moduleID); + $('#moduleIdBox').load(link, function() { $(this).children('select').attr('id', 'parent').attr('name', 'parent'); $(this).find('select').chosen() diff --git a/module/user/model.php b/module/user/model.php index 48cc74befe..eea5c31733 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -862,7 +862,7 @@ class userModel extends model $_POST['password1'] = trim($_POST['password1']); $_POST['password2'] = trim($_POST['password2']); if(!$canNoPassword and empty($_POST['password1'])) dao::$errors['password1'][] = sprintf($this->lang->error->notempty, $this->lang->user->password) . '
'; - if(!$canNoPassword and $this->post->password1 != false) + if(!empty($_POST['password1'])) { if(isset($this->config->safe->mode) and ($this->post->passwordStrength < $this->config->safe->mode)) dao::$errors['password1'][] = zget($this->lang->user->placeholder->passwordStrengthCheck, $this->config->safe->mode, $this->lang->user->weakPassword) . '
';