summaryrefslogtreecommitdiff
path: root/installer/web.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-20 04:37:55 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-20 04:37:55 +0000
commit66ee2f9618d1ac17507dddeef1b68eb804aa634a (patch)
tree1dea996b25925001eedbe13a05aa65497bac3269 /installer/web.php
parent401da12adbe7979074de9c35fd458ff36f393350 (diff)
Move pages -> views for consistency, which simplifies the life of the File_Structure_Test
Diffstat (limited to 'installer/web.php')
-rw-r--r--installer/web.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/installer/web.php b/installer/web.php
index ddabcd19..25cc8d01 100644
--- a/installer/web.php
+++ b/installer/web.php
@@ -18,16 +18,16 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
if (installer::already_installed()) {
- $content = render("pages/success.html.php");
+ $content = render("success.html.php");
} else {
switch ($_GET["step"]) {
default:
case "welcome":
$errors = check_environment();
if ($errors) {
- $content = render("pages/environment_errors.html.php", array("errors" => $errors));
+ $content = render("environment_errors.html.php", array("errors" => $errors));
} else {
- $content = render("pages/get_db_info.html.php");
+ $content = render("get_db_info.html.php");
}
break;
@@ -40,11 +40,11 @@ if (installer::already_installed()) {
"type" => function_exists("mysqli_init") ? "mysqli" : "mysql");
if (!installer::connect($config)) {
- $content = render("pages/invalid_db_info.html.php");
+ $content = render("invalid_db_info.html.php");
} else if (!installer::select_db($config)) {
- $content = render("pages/missing_db.html.php");
+ $content = render("missing_db.html.php");
} else if (!installer::db_empty($config)) {
- $content = render("pages/db_not_empty.html.php");
+ $content = render("db_not_empty.html.php");
} else if (!installer::unpack_var()) {
$content = oops("Unable to create files inside the <code>var</code> directory");
} else if (!installer::unpack_sql()) {
@@ -53,7 +53,7 @@ if (installer::already_installed()) {
$content = oops("Couldn't create var/database.php");
} else {
list ($user, $password) = installer::create_admin($config);
- $content = render("pages/success.html.php", array("user" => $user, "password" => $password));
+ $content = render("success.html.php", array("user" => $user, "password" => $password));
}
break;
}
@@ -61,15 +61,15 @@ if (installer::already_installed()) {
include("install.html.php");
-function render($page, $args=array()) {
+function render($view, $args=array()) {
ob_start();
extract($args);
- include($page);
+ include(DOCROOT . "installer/views/" . $view);
return ob_get_clean();
}
function oops($error) {
- return render("pages/oops.html.php", array("error" => $error));
+ return render("oops.html.php", array("error" => $error));
}
function check_environment() {