diff --git a/config/zentaopms.php b/config/zentaopms.php index fe193d98ca..bc2ecfea74 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -139,6 +139,7 @@ $config->openMethods[] = 'index.changelog'; $config->openMethods[] = 'my.preference'; $config->openMethods[] = 'my.changepassword'; $config->openMethods[] = 'my.profile'; +$config->openMethods[] = 'my.settutorialconfig'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 56521cfb98..8d38bca3ff 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -19,7 +19,7 @@ include 'chosen.html.php';
diff --git a/module/execution/model.php b/module/execution/model.php index 871e9bce6c..ac295f910d 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -507,7 +507,7 @@ class executionModel extends model ->batchcheck($this->config->execution->edit->requiredFields, 'notempty') ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') - ->checkIF($execution->end != '', 'end', 'gt', $execution->begin) + ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) ->check('code', 'unique', "id != $executionID and code != '' and deleted = '0'") ->where('id')->eq($executionID) ->limit(1) diff --git a/module/program/control.php b/module/program/control.php index e7e252260d..266260265b 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -96,9 +96,6 @@ class program extends control $this->program->setMenu($programID); - $program = $this->program->getByID($programID); - if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back')); - /* Load pager and get tasks. */ $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); @@ -106,6 +103,7 @@ class program extends control /* Get the top programID. */ if($programID) { + $program = $this->program->getByID($programID); $path = explode(',', $program->path); $path = array_filter($path); $programID = current($path); @@ -113,7 +111,7 @@ class program extends control $this->view->title = $this->lang->program->product; $this->view->position[] = $this->lang->program->product; - $this->view->program = $program; + $this->view->programID = $programID; $this->view->browseType = $browseType; $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -386,12 +384,12 @@ class program extends control { $programID = $this->program->saveState($programID, $this->program->getPairs()); setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true); - if(!$programID) $this->locate($this->createLink('program', 'browse')); $this->program->setMenu($programID); - $this->app->session->set('programProject', $this->app->getURI(true), 'program'); - $this->app->session->set('projectList', $this->app->getURI(true), 'project'); + $uri = $this->app->getURI(true); + $this->app->session->set('programProject', $uri, 'program'); + $this->app->session->set('projectList', $uri, 'program'); $this->loadModel('datatable'); @@ -410,7 +408,6 @@ class program extends control $this->view->projectStats = $projectStats; $this->view->pager = $pager; $this->view->programID = $programID; - $this->view->program = $this->program->getByID($programID); $this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted'); $this->view->browseType = $browseType; $this->view->orderBy = $orderBy; diff --git a/module/program/view/product.html.php b/module/program/view/product.html.php index 008e690738..6618fc12d3 100644 --- a/module/program/view/product.html.php +++ b/module/program/view/product.html.php @@ -17,11 +17,11 @@ product->featureBar['all'] as $key => $label):?> {$pager->recTotal}";?> - id&browseType=$key&orderBy=$orderBy"), "{$label}", '', "class='btn btn-link $active'");?> + {$label}", '', "class='btn btn-link $active'");?>
- id", ' ' . $lang->product->create, '', 'class="btn btn-primary"');?> + ' . $lang->product->create, '', 'class="btn btn-primary"');?>
@@ -32,11 +32,11 @@
-
id");?>'> + '> - id&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
@@ -104,7 +104,7 @@ plans;?> releases;?> - id&action=edit&extra=&programID=$program->id", $product, 'list', 'edit');?> + id&action=edit&extra=&programID=$programID", $product, 'list', 'edit');?> @@ -129,7 +129,7 @@ -id)?> +