various bugfixes
This commit is contained in:
53
install.php
53
install.php
@ -188,6 +188,7 @@ class Install extends Controller {
|
||||
Views::view( 'install.check' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* One of the most important steps for installation, is the configuration. In this step, we will define some very core settings
|
||||
* for the app including the app's name and database credentials.
|
||||
@ -199,45 +200,19 @@ class Install extends Controller {
|
||||
$logo = 'Uploads/Images/System/' . Upload::last();
|
||||
}
|
||||
TheTempusProject::$activeConfig->load( BEDROCK_CONFIG_JSON );
|
||||
$configMatrix = [
|
||||
'main' => [
|
||||
'logo' => [
|
||||
'value' => $logo,
|
||||
],
|
||||
'name' => [
|
||||
'value' => Input::postNull( 'siteName' ),
|
||||
],
|
||||
'loginLimit' => [
|
||||
'type' => 'text',
|
||||
'pretty' => 'Maximum Login Attempts per hour',
|
||||
'default' => 5,
|
||||
'value' => 5,
|
||||
],
|
||||
],
|
||||
'database' => [
|
||||
'dbMaxQuery' => [
|
||||
'value'=> 100,
|
||||
],
|
||||
'dbEnabled' => [
|
||||
'value' => true,
|
||||
],
|
||||
'dbHost' => [
|
||||
'value' => Input::postNull( 'dbHost' ),
|
||||
],
|
||||
'dbName' => [
|
||||
'value' => Input::postNull( 'dbName' ),
|
||||
],
|
||||
'dbPassword' => [
|
||||
'value' => Input::postNull( 'dbPassword' ),
|
||||
],
|
||||
'dbPrefix' => [
|
||||
'value' => Input::postNull( 'dbPrefix' ),
|
||||
],
|
||||
'dbUsername' => [
|
||||
'value' => Input::postNull( 'dbUsername' ),
|
||||
],
|
||||
],
|
||||
];
|
||||
$baseConfig = TheTempusProject::$configMatrix;
|
||||
$baseConfig['main']['logo']['value'] = $logo;
|
||||
$baseConfig['main']['name']['value'] = Input::postNull( 'siteName' );
|
||||
$baseConfig['main']['template']['value'] = $baseConfig['main']['template']['default'];
|
||||
$baseConfig['main']['tokenEnabled']['value'] = $baseConfig['main']['tokenEnabled']['default'];
|
||||
$baseConfig['main']['loginLimit']['value'] = $baseConfig['main']['loginLimit']['default'];
|
||||
$baseConfig['database']['dbEnabled']['value'] = $baseConfig['database']['dbEnabled']['default'];
|
||||
$baseConfig['database']['dbHost']['value'] = Input::postNull( 'dbHost' );
|
||||
$baseConfig['database']['dbMaxQuery']['value'] = $baseConfig['database']['dbMaxQuery']['default'];
|
||||
$baseConfig['database']['dbName']['value'] = Input::postNull( 'dbName' );
|
||||
$baseConfig['database']['dbPassword']['value'] = Input::postNull( 'dbPassword' );
|
||||
$baseConfig['database']['dbPrefix']['value'] = Input::postNull( 'dbPrefix' );
|
||||
$baseConfig['database']['dbUsername']['value'] = Input::postNull( 'dbUsername' );
|
||||
if ( ! TheTempusProject::$activeConfig->generate( CONFIG_JSON, $configMatrix ) ) {
|
||||
return Issues::add( 'error', 'Config file already exists so the installer has been halted. If there was an error with installation, please delete app/config/config.json manually and try again. The installer should automatically bring you back to this step.' );
|
||||
}
|
||||
|
Reference in New Issue
Block a user