install/includes/stages/install.php
changeset 349 fdaf9070566c
parent 348 87e08a6e4fec
child 351 8978cb3541ca
equal deleted inserted replaced
348:87e08a6e4fec 349:fdaf9070566c
    71 @set_time_limit(0);
    71 @set_time_limit(0);
    72 
    72 
    73 function stg_load_files()
    73 function stg_load_files()
    74 {
    74 {
    75   global $dbdriver;
    75   global $dbdriver;
    76   if ( !@include( ENANO_ROOT . "/install/includes/payloads/common.php" ) )
    76   if ( !@include( ENANO_ROOT . "/install/includes/payload.php" ) )
    77     return false;
       
    78   
       
    79   if ( !@include( ENANO_ROOT . "/install/includes/payloads/$dbdriver.php" ) )
       
    80     return false;
    77     return false;
    81   
    78   
    82   return true;
    79   return true;
    83 }
    80 }
    84 
    81 
    88 run_installer_stage('load', 'Load installer files', 'stg_load_files', 'One of the files needed for installation couldn\'t be loaded. Please check your Enano directory.', false);
    85 run_installer_stage('load', 'Load installer files', 'stg_load_files', 'One of the files needed for installation couldn\'t be loaded. Please check your Enano directory.', false);
    89 run_installer_stage('setpass', 'Retrieve administrator password', 'stg_password_decode', 'The administrator password couldn\'t be decrypted. This really shouldn\'t happen.');
    86 run_installer_stage('setpass', 'Retrieve administrator password', 'stg_password_decode', 'The administrator password couldn\'t be decrypted. This really shouldn\'t happen.');
    90 run_installer_stage('genaes', 'Generate private key', 'stg_make_private_key', 'Couldn\'t generate a private key for the site. This really shouldn\'t happen.');
    87 run_installer_stage('genaes', 'Generate private key', 'stg_make_private_key', 'Couldn\'t generate a private key for the site. This really shouldn\'t happen.');
    91 run_installer_stage('sqlparse', 'Prepare database schema', 'stg_load_schema', 'Couldn\'t load or parse the schema file. This really shouldn\'t happen.');
    88 run_installer_stage('sqlparse', 'Prepare database schema', 'stg_load_schema', 'Couldn\'t load or parse the schema file. This really shouldn\'t happen.');
    92 run_installer_stage('payload', 'Install database', 'stg_deliver_payload', 'There was a problem with an SQL query.');
    89 run_installer_stage('payload', 'Install database', 'stg_deliver_payload', 'There was a problem with an SQL query.');
       
    90 run_installer_stage('writeconfig', $lang->get('install_stg_writeconfig_title'), 'stg_write_config', $lang->get('install_stg_writeconfig_body'));
       
    91 
       
    92 // Now that the config is written, shutdown our primitive API and startup the full Enano API
       
    93 $db->close();
       
    94 
       
    95 @define('ENANO_ALLOW_LOAD_NOLANG', 1);
       
    96 require(ENANO_ROOT . '/includes/common.php');
       
    97         
       
    98 if ( is_object($db) && is_object($session) )
       
    99 {
       
   100   run_installer_stage('startapi', $lang->get('install_stg_startapi_title'), 'stg_sim_good', '...', false);
       
   101 }
       
   102 else
       
   103 {
       
   104   run_installer_stage('startapi', $lang->get('install_stg_startapi_title'), 'stg_sim_bad', $lang->get('install_stg_startapi_body'), false);
       
   105 }
       
   106 
       
   107 // Import languages
       
   108 run_installer_stage('importlang', $lang->get('install_stg_importlang_title'), 'stg_language_setup', $lang->get('install_stg_importlang_body'));
    93 
   109 
    94 close_install_table();
   110 close_install_table();
    95 
   111 
    96 $db->close();
   112 $db->close();
    97 
   113