diff --git a/module/common/lang/en.php b/module/common/lang/en.php index ac942de49b..d63e3a4e15 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -47,6 +47,7 @@ $lang->goback = 'Back'; $lang->goPC = 'PC'; $lang->go = 'GO'; $lang->more = 'More'; +$lang->day = 'Day'; $lang->actions = 'Actions'; $lang->comment = 'Comment'; @@ -366,10 +367,6 @@ $lang->suhosinInfo = "Warming:data is too large! Please enlarge the setting of < $lang->noResultsMatch = "No results match"; $lang->chooseUsersToMail = "Choose users to mail..."; -$lang->date = new stdclass(); -$lang->date->day = 'Day'; -$lang->date->month = 'Month'; - /* Date times. */ define('DT_DATETIME1', 'Y-m-d H:i:s'); define('DT_DATETIME2', 'y-m-d H:i'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 26f107d602..8ca969142e 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -47,6 +47,7 @@ $lang->goback = '返回'; $lang->goPC = 'PC版'; $lang->go = 'GO'; $lang->more = '更多'; +$lang->day = '天'; $lang->actions = '操作'; $lang->comment = '备注'; @@ -366,10 +367,6 @@ $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改noResultsMatch = "没有匹配结果"; $lang->chooseUsersToMail = "选择要发信通知的用户..."; -$lang->date = new stdclass(); -$lang->date->day = '天'; -$lang->date->month = '月'; - /* 时间格式设置。*/ define('DT_DATETIME1', 'Y-m-d H:i:s'); define('DT_DATETIME2', 'y-m-d H:i'); diff --git a/module/project/control.php b/module/project/control.php index a5f18c50e9..8dd37ea902 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -708,7 +708,7 @@ class project extends control $charts = $this->report->createJSChartFlot($project->name, $flotJSON, 900, 400); $dayList = array_fill(1, floor(count($dateList) / $this->config->project->maxBurnDay) + 5, ''); - foreach($dayList as $key => $val) $dayList[$key] = ($key + 1) . $this->lang->date->day; + foreach($dayList as $key => $val) $dayList[$key] = $this->lang->project->interval . ($key + 1) . $this->lang->day; /* Assign. */ $this->view->title = $title; @@ -718,7 +718,7 @@ class project extends control $this->view->projectID = $projectID; $this->view->type = $type; $this->view->interval = $interval; - $this->view->dayList = array('full' => 1 . $this->lang->date->day) + $dayList; + $this->view->dayList = array('full' => $this->lang->project->interval . 1 . $this->lang->day) + $dayList; $this->display(); } diff --git a/module/project/view/burn.html.php b/module/project/view/burn.html.php index a06d5beb7d..df9ee9e263 100644 --- a/module/project/view/burn.html.php +++ b/module/project/view/burn.html.php @@ -15,16 +15,12 @@ -
+ $lang->project->weekend), $checked); - if($interval) - { - echo $lang->project->interval; - echo html::select('interval', $dayList, $interval); - } + if($interval) echo html::select('interval', $dayList, $interval); common::printLink('project', 'computeBurn', 'reload=yes', $lang->project->computeBurn, 'hiddenwin', "title='{$lang->project->computeBurn}{$lang->project->burn}' class='btn' id='computeBurn'"); echo $lang->project->howToUpdateBurn; diff --git a/module/release/model.php b/module/release/model.php index 48a062cb7d..7f81589426 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -33,8 +33,8 @@ class releaseModel extends model if(!$release) return false; $this->loadModel('file'); - $buildFiles = $this->file->getByObject('build', $release->buildID); - $release->files = $buildFiles ? $buildFiles : $this->file->getByObject('release', $releaseID); + $release->files = $this->file->getByObject('release', $releaseID); + if(empty($release->files))$release->files = $this->file->getByObject('build', $release->buildID); if($setImgSize) $release->desc = $this->file->setImgSize($release->desc); return $release; } @@ -96,6 +96,7 @@ class releaseModel extends model */ public function create($productID) { + $buildID = 0; if($this->post->build == false) { $build = fixer::input('post') diff --git a/module/report/model.php b/module/report/model.php index 93b25623f9..a1fa88516f 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -101,8 +101,7 @@ $(function () var baseline = $baselineJSON; var dateList = $dateListJSON; var ticks = $ticksJSON; - var firstMon = 0; - var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + var firstDay = 0; function showTooltip(x, y, contents) { $('
' + contents + '
').css @@ -132,20 +131,13 @@ $(function () { var month = tick.getMonth() + 1; var dateTail = ''; - if(firstMon != month) + if(firstDay != month) { - dateTail = '
/' + month; - firstMon = month; + dateTail = '/' + month; + firstDay = month; } - if(config.clientLang == 'en') - { - title = months[month-1] + ' ' + tick.getDate(); - } - else - { - title = month + '{$this->lang->date->month}' + tick.getDate(); - } + title = tick.getFullYear() + '/' + month + '/' + tick.getDate(); if(ticks.length <= 30) dateTail = '/' + month; return '' + tick.getDate() + dateTail + ''; diff --git a/module/story/model.php b/module/story/model.php index 3dd2b9e719..86ceb57721 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -66,9 +66,11 @@ class storyModel extends model */ public function getByList($storyIDList = 0) { - return $this->dao->select('*')->from(TABLE_STORY) - ->where('deleted')->eq(0) - ->beginIF($storyIDList)->andWhere('id')->in($storyIDList)->fi() + return $this->dao->select('t1.*, t2.spec, t2.verify')->from(TABLE_STORY)->alias('t1') + ->leftJoin(TABLE_STORYSPEC)->alias('t2')->on('t1.id=t2.story') + ->where('t1.deleted')->eq(0) + ->andWhere('t1.version=t2.version') + ->beginIF($storyIDList)->andWhere('t1.id')->in($storyIDList)->fi() ->fetchAll('id'); } @@ -551,7 +553,7 @@ class storyModel extends model $this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq($storyID)->exec(); $this->setStage($storyID); - if(strpos('done,postponed', $reason) !== false) $result = 'pass'; + if($reason and strpos('done,postponed', $reason) !== false) $result = 'pass'; $actions[$storyID] = $this->action->create('story', $storyID, 'Reviewed', '', ucfirst($result)); $this->action->logHistory($actions[$storyID], array()); }