diff --git a/module/bug/model.php b/module/bug/model.php index 1e79d1ea14..33b229d68f 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -125,7 +125,7 @@ class bugModel extends model /** * Create a bug. - * + * * @param string $from object that is transfered to bug. * @access public * @return int|bool @@ -171,9 +171,9 @@ class bugModel extends model } /** - * Batch create - * - * @param int $productID + * Batch create + * + * @param int $productID * @access public * @return void */ @@ -295,8 +295,8 @@ class bugModel extends model { $file['objectType'] = 'bug'; $file['objectID'] = $bugID; - $file['addedBy'] = $this->app->user->account; - $file['addedDate'] = $now; + $file['addedBy'] = $this->app->user->account; + $file['addedDate'] = $now; $this->dao->insert(TABLE_FILE)->data($file)->exec(); unset($file); } @@ -308,7 +308,7 @@ class bugModel extends model /* Remove upload image file and session. */ if(!empty($data->uploadImage) and $this->session->bugImagesFile) { - $classFile = $this->app->loadClass('zfile'); + $classFile = $this->app->loadClass('zfile'); $file = current($_SESSION['bugImagesFile']); $realPath = dirname($file['realpath']); if(is_dir($realPath)) $classFile->removeDir($realPath); @@ -361,7 +361,7 @@ class bugModel extends model /** * Check delay bug. - * + * * @param array $bugs * @access public * @return array @@ -391,11 +391,11 @@ class bugModel extends model /** * Get bugs of a module. - * - * @param int $productID + * + * @param int $productID * @param string|array $moduleIdList - * @param string $orderBy - * @param object $pager + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -412,11 +412,11 @@ class bugModel extends model /** * Get bug list of a plan. - * - * @param int $planID - * @param string $status - * @param string $orderBy - * @param object $pager + * + * @param int $planID + * @param string $status + * @param string $orderBy + * @param object $pager * @access public * @return void */ @@ -429,16 +429,16 @@ class bugModel extends model ->beginIF($status != 'all')->andWhere('status')->in($status)->fi() ->andWhere('deleted')->eq(0) ->orderBy($orderBy)->page($pager)->fetchAll('id'); - + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); - + return $bugs; } /** * Get info of a bug. - * - * @param int $bugID + * + * @param int $bugID * @param bool $setImgSize * @access public * @return object @@ -475,8 +475,8 @@ class bugModel extends model /** * Get bug list. - * - * @param int|array|string $bugIDList + * + * @param int|array|string $bugIDList * @param string $fields * @access public * @return array @@ -490,12 +490,12 @@ class bugModel extends model } /** - * getActiveBugs - * + * getActiveBugs + * * @param array $products - * @param int $branch - * @param int $projectID - * @param object $pager + * @param int $branch + * @param int $projectID + * @param object $pager * @access public * @return array */ @@ -515,11 +515,11 @@ class bugModel extends model } /** - * get Active And Postponed Bugs - * - * @param int $products - * @param int $projectID - * @param int $pager + * get Active And Postponed Bugs + * + * @param int $products + * @param int $projectID + * @param int $pager * @access public * @return void */ @@ -542,9 +542,9 @@ class bugModel extends model /** * Get module owner. - * - * @param int $moduleID - * @param int $productID + * + * @param int $moduleID + * @param int $productID * @access public * @return string */ @@ -579,8 +579,8 @@ class bugModel extends model /** * Update a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -614,11 +614,11 @@ class bugModel extends model ->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account) ->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now) ->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account) - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now) - ->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') - ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed') + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now) + ->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved') + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') + ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now) ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') ->setIF($this->post->resolution != '', 'confirmed', 1) @@ -646,7 +646,7 @@ class bugModel extends model /** * Batch update bugs. - * + * * @access public * @return array */ @@ -663,16 +663,16 @@ class bugModel extends model /* Process the data if the value is 'ditto'. */ foreach($bugIDList as $bugID) { - if($data->types[$bugID] == 'ditto') $data->types[$bugID] = isset($prev['type']) ? $prev['type'] : ''; - if($data->severities[$bugID] == 'ditto') $data->severities[$bugID] = isset($prev['severity']) ? $prev['severity'] : 3; - if($data->pris[$bugID] == 'ditto') $data->pris[$bugID] = isset($prev['pri']) ? $prev['pri'] : 0; - if($data->branches[$bugID] == 'ditto') $data->branches[$bugID] = isset($prev['branch']) ? $prev['branch'] : 0; - if($data->plans[$bugID] == 'ditto') $data->plans[$bugID] = isset($prev['plan']) ? $prev['plan'] : ''; - if($data->assignedTos[$bugID] == 'ditto') $data->assignedTos[$bugID] = isset($prev['assignedTo']) ? $prev['assignedTo'] : ''; - if($data->resolvedBys[$bugID] == 'ditto') $data->resolvedBys[$bugID] = isset($prev['resolvedBy']) ? $prev['resolvedBy'] : ''; - if($data->resolutions[$bugID] == 'ditto') $data->resolutions[$bugID] = isset($prev['resolution']) ? $prev['resolution'] : ''; - if($data->os[$bugID] == 'ditto') $data->os[$bugID] = isset($prev['os']) ? $prev['os'] : ''; - if($data->browsers[$bugID] == 'ditto') $data->browsers[$bugID] = isset($prev['browser']) ? $prev['browser'] : ''; + if($data->types[$bugID] == 'ditto') $data->types[$bugID] = isset($prev['type']) ? $prev['type'] : ''; + if($data->severities[$bugID] == 'ditto') $data->severities[$bugID] = isset($prev['severity']) ? $prev['severity'] : 3; + if($data->pris[$bugID] == 'ditto') $data->pris[$bugID] = isset($prev['pri']) ? $prev['pri'] : 0; + if($data->branches[$bugID] == 'ditto') $data->branches[$bugID] = isset($prev['branch']) ? $prev['branch'] : 0; + if($data->plans[$bugID] == 'ditto') $data->plans[$bugID] = isset($prev['plan']) ? $prev['plan'] : ''; + if($data->assignedTos[$bugID] == 'ditto') $data->assignedTos[$bugID] = isset($prev['assignedTo']) ? $prev['assignedTo'] : ''; + if($data->resolvedBys[$bugID] == 'ditto') $data->resolvedBys[$bugID] = isset($prev['resolvedBy']) ? $prev['resolvedBy'] : ''; + if($data->resolutions[$bugID] == 'ditto') $data->resolutions[$bugID] = isset($prev['resolution']) ? $prev['resolution'] : ''; + if($data->os[$bugID] == 'ditto') $data->os[$bugID] = isset($prev['os']) ? $prev['os'] : ''; + if($data->browsers[$bugID] == 'ditto') $data->browsers[$bugID] = isset($prev['browser']) ? $prev['browser'] : ''; $prev['type'] = $data->types[$bugID]; $prev['severity'] = $data->severities[$bugID]; @@ -716,11 +716,11 @@ class bugModel extends model if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved') $bug->resolvedDate = $now; if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account; if($bug->resolution != '' and $bug->status != 'closed') - { + { $bug->status = 'resolved'; - $bug->confirmed = 1; + $bug->confirmed = 1; } - if($bug->resolution != '' and $bug->assignedTo == '') + if($bug->resolution != '' and $bug->assignedTo == '') { $bug->assignedTo = $oldBug->openedBy; $bug->assignedDate = $now; @@ -812,8 +812,8 @@ class bugModel extends model /** * Assign a bug to a user again. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return string */ @@ -832,15 +832,15 @@ class bugModel extends model $this->dao->update(TABLE_BUG) ->data($bug) ->autoCheck() - ->where('id')->eq($bugID)->exec(); + ->where('id')->eq($bugID)->exec(); if(!dao::isError()) return common::createChanges($oldBug, $bug); } /** * Confirm a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -869,8 +869,8 @@ class bugModel extends model /** * Batch confirm bugs. - * - * @param array $bugIDList + * + * @param array $bugIDList * @access public * @return void */ @@ -894,8 +894,8 @@ class bugModel extends model /** * Resolve a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -963,7 +963,7 @@ class bugModel extends model /* Link bug to build and release. */ $this->linkBugToBuild($bugID, $bug->resolvedBuild); - + return common::createChanges($oldBug, $bug); } @@ -972,9 +972,9 @@ class bugModel extends model /** * Batch change branch. - * - * @param array $bugIDList - * @param int $branchID + * + * @param array $bugIDList + * @param int $branchID * @access public * @return array */ @@ -1030,9 +1030,9 @@ class bugModel extends model /** * Batch resolve bugs. - * - * @param array $bugIDList - * @param string $resolution + * + * @param array $bugIDList + * @param string $resolution * @param string $resolvedBuild * @access public * @return void @@ -1056,7 +1056,7 @@ class bugModel extends model $oldBug = $bugs[$bugID]; if($oldBug->resolution == 'fixed') { - unset($bugIDList[$i]); + unset($bugIDList[$i]); continue; } if($oldBug->status != 'active') continue; @@ -1103,8 +1103,8 @@ class bugModel extends model /** * Activate a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -1141,8 +1141,8 @@ class bugModel extends model /** * Close a bug. - * - * @param int $bugID + * + * @param int $bugID * @access public * @return void */ @@ -1262,8 +1262,8 @@ class bugModel extends model /** * Extract accounts from some bugs. - * - * @param int $bugs + * + * @param int $bugs * @access public * @return array */ @@ -1283,8 +1283,8 @@ class bugModel extends model /** * Extract accounts from a bug. - * - * @param object $bug + * + * @param object $bug * @access public * @return array */ @@ -1300,13 +1300,13 @@ class bugModel extends model } /** - * Get user bugs. - * - * @param string $account - * @param string $type - * @param string $orderBy - * @param int $limit - * @param int $pager + * Get user bugs. + * + * @param string $account + * @param string $type + * @param string $orderBy + * @param int $limit + * @param int $pager * @access public * @return void */ @@ -1327,10 +1327,10 @@ class bugModel extends model /** * Get bug pairs of a user. - * - * @param int $account - * @param bool $appendProduct - * @param int $limit + * + * @param int $account + * @param bool $appendProduct + * @param int $limit * @access public * @return array */ @@ -1357,7 +1357,7 @@ class bugModel extends model /** * Get bugs of a project. - * + * * @param int $projectID * @param int $build * @param string $type @@ -1415,10 +1415,10 @@ class bugModel extends model } /** - * Get product left bugs. - * - * @param int $build - * @param int $productID + * Get product left bugs. + * + * @param int $build + * @param int $productID * @access public * @return array */ @@ -1451,9 +1451,9 @@ class bugModel extends model } /** - * get Product Bug Pairs - * - * @param int $productID + * get Product Bug Pairs + * + * @param int $productID * @access public * @return void */ @@ -1476,19 +1476,19 @@ class bugModel extends model /** * Get bugs according to buildID and productID. - * - * @param int $buildID - * @param int $productID + * + * @param int $buildID + * @param int $productID * @access public * @return object */ public function getReleaseBugs($buildID, $productID, $branch = 0) { - $project = $this->dao->select('t1.id,t1.begin')->from(TABLE_PROJECT)->alias('t1') + $project = $this->dao->select('t1.id,t1.begin')->from(TABLE_PROJECT)->alias('t1') ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.id = t2.project') ->where('t2.id')->eq($buildID) ->fetch(); - $bugs = $this->dao->select('*')->from(TABLE_BUG) + $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('resolvedDate')->ge($project->begin) ->andWhere('resolution')->ne('postponed') ->andWhere('product')->eq($productID) @@ -1518,10 +1518,10 @@ class bugModel extends model /** * Get case bugs. - * - * @param int $runID - * @param int $caseID - * @param int $version + * + * @param int $runID + * @param int $caseID + * @param int $version * @access public * @return void */ @@ -1540,7 +1540,7 @@ class bugModel extends model * Get counts of some stories' bugs. * * @param array $stories - * @param int $projectID + * @param int $projectID * @access public * @return int */ @@ -1559,8 +1559,8 @@ class bugModel extends model /** * Get bug info from a result. - * - * @param int $resultID + * + * @param int $resultID * @param int $caseID * @param int $version * @access public @@ -1638,8 +1638,8 @@ class bugModel extends model } /** - * Get report data of bugs per project - * + * Get report data of bugs per project + * * @access public * @return array */ @@ -1654,7 +1654,7 @@ class bugModel extends model /** * Get report data of bugs per build. - * + * * @access public * @return void */ @@ -1665,7 +1665,7 @@ class bugModel extends model $builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = ''); /* Deal with the situation that a bug maybe associate more than one openedBuild. */ - foreach($datas as $buildIDList => $data) + foreach($datas as $buildIDList => $data) { $openBuildIDList = explode(',', $buildIDList); if(count($openBuildIDList) > 1) @@ -1695,8 +1695,8 @@ class bugModel extends model } /** - * Get report data of bugs per module - * + * Get report data of bugs per module + * * @access public * @return array */ @@ -1711,7 +1711,7 @@ class bugModel extends model /** * Get report data of opened bugs per day. - * + * * @access public * @return array */ @@ -1722,7 +1722,7 @@ class bugModel extends model /** * Get report data of resolved bugs per day. - * + * * @access public * @return array */ @@ -1737,7 +1737,7 @@ class bugModel extends model /** * Get report data of closed bugs per day. - * + * * @access public * @return array */ @@ -1751,7 +1751,7 @@ class bugModel extends model /** * Get report data of openeded bugs per user. - * + * * @access public * @return array */ @@ -1766,7 +1766,7 @@ class bugModel extends model /** * Get report data of resolved bugs per user. - * + * * @access public * @return array */ @@ -1785,7 +1785,7 @@ class bugModel extends model /** * Get report data of closed bugs per user. - * + * * @access public * @return array */ @@ -1805,7 +1805,7 @@ class bugModel extends model /** * Get report data of bugs per severity. - * + * * @access public * @return array */ @@ -1819,7 +1819,7 @@ class bugModel extends model /** * Get report data of bugs per resolution. - * + * * @access public * @return array */ @@ -1838,7 +1838,7 @@ class bugModel extends model /** * Get report data of bugs per status. - * + * * @access public * @return array */ @@ -1852,7 +1852,7 @@ class bugModel extends model /** * Get report data of bugs per pri - * + * * @access public * @return array */ @@ -1866,7 +1866,7 @@ class bugModel extends model /** * Get report data of bugs per status. - * + * * @access public * @return array */ @@ -1874,13 +1874,13 @@ class bugModel extends model { $datas = $this->dao->select('activatedCount AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('name')->orderBy('value DESC')->fetchAll('name'); if(!$datas) return array(); - foreach($datas as $data) $data->name = $this->lang->bug->report->bugsPerActivatedCount->graph->xAxisName . ':' . $data->name; + foreach($datas as $data) $data->name = $this->lang->bug->report->bugsPerActivatedCount->graph->xAxisName . ':' . $data->name; return $datas; } /** * Get report data of bugs per type. - * + * * @access public * @return array */ @@ -1891,10 +1891,10 @@ class bugModel extends model foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type]; return $datas; } - + /** - * getDataOfBugsPerAssignedTo - * + * getDataOfBugsPerAssignedTo + * * @access public * @return void */ @@ -1909,11 +1909,11 @@ class bugModel extends model foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; return $datas; } - + /** * Merge the default chart settings and the settings of current chart. - * - * @param string $chartType + * + * @param string $chartType * @access public * @return void */ @@ -1933,8 +1933,8 @@ class bugModel extends model /** * Get bug templates of a user. - * - * @param string $account + * + * @param string $account * @access public * @return array */ @@ -1953,7 +1953,7 @@ class bugModel extends model /** * Save user template. - * + * * @access public * @return void */ @@ -1972,8 +1972,8 @@ class bugModel extends model /** * Return the file => label pairs of some fields. - * - * @param string $fields + * + * @param string $fields * @access public * @return array */ @@ -1991,13 +1991,13 @@ class bugModel extends model /** * Get all bugs. - * - * @param int $productID + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2010,7 +2010,7 @@ class bugModel extends model ->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() ->andWhere('t1.deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); + ->orderBy($orderBy)->page($pager)->fetchAll(); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); @@ -2018,14 +2018,14 @@ class bugModel extends model } /** - * Get bugs of assign to me. - * - * @param int $productID + * Get bugs of assign to me. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2040,14 +2040,14 @@ class bugModel extends model } /** - * Get bugs of opened by me. - * - * @param int $productID + * Get bugs of opened by me. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2062,14 +2062,14 @@ class bugModel extends model } /** - * Get bugs of resolved by me. - * - * @param int $productID + * Get bugs of resolved by me. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2084,20 +2084,20 @@ class bugModel extends model } /** - * Get bugs of nobody to do. - * - * @param int $productID + * Get bugs of nobody to do. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ public function getByAssigntonull($productID, $branch, $modules, $projects, $orderBy, $pager) { - + return $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->eq($productID) ->beginIF($branch)->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() @@ -2108,13 +2108,13 @@ class bugModel extends model /** * Get unconfirmed bugs. - * - * @param int $productID + * + * @param int $productID * @param int $branch * @param array $modules - * @param int $projects - * @param int $orderBy - * @param int $pager + * @param int $projects + * @param int $orderBy + * @param int $pager * @access public * @return void */ @@ -2131,15 +2131,15 @@ class bugModel extends model } /** - * Get bugs the overdueBugs is active or unclosed. - * - * @param int $productID + * Get bugs the overdueBugs is active or unclosed. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $status - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $status + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2158,15 +2158,15 @@ class bugModel extends model } /** - * Get bugs the status is active or unclosed. - * - * @param int $productID + * Get bugs the status is active or unclosed. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $status - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $status + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2185,14 +2185,14 @@ class bugModel extends model } /** - * Get unclosed bugs for long time. - * - * @param int $productID + * Get unclosed bugs for long time. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2209,14 +2209,14 @@ class bugModel extends model } /** - * Get postponed bugs. - * - * @param int $productID + * Get postponed bugs. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2231,14 +2231,14 @@ class bugModel extends model } /** - * Get bugs need confirm. - * - * @param int $productID + * Get bugs need confirm. + * + * @param int $productID * @param int $branch * @param array $modules - * @param array $projects - * @param string $orderBy - * @param object $pager + * @param array $projects + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2258,12 +2258,12 @@ class bugModel extends model } /** - * Get bugs by search. - * - * @param int $productID - * @param int $queryID - * @param string $orderBy - * @param object $pager + * Get bugs by search. + * + * @param int $productID + * @param int $queryID + * @param string $orderBy + * @param object $pager * @access public * @return array */ @@ -2306,9 +2306,9 @@ class bugModel extends model } /** - * Form customed bugs. - * - * @param array $bugs + * Form customed bugs. + * + * @param array $bugs * @access public * @return array */ @@ -2348,9 +2348,9 @@ class bugModel extends model /** * Adjust the action is clickable. - * - * @param string $bug - * @param string $action + * + * @param string $bug + * @param string $action * @access public * @return void */ @@ -2369,7 +2369,7 @@ class bugModel extends model /** * Get report condition from session. - * + * * @access public * @return void */ @@ -2385,9 +2385,9 @@ class bugModel extends model /** * Link bug to build and release - * - * @param string|array $bugs - * @param int $resolvedBuild + * + * @param string|array $bugs + * @param int $resolvedBuild * @access public * @return bool */ @@ -2422,12 +2422,12 @@ class bugModel extends model * @param array $users * @param array $builds * @param array $branches - * @param array $modulePairs - * @param array $projects - * @param array $plans - * @param array $stories - * @param array $tasks - * @param string $mode + * @param array $modulePairs + * @param array $projects + * @param array $plans + * @param array $stories + * @param array $tasks + * @param string $mode * @access public * @return void */ @@ -2475,8 +2475,8 @@ class bugModel extends model switch($id) { case 'id': - //if($mode == 'table' && $canBatchAction) - if($canBatchAction) + //if($mode == 'table' && $canBatchAction) + if($canBatchAction) { echo html::checkbox('bugIDList', array($bug->id => sprintf('%03d', $bug->id))); } @@ -2496,8 +2496,8 @@ class bugModel extends model case 'title': $class = 'confirm' . $bug->confirmed; echo "[{$this->lang->bug->confirmedList[$bug->confirmed]}] "; - if($bug->branch and isset($branches[$bug->branch])) echo "{$branches[$bug->branch]} "; - if($bug->module and isset($modulePairs[$bug->module])) echo "{$modulePairs[$bug->module]} "; + if($bug->branch and isset($branches[$bug->branch])) echo "{$branches[$bug->branch]} "; + if($bug->module and isset($modulePairs[$bug->module])) echo "{$modulePairs[$bug->module]} "; echo $canView ? html::a($bugLink, $bug->title, null, "style='color: $bug->color'") : "{$bug->title}"; break; case 'branch': @@ -2636,10 +2636,10 @@ class bugModel extends model } /** - * Send mail - * - * @param int $bugID - * @param int $actionID + * Send mail + * + * @param int $bugID + * @param int $actionID * @access public * @return void */ @@ -2694,8 +2694,8 @@ class bugModel extends model /** * Get subject. - * - * @param object $bug + * + * @param object $bug * @access public * @return string */ @@ -2707,8 +2707,8 @@ class bugModel extends model /** * Get toList and ccList. - * - * @param object $bug + * + * @param object $bug * @access public * @return bool|array */ diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 5419737419..13fbdc5bff 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -68,7 +68,7 @@ id);?> - branchName) echo "{$build->branchName}"?> + branchName) echo "{$build->branchName}"?> createLink('build', 'view', "build=$build->id"), $build->name);?> scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?> diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 2790f044eb..459a2c46c5 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -150,7 +150,7 @@ pri?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> - product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?> + product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?> title, null, "style='color: $story->color'");?> openedBy];?> diff --git a/module/story/model.php b/module/story/model.php index f5876fc836..d1a3f1c355 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2333,8 +2333,8 @@ class storyModel extends model echo ""; break; case 'title': - if($story->branch and isset($branches[$story->branch])) echo "{$branches[$story->branch]} "; - if($story->module and isset($modulePairs[$story->module])) echo "{$modulePairs[$story->module]} "; + if($story->branch and isset($branches[$story->branch])) echo "{$branches[$story->branch]} "; + if($story->module and isset($modulePairs[$story->module])) echo "{$modulePairs[$story->module]} "; echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color'") : "{$story->title}"; break; case 'plan': @@ -2542,8 +2542,8 @@ class storyModel extends model /** * Get mail subject. - * - * @param object $story + * + * @param object $story * @access public * @return string */ @@ -2555,9 +2555,9 @@ class storyModel extends model /** * Get toList and ccList. - * - * @param object $story - * @param string $actionType + * + * @param object $story + * @param string $actionType * @access public * @return bool|array */ diff --git a/module/task/model.php b/module/task/model.php index 6c3069c623..ff21c2d744 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -64,7 +64,7 @@ class taskModel extends model $task = $this->file->processImgURL($task, $this->config->task->editor->create['id'], $this->post->uid); /* Fix Bug #1525 */ - $projectType =$this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('type'); + $projectType =$this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('type'); $requiredFields =explode(',', $this->config->task->create->requiredFields); if($projectType == 'ops')unset($requiredFields[array_search("story", $requiredFields)]); $requiredFields =implode(',', $requiredFields); @@ -152,7 +152,7 @@ class taskModel extends model $preStory = 0; /* Judge whether the current task is a parent. */ - $parentID = !empty($this->post->parent[0]) ? $this->post->parent[0] : 0; + $parentID = !empty($this->post->parent[0]) ? $this->post->parent[0] : 0; foreach($tasks->story as $key => $storyID) { @@ -220,7 +220,7 @@ class taskModel extends model } /* Fix bug #1525*/ - $projectType =$this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('type'); + $projectType =$this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('type'); $requiredFields = explode(',', $this->config->task->create->requiredFields); if($projectType == 'ops') unset($requiredFields[array_search('story', $requiredFields)]); $requiredFields = implode(',', $requiredFields); @@ -310,8 +310,8 @@ class taskModel extends model /** * Compute begin and end for parent task. - * - * @param int $taskID + * + * @param int $taskID * @access public * @return bool */ @@ -443,12 +443,12 @@ class taskModel extends model } } } - + /** * Compute hours for multiple task. - * - * @param object $oldTask - * @param object $task + * + * @param object $oldTask + * @param object $task * @access public * @return object|bool */ @@ -1748,7 +1748,7 @@ class taskModel extends model $data->finishedDate = $now; $data->assignedTo = $task->openedBy; } - + if(!empty($task->team)) { $oldConsumed = $task->team[$oldEstimate->account]->consumed; @@ -2240,10 +2240,10 @@ class taskModel extends model /** * Process data for report. - * - * @param array $tasks - * @param array $children - * @param string $field + * + * @param array $tasks + * @param array $children + * @param string $field * @access public * @return array */ @@ -2390,8 +2390,8 @@ class taskModel extends model switch($id) { case 'id': - //if($mode == 'table' && $canBatchAction) - if($canBatchAction) + //if($mode == 'table' && $canBatchAction) + if($canBatchAction) { echo html::checkbox('taskIDList', array($task->id => sprintf('%03d', $task->id))); } @@ -2406,8 +2406,8 @@ class taskModel extends model echo ""; break; case 'name': - if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . ' '; - if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' '; + if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . ' '; + if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' '; if($child or !empty($task->parent)) echo '' . $this->lang->task->childrenAB . ' '; if(!empty($task->team)) echo '' . $this->lang->task->multipleAB . ' '; echo $canView ? html::a($taskLink, $task->name, null, "style='color: $task->color'") : "$task->name"; diff --git a/module/testcase/model.php b/module/testcase/model.php index 7a79e53186..247ccc265a 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1361,8 +1361,8 @@ class testcaseModel extends model echo ""; break; case 'title': - if($case->branch) echo "{$branches[$case->branch]} "; - if($modulePairs and $case->module) echo "{$modulePairs[$case->module]} "; + if($case->branch) echo "{$branches[$case->branch]} "; + if($modulePairs and $case->module) echo "{$modulePairs[$case->module]} "; echo $canView ? html::a($caseLink, $case->title, null, "style='color: $case->color'") : "$case->title"; break; case 'branch': diff --git a/module/testtask/model.php b/module/testtask/model.php index 1224346a67..f9f16ff8ee 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1197,7 +1197,7 @@ class testtaskModel extends model echo ""; break; case 'title': - if($run->branch) echo "{$branches[$run->branch]}"; + if($run->branch) echo "{$branches[$run->branch]}"; echo $canView ? html::a($caseLink, $run->title) : $run->title; break; case 'branch':