@@ -164,11 +164,11 @@ public function step2Action()
164
164
}
165
165
166
166
$ db = Zend_Db::factory ($ dbtype , $ params );
167
- $ this ->Component ->Utility ->run_sql_from_file ($ db , $ sqlFile );
168
-
169
167
Zend_Db_Table::setDefaultAdapter ($ db );
170
168
Zend_Registry::set ('dbAdapter ' , $ db );
171
169
170
+ $ this ->Component ->Utility ->run_sql_from_file ($ db , $ sqlFile );
171
+
172
172
// Must generate and store our password salt before we create our first user
173
173
$ options = array ('allowModifications ' => true );
174
174
$ applicationConfig = new Zend_Config_Ini (CORE_CONFIGS_PATH .'/application.ini ' , null , $ options );
@@ -183,7 +183,7 @@ public function step2Action()
183
183
$ configGlobal = new Zend_Config_Ini (LOCAL_CONFIGS_PATH .'/application.local.ini ' , 'global ' );
184
184
Zend_Registry::set ('configGlobal ' , $ configGlobal );
185
185
186
- $ configDatabase = new Zend_Config_Ini (LOCAL_CONFIGS_PATH .'/database.local.ini ' , $ configGlobal -> environment );
186
+ $ configDatabase = new Zend_Config_Ini (LOCAL_CONFIGS_PATH .'/database.local.ini ' , ' production ' );
187
187
Zend_Registry::set ('configDatabase ' , $ configDatabase );
188
188
189
189
require_once BASE_PATH .'/core/controllers/components/UpgradeComponent.php ' ;
@@ -193,7 +193,8 @@ public function step2Action()
193
193
$ upgradeComponent ->upgrade (str_replace ('.sql ' , '' , basename ($ sqlFile )));
194
194
195
195
session_start ();
196
- $ userModel = MidasLoader::loadModel ('User ' );
196
+ require_once BASE_PATH .'/core/models/pdo/UserModel.php ' ;
197
+ $ userModel = new UserModel ();
197
198
$ this ->userSession ->Dao = $ userModel ->createUser (
198
199
$ form ->getValue ('email ' ),
199
200
$ form ->getValue ('userpassword1 ' ),
@@ -259,7 +260,7 @@ public function step3Action()
259
260
$ config ->global ->application ->name = $ form ->getValue ('name ' );
260
261
$ config ->global ->default ->timezone = $ form ->getValue ('timezone ' );
261
262
$ config ->global ->defaultassetstore ->id = $ assetstores [0 ]->getKey ();
262
- $ config ->global ->environment = $ form -> getValue ( ' environment ' ) ;
263
+ $ config ->global ->environment = ' production ' ;
263
264
264
265
$ writer = new Zend_Config_Writer_Ini ();
265
266
$ writer ->setConfig ($ config );
0 commit comments