From 66ee2f9618d1ac17507dddeef1b68eb804aa634a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 20 Jan 2009 04:37:55 +0000 Subject: Move pages -> views for consistency, which simplifies the life of the File_Structure_Test --- installer/pages/about_install.html.php | 18 ------- installer/pages/already_installed.html.php | 4 -- installer/pages/db_not_empty.html.php | 5 -- installer/pages/environment_errors.html.php | 19 ------- installer/pages/get_db_info.html.php | 78 ----------------------------- installer/pages/missing_db.html.php | 2 - installer/pages/oops.html.php | 9 ---- installer/pages/success.html.php | 22 -------- installer/views/about_install.html.php | 18 +++++++ installer/views/already_installed.html.php | 4 ++ installer/views/db_not_empty.html.php | 5 ++ installer/views/environment_errors.html.php | 19 +++++++ installer/views/get_db_info.html.php | 78 +++++++++++++++++++++++++++++ installer/views/missing_db.html.php | 2 + installer/views/oops.html.php | 9 ++++ installer/views/success.html.php | 22 ++++++++ installer/web.php | 20 ++++---- 17 files changed, 167 insertions(+), 167 deletions(-) delete mode 100644 installer/pages/about_install.html.php delete mode 100644 installer/pages/already_installed.html.php delete mode 100644 installer/pages/db_not_empty.html.php delete mode 100644 installer/pages/environment_errors.html.php delete mode 100644 installer/pages/get_db_info.html.php delete mode 100644 installer/pages/missing_db.html.php delete mode 100644 installer/pages/oops.html.php delete mode 100644 installer/pages/success.html.php create mode 100644 installer/views/about_install.html.php create mode 100644 installer/views/already_installed.html.php create mode 100644 installer/views/db_not_empty.html.php create mode 100644 installer/views/environment_errors.html.php create mode 100644 installer/views/get_db_info.html.php create mode 100644 installer/views/missing_db.html.php create mode 100644 installer/views/oops.html.php create mode 100644 installer/views/success.html.php (limited to 'installer') diff --git a/installer/pages/about_install.html.php b/installer/pages/about_install.html.php deleted file mode 100644 index 6ad2c242..00000000 --- a/installer/pages/about_install.html.php +++ /dev/null @@ -1,18 +0,0 @@ -

- Gallery needs to talk to your MySQL database, so to get started - you'll need to know: -

-
    -
  1. Database name
  2. -
  3. Database username
  4. -
  5. Database password
  6. -
  7. Database host
  8. -
- -

- If you're missing any of this information, please ask your - web host or system administrator for a little help. -

-

- Continue -

diff --git a/installer/pages/already_installed.html.php b/installer/pages/already_installed.html.php deleted file mode 100644 index f8fc5706..00000000 --- a/installer/pages/already_installed.html.php +++ /dev/null @@ -1,4 +0,0 @@ -

- Your Gallery3 install is complete. -

- diff --git a/installer/pages/db_not_empty.html.php b/installer/pages/db_not_empty.html.php deleted file mode 100644 index 754d46c6..00000000 --- a/installer/pages/db_not_empty.html.php +++ /dev/null @@ -1,5 +0,0 @@ -

- The database you provided already has other tables in it. - Continuing with the install might overwrite an existing Gallery - install. Please go back and choose a different database. -

diff --git a/installer/pages/environment_errors.html.php b/installer/pages/environment_errors.html.php deleted file mode 100644 index 7c31c1c2..00000000 --- a/installer/pages/environment_errors.html.php +++ /dev/null @@ -1,19 +0,0 @@ -

Whoa there!

- -

- There are some problems with your web hosting environment - that need to be fixed before you can successfully install - Gallery 3. -

- - - -

- Check again -

diff --git a/installer/pages/get_db_info.html.php b/installer/pages/get_db_info.html.php deleted file mode 100644 index 3459948e..00000000 --- a/installer/pages/get_db_info.html.php +++ /dev/null @@ -1,78 +0,0 @@ -

- Installing Gallery is very easy. We just need to know how to talk - to your MySQL database, and we need a place to store your photos on - your web host. -

- - -
- Photo Storage - -

- We're having trouble creating a place for your photos. Can you - help? Please create a directory called var in your - gallery3 directory, then run chmod 777 var. That - should fix it. -

- Check again -

- -

- We've found a place to store your photos. -

- -
- -
-
- Database -

- We've provided values that work for most common web hosts. If - you have problems, contact your web host for help. -

-
- - - - - - - - - - - - - - - - - - - - -
- Database Name - - -
- User - - -
- Password - - -
- Host - - -
- - - - (Please fix the photo storage problem before continuing) - -
-
-
diff --git a/installer/pages/missing_db.html.php b/installer/pages/missing_db.html.php deleted file mode 100644 index 1f93f08a..00000000 --- a/installer/pages/missing_db.html.php +++ /dev/null @@ -1,2 +0,0 @@ -

- < \ No newline at end of file diff --git a/installer/pages/oops.html.php b/installer/pages/oops.html.php deleted file mode 100644 index 141a4538..00000000 --- a/installer/pages/oops.html.php +++ /dev/null @@ -1,9 +0,0 @@ -

Oops!

-

- Something unexpected happened and we can't finish your install. - We'll try to provide some details about the specific problem below. -

-

- -

- diff --git a/installer/pages/success.html.php b/installer/pages/success.html.php deleted file mode 100644 index fbf5395d..00000000 --- a/installer/pages/success.html.php +++ /dev/null @@ -1,22 +0,0 @@ -

Success!

-

- Your Gallery3 install is complete! -

- - -

Before you start using it...

-

- We've created an account for you to use: -
- username: -
- password: -
-
- Save this information in a safe place, or change your admin password - right away! -

- - -

Start using Gallery

- diff --git a/installer/views/about_install.html.php b/installer/views/about_install.html.php new file mode 100644 index 00000000..6ad2c242 --- /dev/null +++ b/installer/views/about_install.html.php @@ -0,0 +1,18 @@ +

+ Gallery needs to talk to your MySQL database, so to get started + you'll need to know: +

+
    +
  1. Database name
  2. +
  3. Database username
  4. +
  5. Database password
  6. +
  7. Database host
  8. +
+ +

+ If you're missing any of this information, please ask your + web host or system administrator for a little help. +

+

+ Continue +

diff --git a/installer/views/already_installed.html.php b/installer/views/already_installed.html.php new file mode 100644 index 00000000..f8fc5706 --- /dev/null +++ b/installer/views/already_installed.html.php @@ -0,0 +1,4 @@ +

+ Your Gallery3 install is complete. +

+ diff --git a/installer/views/db_not_empty.html.php b/installer/views/db_not_empty.html.php new file mode 100644 index 00000000..754d46c6 --- /dev/null +++ b/installer/views/db_not_empty.html.php @@ -0,0 +1,5 @@ +

+ The database you provided already has other tables in it. + Continuing with the install might overwrite an existing Gallery + install. Please go back and choose a different database. +

diff --git a/installer/views/environment_errors.html.php b/installer/views/environment_errors.html.php new file mode 100644 index 00000000..7c31c1c2 --- /dev/null +++ b/installer/views/environment_errors.html.php @@ -0,0 +1,19 @@ +

Whoa there!

+ +

+ There are some problems with your web hosting environment + that need to be fixed before you can successfully install + Gallery 3. +

+ + + +

+ Check again +

diff --git a/installer/views/get_db_info.html.php b/installer/views/get_db_info.html.php new file mode 100644 index 00000000..3459948e --- /dev/null +++ b/installer/views/get_db_info.html.php @@ -0,0 +1,78 @@ +

+ Installing Gallery is very easy. We just need to know how to talk + to your MySQL database, and we need a place to store your photos on + your web host. +

+ + +
+ Photo Storage + +

+ We're having trouble creating a place for your photos. Can you + help? Please create a directory called var in your + gallery3 directory, then run chmod 777 var. That + should fix it. +

+ Check again +

+ +

+ We've found a place to store your photos. +

+ +
+ +
+
+ Database +

+ We've provided values that work for most common web hosts. If + you have problems, contact your web host for help. +

+
+ + + + + + + + + + + + + + + + + + + + +
+ Database Name + + +
+ User + + +
+ Password + + +
+ Host + + +
+ + + + (Please fix the photo storage problem before continuing) + +
+
+
diff --git a/installer/views/missing_db.html.php b/installer/views/missing_db.html.php new file mode 100644 index 00000000..1f93f08a --- /dev/null +++ b/installer/views/missing_db.html.php @@ -0,0 +1,2 @@ +

+ < \ No newline at end of file diff --git a/installer/views/oops.html.php b/installer/views/oops.html.php new file mode 100644 index 00000000..141a4538 --- /dev/null +++ b/installer/views/oops.html.php @@ -0,0 +1,9 @@ +

Oops!

+

+ Something unexpected happened and we can't finish your install. + We'll try to provide some details about the specific problem below. +

+

+ +

+ diff --git a/installer/views/success.html.php b/installer/views/success.html.php new file mode 100644 index 00000000..fbf5395d --- /dev/null +++ b/installer/views/success.html.php @@ -0,0 +1,22 @@ +

Success!

+

+ Your Gallery3 install is complete! +

+ + +

Before you start using it...

+

+ We've created an account for you to use: +
+ username: +
+ password: +
+
+ Save this information in a safe place, or change your admin password + right away! +

+ + +

Start using Gallery

+ 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 var 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() { -- cgit v1.2.3