From e516548b5b168d28ceeea5653a4dfc34053d037e Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 8 Apr 2010 08:44:47 +0000 Subject: [PATCH] * process the company field. --- trunk/module/upgrade/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/module/upgrade/model.php b/trunk/module/upgrade/model.php index 3aa6544f04..d6878def59 100644 --- a/trunk/module/upgrade/model.php +++ b/trunk/module/upgrade/model.php @@ -122,12 +122,13 @@ class upgradeModel extends model $item->key = 'version'; $item->value = $version; - $configID = $this->dao->select('id')->from(TABLE_CONFIG) + $stmt = $this->dao->select('id')->from(TABLE_CONFIG) ->where('company')->eq(0) ->andWhere('owner')->eq('system') ->andWhere('section')->eq('global') ->andWhere('`key`')->eq('version') - ->fetch('id'); + ->query($autoCompany = false); + $configID = $stmt->fetchColumn('id'); if($configID > 0) { $this->dao->update(TABLE_CONFIG)->data($item)->where('id')->eq($configID)->exec();