From 6606581f431f52330b8bcc28e1aa1b55a4b5b408 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 6 Oct 2010 11:21:47 +0000 Subject: removed several parts of the old installer from the core git-svn-id: http://code.elgg.org/elgg/trunk@7021 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 67 -------------------------------------------------- 1 file changed, 67 deletions(-) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index c00a88e84..16e20ef7c 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -583,73 +583,6 @@ function elgg_get_file_list($directory, $exceptions = array(), $list = array(), return $list; } -/** - * Checks that Elgg has been installed and attempts to complete installation if not. - * - * This is called by {@link engine/start.php} immediately after Elgg libraries are loaded - * to check the installation state. - * - * Elgg's installation state is determined by (1) the existence of the engine/settings.php - * file, (2) a .htaccess file, and (3) a populated database. This function checks - * for 1 and 2, while 3 is checked by {@link is_installed()} and {@link is_db_installed()}. - * - * If settings.php doesn't exist and $_REQUEST['db_install_vars'] is present, - * this function attempts to write the values from 'db_install_vars' to settings.php. - * - * If .htaccess doens't exist this function attempts to copy htaccess_dist to .htaccess. - * - * If there are any problems, this function calls {@link register_error()} and returns FALSE. - * Since this function is called during bootstrapping, the viewtype is failsafe. - * Returning FALSE results in an InstallationException, which halts execution. - * - * @return bool - */ -function sanitised() { - $sanitised = true; - - if (!file_exists(dirname(dirname(__FILE__)) . "/settings.php")) { - // See if we are being asked to save the file - $save_vars = get_input('db_install_vars'); - $result = ""; - if ($save_vars) { - $rtn = db_check_settings($save_vars['CONFIG_DBUSER'], - $save_vars['CONFIG_DBPASS'], - $save_vars['CONFIG_DBNAME'], - $save_vars['CONFIG_DBHOST'] ); - if ($rtn == FALSE) { - register_error(elgg_view("messages/sanitisation/dbsettings_error")); - register_error(elgg_view("messages/sanitisation/settings", - array( 'settings.php' => $result, - 'sticky' => $save_vars))); - return FALSE; - } - - $result = create_settings($save_vars, dirname(dirname(__FILE__)) . "/settings.example.php"); - - - if (file_put_contents(dirname(dirname(__FILE__)) . "/settings.php", $result)) { - // blank result to stop it being displayed in textarea - $result = ""; - } - } - - // Recheck to see if the file is still missing - if (!file_exists(dirname(dirname(__FILE__)) . "/settings.php")) { - register_error(elgg_view("messages/sanitisation/settings", array('settings.php' => $result))); - $sanitised = false; - } - } - - if (!file_exists(dirname(dirname(dirname(__FILE__))) . "/.htaccess")) { - if (!@copy(dirname(dirname(dirname(__FILE__))) . "/htaccess_dist", dirname(dirname(dirname(__FILE__))) . "/.htaccess")) { - register_error(elgg_view("messages/sanitisation/htaccess", array('.htaccess' => file_get_contents(dirname(dirname(dirname(__FILE__))) . "/htaccess_dist")))); - $sanitised = false; - } - } - - return $sanitised; -} - /** * Adds an entry in $CONFIG[$register_name][$subregister_name]. * -- cgit v1.2.3