diff --git a/module/branch/control.php b/module/branch/control.php
index 5c9b516a1d..25a6266d33 100644
--- a/module/branch/control.php
+++ b/module/branch/control.php
@@ -205,7 +205,7 @@ class branch extends control
* @access public
* @return void
*/
- public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '')
+ public function ajaxGetDropMenu($productID, $branch, $module, $method, $extra = '')
{
parse_str($extra, $output);
$branches = $this->branch->getPairs($productID, 'all', isset($output['projectID']) ? $output['projectID'] : 0);
diff --git a/module/execution/control.php b/module/execution/control.php
index 43ae918936..11ab6d6814 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -1267,7 +1267,7 @@ class execution extends control
* Create a execution.
*
* @param string $projectID
- * @param string $executionID
+ * @param int $executionID
* @param string $copyExecutionID
* @param int $planID
* @param string $confirm
@@ -1277,7 +1277,7 @@ class execution extends control
* @access public
* @return void
*/
- public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
+ public function create($projectID = '', $executionID = 0, $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
{
/* Set menu. */
if($this->app->tab == 'project')
diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php
index 691157a5f7..0d96d08bc5 100644
--- a/module/execution/view/task.html.php
+++ b/module/execution/view/task.html.php
@@ -182,7 +182,8 @@ body {margin-bottom: 25px;}
app->getViewType() == 'xhtml'):?>
- project->getById($execution->project)->name . ' / ' . $this->execution->getByID($execution->id)->name) ?>
+ config->systemMode == 'new' ? $this->project->getById($execution->project)->name . ' / ' : '';?>
+ execution->getByID($execution->id)->name);?>
diff --git a/module/product/control.php b/module/product/control.php
index 5c028d8df9..0ed61baa9f 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -32,7 +32,7 @@ class product extends control
/* Get all products, if no, goto the create page. */
$this->products = $this->product->getPairs('nocode');
$isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api'));
- if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
+ if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
$this->view->products = $this->products;
}
diff --git a/module/program/control.php b/module/program/control.php
index 672800705d..d1f513ffc2 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -656,7 +656,7 @@ class program extends control
* @access public
* @return void
*/
- public function ajaxGetDropMenu($programID = 0, $module, $method)
+ public function ajaxGetDropMenu($programID, $module, $method)
{
$this->view->programID = $programID;
$this->view->module = $module;
diff --git a/module/project/control.php b/module/project/control.php
index fc9993c614..3b138f6170 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -115,7 +115,7 @@ class project extends control
* @access public
* @return void
*/
- public function ajaxGetDropMenu($projectID = 0, $module, $method)
+ public function ajaxGetDropMenu($projectID, $module, $method)
{
/* Load module. */
$this->loadModel('program');
diff --git a/module/story/model.php b/module/story/model.php
index 3301d05324..99d2aa75bd 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -2440,7 +2440,7 @@ class storyModel extends model
* @access public
* @return array
*/
- public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy, $pager)
+ public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy = '', $pager = null)
{
$stories = $this->dao->select('*')->from(TABLE_STORY)
->where('product')->in($productID)
diff --git a/module/task/model.php b/module/task/model.php
index ff058c24c5..e1116c3b5a 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -22,7 +22,7 @@ class taskModel extends model
*/
public function create($executionID)
{
- if($this->post->estimate < 0)
+ if((float)$this->post->estimate < 0)
{
dao::$errors[] = $this->lang->task->error->recordMinus;
return false;
diff --git a/module/testcase/model.php b/module/testcase/model.php
index bb3c819bf5..0a72aaa36d 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -60,7 +60,7 @@ class testcaseModel extends model
if(!empty($case->lib))$param = "lib={$case->lib}";
if(!empty($case->product))$param = "product={$case->product}";
$result = $this->loadModel('common')->removeDuplicate('case', $case, $param);
- if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
+ if($result and $result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
/* Value of story may be showmore. */
$case->story = (int)$case->story;
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 51243d6618..b9a1167290 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -947,7 +947,7 @@ class testtaskModel extends model
* @access public
* @return array
*/
- public function getUserRuns($taskID, $user, $modules = '', $orderBy, $pager = null)
+ public function getUserRuns($taskID, $user, $modules = '', $orderBy = 'id_desc', $pager = null)
{
/* Select the table for these special fields. */
$specialFields = ',assignedTo,status,lastRunResult,lastRunner,lastRunDate,';