public static function init($initDzDb = true) { self::$rawDzDb == null && (self::$rawDzDb = DbUtils::createDbUtils(true)); $dbConfig = Yii::app()->params['mobcent']['db']; if ($initDzDb) { if (self::$mobcentDiscuzDb == null) { self::$mobcentDiscuzDb = DbUtils::createDbUtils(); if (!self::$mobcentDiscuzDb->init($dbConfig['discuz'])) { throw new CDbException('mobcentDiscuzDb connect failed'); } } } }