From c3d42dbe2e06e34f06a3442f1fd60015a72ea7d4 Mon Sep 17 00:00:00 2001 From: wyd621 Date: Wed, 20 Nov 2013 01:56:43 +0000 Subject: [PATCH] * adjust var name. --- module/upgrade/model.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 79a7e8bf44..72cf2fe146 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -732,20 +732,20 @@ class upgradeModel extends model $this->dbh->exec("ALTER TABLE " . TABLE_GROUPPRIV . " DROP `company`;"); /* Delete version and sn that don's conform to the rules. Prevent conflict when delete company's field.*/ - $configs = $this->dao->select('*')->from(TABLE_CONFIG)->orderBy('id desc')->fetchAll('id'); + $rows = $this->dao->select('*')->from(TABLE_CONFIG)->orderBy('id desc')->fetchAll('id'); $items = array(); - $delID = array(); - foreach($configs as $config) + $delList = array(); + foreach($rows as $config) { if(isset($items[$config->owner][$config->module][$config->section][$config->key])) { - $delID[] = $config->id; + $delList[] = $config->id; continue; } $items[$config->owner][$config->module][$config->section][$config->key] = $config->id; } - if($delID) $this->dao->delete()->from(TABLE_CONFIG)->where('id')->in($delID)->exec(); + if($delList) $this->dao->delete()->from(TABLE_CONFIG)->where('id')->in($delList)->exec(); $this->dbh->exec("ALTER TABLE " . TABLE_CONFIG . " DROP `company`;");