* adjust the logic, only set sn once.

This commit is contained in:
wangchunsheng
2010-07-06 02:31:57 +00:00
parent 9fe49f330f
commit 7fc94b80d2

View File

@@ -67,14 +67,7 @@ class settingModel extends model
->andWhere('section')->eq('global')
->andWhere('`key`')->eq('sn')
->fetch('id', $autoComapny = false);
if($configID > 0)
{
$this->dao->update(TABLE_CONFIG)->data($item)->where('id')->eq($configID)->exec($autoCompany = false);
}
else
{
$this->dao->insert(TABLE_CONFIG)->data($item)->exec($autoCompany = false);
}
if(!$configID) $this->dao->insert(TABLE_CONFIG)->data($item)->exec($autoCompany = false);
}
/* 更新PMS的版本设置。*/