* finish task #1953.

This commit is contained in:
wangyidong
2014-07-24 09:17:13 +00:00
parent 0c610eb33f
commit 0418dbe71c
12 changed files with 186 additions and 16 deletions
+8 -3
View File
@@ -75,15 +75,20 @@ class bugModel extends model
{
$this->loadModel('action');
$now = helper::now();
$data = fixer::input('post')->get();
$actions = array();
$data = fixer::input('post')->get();
$batchNum = count(current($data));
for($i = 0; $i < $batchNum; $i++)
{
if(!empty($data->titles[$i]) and empty($data->openedBuilds[$i])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->openedBuild)));
}
/* Get pairs(moduleID => moduleOwner) for bug. */
$stmt = $this->dbh->query($this->loadModel('tree')->buildMenuQuery($productID, 'bug', $startModuleID = 0));
$moduleOwners = array();
while($module = $stmt->fetch()) $moduleOwners[$module->id] = $module->owner;
for($i = 0; $i < $this->config->bug->batchCreate; $i++)
for($i = 0; $i < $batchNum; $i++)
{
if(empty($data->titles[$i])) continue;
$bug = new stdClass();