aboutsummaryrefslogtreecommitdiff
path: root/views/installation/install
diff options
context:
space:
mode:
Diffstat (limited to 'views/installation/install')
-rw-r--r--views/installation/install/js_rewrite_check.php12
-rw-r--r--views/installation/install/nav.php35
-rw-r--r--views/installation/install/pages/admin.php17
-rw-r--r--views/installation/install/pages/complete.php16
-rw-r--r--views/installation/install/pages/database.php26
-rw-r--r--views/installation/install/pages/requirements.php39
-rw-r--r--views/installation/install/pages/settings.php14
-rw-r--r--views/installation/install/pages/welcome.php8
8 files changed, 167 insertions, 0 deletions
diff --git a/views/installation/install/js_rewrite_check.php b/views/installation/install/js_rewrite_check.php
new file mode 100644
index 000000000..04d81171d
--- /dev/null
+++ b/views/installation/install/js_rewrite_check.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Some servers don't allow PHP to check the rewrite, so try via AJAX
+ */
+?>
+<script type="text/javascript">
+ elgg.installer.rewriteTest(
+ '<?php echo $vars['url'];?>',
+ '<?php echo elgg_echo('install:check:rewrite:success'); ?>',
+ '<?php echo $vars['config']->wwwroot; ?>install.php?step=database'
+ );
+</script> \ No newline at end of file
diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php
new file mode 100644
index 000000000..c150cb2cb
--- /dev/null
+++ b/views/installation/install/nav.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Navigation for installation pages
+ *
+ * @uses $vars['url'] base url of site
+ * @uses $vars['next_step'] next step as string
+ * @uses $vars['refresh'] should refresh button be shown?
+ * @uses $vars['advance'] should the next button be active?
+ */
+
+
+// has a refresh button been requested
+$refresh = '';
+if (isset($vars['refresh']) && $vars['refresh']) {
+ $refresh_text = elgg_echo('install:refresh');
+ $refresh = "<a href=\"\">$refresh_text</a>";
+}
+
+// create next button and selectively disable
+$next_text = elgg_echo('install:next');
+$next_link = elgg_get_site_url()."install.php?step={$vars['next_step']}";
+$next = "<a href=\"$next_link\">$next_text</a>";
+if (isset($vars['advance']) && !$vars['advance']) {
+ // disable the next button
+ $next = "<a class=\"elgg-state-disabled\">$next_text</a>";
+}
+
+
+echo <<<___END
+<div class="elgg-install-nav">
+ $next
+ $refresh
+</div>
+
+___END;
diff --git a/views/installation/install/pages/admin.php b/views/installation/install/pages/admin.php
new file mode 100644
index 000000000..e810aa701
--- /dev/null
+++ b/views/installation/install/pages/admin.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Install create admin account page
+ */
+
+echo elgg_autop(elgg_echo('install:admin:instructions'));
+
+$vars['type'] = 'admin';
+
+$url = current_page_url();
+
+$form_vars = array(
+ 'action' => $url,
+ 'disable_security' => TRUE,
+);
+
+echo elgg_view_form('install/template', $form_vars, $vars);
diff --git a/views/installation/install/pages/complete.php b/views/installation/install/pages/complete.php
new file mode 100644
index 000000000..80f8e7434
--- /dev/null
+++ b/views/installation/install/pages/complete.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Install completion page
+ */
+
+echo elgg_autop(elgg_echo('install:complete:instructions'));
+
+?>
+
+<div class="elgg-install-nav">
+<?php
+ $url = elgg_get_site_url() . $vars['destination'];
+ $text = elgg_echo('install:complete:gotosite');
+ echo "<a href=\"$url\">$text</a>";
+?>
+</div>
diff --git a/views/installation/install/pages/database.php b/views/installation/install/pages/database.php
new file mode 100644
index 000000000..d24b4f57b
--- /dev/null
+++ b/views/installation/install/pages/database.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Install database page
+ *
+ * @uses $vars['failure'] Settings file exists but something went wrong
+ */
+
+if (isset($vars['failure']) && $vars['failure']) {
+ echo elgg_autop(elgg_echo('install:database:error'));
+ $vars['refresh'] = TRUE;
+ $vars['advance'] = FALSE;
+ echo elgg_view('install/nav', $vars);
+} else {
+ echo elgg_autop(elgg_echo('install:database:instructions'));
+
+ $vars['type'] = 'database';
+
+ $url = current_page_url();
+
+ $form_vars = array(
+ 'action' => $url,
+ 'disable_security' => TRUE,
+ );
+
+ echo elgg_view_form('install/template', $form_vars, $vars);
+} \ No newline at end of file
diff --git a/views/installation/install/pages/requirements.php b/views/installation/install/pages/requirements.php
new file mode 100644
index 000000000..3f0941c95
--- /dev/null
+++ b/views/installation/install/pages/requirements.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Install requirements checking page
+ *
+ * @uses $vars['num_failures] Number of requirements failures
+ * @uses $vars['num_warnings] Number of recommendation warnings
+ */
+
+if ($vars['num_failures'] != 0) {
+ $instruct_text = elgg_echo('install:requirements:instructions:failure');
+} elseif ($vars['num_warnings'] != 0) {
+ $instruct_text = elgg_echo('install:requirements:instructions:warning');
+} else {
+ $instruct_text = elgg_echo('install:requirements:instructions:success');
+}
+
+echo elgg_autop($instruct_text);
+
+$report = $vars['report'];
+foreach ($report as $category => $checks) {
+ $title = elgg_echo("install:require:$category");
+ echo "<h3>$title</h3>";
+ echo "<ul class=\"elgg-require-$category\">";
+ foreach ($checks as $check) {
+ echo "<li class=\"{$check['severity']}\">";
+ echo elgg_autop($check['message']);
+ echo "</li>";
+ }
+ echo "</ul>";
+}
+
+$vars['refresh'] = true;
+
+// cannot advance to next step with a failure
+if ($vars['num_failures'] != 0) {
+ $vars['advance'] = false;
+}
+
+echo elgg_view('install/nav', $vars);
diff --git a/views/installation/install/pages/settings.php b/views/installation/install/pages/settings.php
new file mode 100644
index 000000000..04f23c0ea
--- /dev/null
+++ b/views/installation/install/pages/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+echo elgg_autop(elgg_echo('install:settings:instructions'));
+
+$vars['type'] = 'settings';
+
+$url = current_page_url();
+
+$form_vars = array(
+ 'action' => $url,
+ 'disable_security' => TRUE,
+);
+
+echo elgg_view_form('install/template', $form_vars, $vars);
diff --git a/views/installation/install/pages/welcome.php b/views/installation/install/pages/welcome.php
new file mode 100644
index 000000000..f370c15f3
--- /dev/null
+++ b/views/installation/install/pages/welcome.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Install welcome page
+ */
+
+echo elgg_autop(elgg_echo('install:welcome:instructions'));
+
+echo elgg_view('install/nav', $vars);