Merge branch 'master' of github.com:easysoft/zentaopms

Conflicts:
	module/release/model.php
This commit is contained in:
wangyidong
2015-11-02 15:33:17 +08:00
2 changed files with 5 additions and 3 deletions

View File

@@ -26,3 +26,5 @@ CREATE TABLE `zt_storystage` (
ALTER TABLE `zt_story` ADD INDEX `product` (`product`, `module`, `type`, `pri`), DROP INDEX `product`;
ALTER TABLE `zt_story` ADD `plan` text COLLATE 'utf8_general_ci' NOT NULL AFTER `module`;
UPDATE `zt_story` SET `plan`='' WHERE `plan`='0';
LTER TABLE `zt_release` DROP INDEX `name`;

View File

@@ -112,7 +112,7 @@ class releaseModel extends model
->remove('build,files,labels')
->get();
$build = $this->loadModel('file')->processEditor($build, $this->config->release->editor->create['id']);
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->check('name','unique')->exec();
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->check('name','unique', "deleted='0'")->exec();
$buildID = $this->dao->lastInsertID();
}
@@ -127,7 +127,7 @@ class releaseModel extends model
->get();
$release = $this->loadModel('file')->processEditor($release, $this->config->release->editor->create['id']);
$this->dao->insert(TABLE_RELEASE)->data($release)->autoCheck()->batchCheck($this->config->release->create->requiredFields, 'notempty')->check('name','unique')->exec();
$this->dao->insert(TABLE_RELEASE)->data($release)->autoCheck()->batchCheck($this->config->release->create->requiredFields, 'notempty')->check('name','unique', "deleted='0'")->exec();
if(!dao::isError())
{
@@ -156,7 +156,7 @@ class releaseModel extends model
$this->dao->update(TABLE_RELEASE)->data($release)
->autoCheck()
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
->check('name','unique', "id != $releaseID")
->check('name','unique', "id!=$releaseID and deleted='0'")
->where('id')->eq((int)$releaseID)
->exec();
if(!dao::isError()) return common::createChanges($oldRelease, $release);