* fix bug #089 and #090

This commit is contained in:
fujia
2010-05-17 06:22:49 +00:00
parent 6ec6d53489
commit 1bf4d15f14
2 changed files with 2 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class buildModel extends model
->specialChars('desc')
->add('project', (int)$projectID)
->get();
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->exec();
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name','unique')->exec();
if(!dao::isError()) return $this->dao->lastInsertID();
}

View File

@@ -29,7 +29,7 @@
function copyStoryTitle()
{
var storyTitle = $('#story option:selected').text();
storyTitle = storyTitle.substr(storyTitle.lastIndexOf('/') + 1);
storyTitle = storyTitle.substr(storyTitle.lastIndexOf(':')+ 1);
$('#name').attr('value', storyTitle);
}