aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-14 18:22:16 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-14 18:22:16 +0000
commit9aee838d110807dcd054eef278e34471ac06dfd1 (patch)
treebff64ffcc21c1c2c56cbf207e95e7cb28d1ab1b6
parente0c5ffc792657f5fb3ff1f0774cfcd18befb8175 (diff)
downloadelgg-9aee838d110807dcd054eef278e34471ac06dfd1.tar.gz
elgg-9aee838d110807dcd054eef278e34471ac06dfd1.tar.bz2
Some further installation tweaks
git-svn-id: https://code.elgg.org/elgg/trunk@35 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/install.php45
-rw-r--r--install.php9
-rw-r--r--views/default/pageshell.php2
3 files changed, 52 insertions, 4 deletions
diff --git a/engine/lib/install.php b/engine/lib/install.php
new file mode 100644
index 000000000..79b170842
--- /dev/null
+++ b/engine/lib/install.php
@@ -0,0 +1,45 @@
+<?php
+
+ /**
+ * Elgg installation
+ * Various functions to assist with installing and upgrading the system
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ /**
+ * Returns whether or not the database has been installed
+ *
+ * @return true|false Whether the database has been installed
+ */
+ function is_db_installed() {
+
+ $tables = get_db_tables();
+ if (!$tables) {
+ return false;
+ }
+ return true;
+
+ }
+
+ /**
+ * Returns whether or not other settings have been set
+ *
+ * @return true|false Whether or not the rest of the installation has been followed through with
+ */
+ function is_installed() {
+
+ global $CONFIG;
+ if (!empty($CONFIG->path))
+ return true;
+
+ return false;
+
+ }
+
+?> \ No newline at end of file
diff --git a/install.php b/install.php
index 5e253eb1b..3be2b3c78 100644
--- a/install.php
+++ b/install.php
@@ -20,19 +20,20 @@
/**
* If we're installed, go back to the homepage
*/
- forward();
+ if (is_installed())
+ forward();
/**
* Install the database
*/
- $tables = get_db_tables();
- if (!$tables) {
+ if (!is_db_installed()) {
run_sql_script(dirname(__FILE__) . "/engine/schema/mysql.sql");
+ system_message("The Elgg database was installed.");
}
/**
* Load the front page
*/
- echo page_draw(null, elgg_view("homepage"));
+ echo page_draw("Installation", elgg_view("settings/system"));
?> \ No newline at end of file
diff --git a/views/default/pageshell.php b/views/default/pageshell.php
index 648fa1ff6..499f1486e 100644
--- a/views/default/pageshell.php
+++ b/views/default/pageshell.php
@@ -20,6 +20,8 @@
// Set title
if (empty($vars['title'])) {
$title = $vars['config']->sitename;
+ } else if (empty($vars['config']->sitename)) {
+ $title = $vars['title'];
} else {
$title = $vars['config']->sitename . ": " . $vars['title'];
}