From 7fc94b80d2c7d83ca2b41ad25e5536da3b331206 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Tue, 6 Jul 2010 02:31:57 +0000 Subject: [PATCH] * adjust the logic, only set sn once. --- trunk/module/setting/model.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/trunk/module/setting/model.php b/trunk/module/setting/model.php index 63e35ec95f..6a71804f66 100644 --- a/trunk/module/setting/model.php +++ b/trunk/module/setting/model.php @@ -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的版本设置。*/