# HG changeset patch # User Dan # Date 1261189319 18000 # Node ID 15957df91ea4d2df884235edf4f5d9cd532efd87 # Parent 58af2268331b8c869855faeb59318b04ff867326 OK screw that, put the crypto backend check in functions. diff -r 58af2268331b -r 15957df91ea4 includes/functions.php --- a/includes/functions.php Fri Dec 18 21:11:42 2009 -0500 +++ b/includes/functions.php Fri Dec 18 21:21:59 2009 -0500 @@ -5282,3 +5282,27 @@ } } +/** + * Get the appropriate crypto backend for this server + * @return string + */ + +function install_get_crypto_backend() +{ + $crypto_backend = 'none'; + + // Extension test: BCMath + if ( function_exists('bcadd') ) + $crypto_backend = 'bcmath'; + + // Extension test: Big_Int + if ( function_exists('bi_from_str') ) + $crypto_backend = 'bigint'; + + // Extension test: GMP + if ( function_exists('gmp_init') ) + $crypto_backend = 'gmp'; + + return $crypto_backend; +} + diff -r 58af2268331b -r 15957df91ea4 install/includes/cli-core.php --- a/install/includes/cli-core.php Fri Dec 18 21:11:42 2009 -0500 +++ b/install/includes/cli-core.php Fri Dec 18 21:21:59 2009 -0500 @@ -29,8 +29,6 @@ exit; } -require_once( ENANO_ROOT . '/install/includes/libenanoinstall.php' ); - if ( defined('ENANO_INSTALLED') ) { // start up the API to let it error out if something's wrong diff -r 58af2268331b -r 15957df91ea4 install/includes/libenanoinstall.php --- a/install/includes/libenanoinstall.php Fri Dec 18 21:11:42 2009 -0500 +++ b/install/includes/libenanoinstall.php Fri Dec 18 21:21:59 2009 -0500 @@ -15,16 +15,6 @@ $neutral_color = 'C'; -// Chat log from the night of the 1.1.7 release: -// (09:08:20 PM) Neal: btw, did you figure out what caused the PHP fatal error in the 1.1.7 -// trunk for the CLI autoinstall script for the BitNami installer? -// (09:08:38 PM) Dan: oh -// (09:08:40 PM) Dan: eh -// (09:08:45 PM) Dan: yeah i'll fix that real quick - -// Hence, the function_exists check. - -if ( !function_exists('run_installer_stage') ): function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true) { static $resumed = false; @@ -70,7 +60,6 @@ return false; } } -endif; function start_install_table() { @@ -127,25 +116,6 @@ exit; } -function install_get_crypto_backend() -{ - $crypto_backend = 'none'; - - // Extension test: BCMath - if ( function_exists('bcadd') ) - $crypto_backend = 'bcmath'; - - // Extension test: Big_Int - if ( function_exists('bi_from_str') ) - $crypto_backend = 'bigint'; - - // Extension test: GMP - if ( function_exists('gmp_init') ) - $crypto_backend = 'gmp'; - - return $crypto_backend; -} - function enano_perform_upgrade($target_branch) { global $db, $session, $paths, $template, $plugins; // Common objects