From 6caa66da382451301408f5541046016ba73ccf93 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 11 Jan 2013 06:45:59 +0000 Subject: [PATCH] * adjust for get config from db. --- module/setting/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/setting/model.php b/module/setting/model.php index b89f26a8b4..3a73e3cfe0 100644 --- a/module/setting/model.php +++ b/module/setting/model.php @@ -166,7 +166,11 @@ class settingModel extends model { $company = $this->app->company->id . ',' . '0'; // Get settings of current company, and also settings for all company. $owner = 'system,' . ($account ? $account : ''); - $records = $this->dao->select('*')->from(TABLE_CONFIG)->where('owner')->in($owner)->andWhere('company')->in($company)->fetchAll('id', false); + $records = $this->dao->select('*')->from(TABLE_CONFIG) + ->where('owner')->in($owner) + ->andWhere('company')->in($company) + ->orderBy('id') + ->fetchAll('id', false); if(!$records) return array(); /* Group records by owner and module. */