'", "',", postRequestParameter('mysql','host'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-DBASE', " 'dbase' => '", "',", postRequestParameter('mysql','dbase'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-LOGIN', " 'login' => '", "',", postRequestParameter('mysql','login'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PASSWORD', " 'password' => '", "',", postRequestParameter('mysql','pass1'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestParameter('mysql','prefix'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestParameter('mysql','type'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestParameter('smtp_host'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestParameter('smtp_user'), 0); changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestParameter('smtp_pass1'), 0); // Generate a long site key $siteKey = generatePassword(50); // And write it changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0); // Script is now installed changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0); } // Adds a given template with content to install output stream function addTemplateToInstallContent ($template, $content = array()) { // Load the template $out = loadTemplate($template, true, $content); // Add it to output addToInstallContent($out); } // Add it to install content function addToInstallContent ($out) { // Set or add it... if (!isset($GLOBALS['install_content'])) { // Set it $GLOBALS['install_content'] = $out; } else { // Add it $GLOBALS['install_content'] .= $out; } // END - if } // Read a given SQL dump function readSqlDump ($FQFN) { // Sanity-check if file is there (should be there, but just to make it sure) if (!isFileReadable($FQFN)) { // This should not happen debug_report_bug(__FUNCTION__.': File ' . basename($FQFN) . ' is not readable!'); } // END - if // Load the file $content = readFromFile($FQFN); // Remove some unwanted chars $content = str_replace("\r", '', $content); $content = str_replace("\n\n", "\n", $content); // Return the content return $content; } // [EOF] ?>