install/includes/libenanoinstall.php
changeset 1183 15957df91ea4
parent 1182 58af2268331b
child 1227 bdac73ed481e
equal deleted inserted replaced
1182:58af2268331b 1183:15957df91ea4
    13  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    13  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    14  */
    14  */
    15 
    15 
    16 $neutral_color = 'C';
    16 $neutral_color = 'C';
    17 
    17 
    18 // Chat log from the night of the 1.1.7 release:
       
    19 // (09:08:20 PM) Neal: btw, did you figure out what caused the PHP fatal error in the 1.1.7
       
    20 //                     trunk for the CLI autoinstall script for the BitNami installer?
       
    21 // (09:08:38 PM) Dan: oh
       
    22 // (09:08:40 PM) Dan: eh
       
    23 // (09:08:45 PM) Dan: yeah i'll fix that real quick
       
    24 
       
    25 // Hence, the function_exists check.
       
    26 
       
    27 if ( !function_exists('run_installer_stage') ):
       
    28 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
    18 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
    29 {
    19 {
    30   static $resumed = false;
    20   static $resumed = false;
    31   static $resume_stack = array();
    21   static $resume_stack = array();
    32   
    22   
    68   {
    58   {
    69     echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack);
    59     echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack);
    70     return false;
    60     return false;
    71   }
    61   }
    72 }
    62 }
    73 endif;
       
    74 
    63 
    75 function start_install_table()
    64 function start_install_table()
    76 {
    65 {
    77   echo '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">' . "\n";
    66   echo '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">' . "\n";
    78 }
    67 }
   125   global $ui;
   114   global $ui;
   126   $ui->show_footer();
   115   $ui->show_footer();
   127   exit;
   116   exit;
   128 }
   117 }
   129 
   118 
   130 function install_get_crypto_backend()
       
   131 {
       
   132   $crypto_backend = 'none';
       
   133 
       
   134   // Extension test: BCMath
       
   135   if ( function_exists('bcadd') )
       
   136     $crypto_backend = 'bcmath';
       
   137   
       
   138   // Extension test: Big_Int
       
   139   if ( function_exists('bi_from_str') )
       
   140     $crypto_backend = 'bigint';
       
   141   
       
   142   // Extension test: GMP
       
   143   if ( function_exists('gmp_init') )
       
   144     $crypto_backend = 'gmp';
       
   145   
       
   146   return $crypto_backend;
       
   147 }
       
   148 
       
   149 function enano_perform_upgrade($target_branch)
   119 function enano_perform_upgrade($target_branch)
   150 {
   120 {
   151   global $db, $session, $paths, $template, $plugins; // Common objects
   121   global $db, $session, $paths, $template, $plugins; // Common objects
   152   // Import version info
   122   // Import version info
   153   global $enano_versions;
   123   global $enano_versions;