aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php67
1 files changed, 0 insertions, 67 deletions
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
@@ -584,73 +584,6 @@ function elgg_get_file_list($directory, $exceptions = array(), $list = array(),
}
/**
- * 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].
*
* This is only used for the site-wide menu. See {@link add_menu()}.