diff --git a/module/bug/model.php b/module/bug/model.php index 3dba719464..34c06d1800 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -3577,7 +3577,6 @@ class bugModel extends model if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs(); if(in_array($object, array('build','resolvedBuild'))) $relatedObjects= array('trunk' => $this->lang->trunk) + $relatedObjects; - - return $relatedObjects; + return array('' => '', 0 => '') + $relatedObjects; } } diff --git a/module/port/config.php b/module/port/config.php index d879f3c852..2b6ead6da0 100644 --- a/module/port/config.php +++ b/module/port/config.php @@ -15,7 +15,7 @@ $config->port->initFunction = 'title,control,required,'; $config->port->dateFeilds = 'estStarted,realStarted,deadline,openedDate,assignedDate,finishedDate,canceledDate,closedDate,lastEditedDate,'; $config->port->datetimeFeilds = ''; $config->port->listFields = ''; -$config->port->sysLangFields = ',pri,status,type,mode,severity,os,browser,resolution,confirmed,source,reviewResult,stage,change'; +$config->port->sysLangFields = ',pri,status,type,mode,severity,os,browser,resolution,confirmed,source,reviewResult,stage,change,category'; $config->port->sysDataFields = 'execution,product,user'; $config->port->userFields = 'assignedTo,openedBy,finishedBy,canceledBy,closedBy,lastEditedBy,lastRunner,resolvedBy,reviewedBy'; diff --git a/module/port/model.php b/module/port/model.php index 46cbcca4f0..7cdcb6cb57 100644 --- a/module/port/model.php +++ b/module/port/model.php @@ -884,11 +884,16 @@ class portModel extends model $datas = array_slice($datas, ($pagerID - 1) * $maxImport, $maxImport, true); } - if(!$maxImport) $this->maxImport = $result->allCount; + if(!$maxImport) $this->maxImport = $result->allCount; $result->maxImport = $maxImport; $result->isEndPage = $pagerID >= $result->allPager; $result->datas = $datas; + foreach($datas as $data) + { + if(isset($data->id)) $this->session->set('insert', false); + } + if(empty($datas)) die(js::locate('back')); return $result; } @@ -1219,7 +1224,6 @@ class portModel extends model $key = key($list); $addID = 1; if($model == 'task') $members = $this->loadModel('user')->getTeamMemberPairs($this->session->taskPortParams['executionID'], 'execution'); - $this->session->set('insert', true); $appendFields = $this->session->appendFields; $showImportCount = $this->config->port->lazyLoading ? $this->config->port->showImportCount : $this->maxImport; @@ -1239,7 +1243,6 @@ class portModel extends model if(!empty($object->id)) { $html .= $object->id . html::hidden("id[$row]", $object->id); - $this->session->set('insert', false); } else { diff --git a/module/port/view/header.html.php b/module/port/view/header.html.php index 0f46c108b0..373f268f77 100644 --- a/module/port/view/header.html.php +++ b/module/port/view/header.html.php @@ -13,7 +13,6 @@ $model = $datas->model; $datas = $datas->datas; $appendFields = $this->session->appendFields; $notEmptyRule = $this->session->notEmptyRule; -$insert = $this->session->insert; ?>