summaryrefslogtreecommitdiff
path: root/installer/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-19 03:31:13 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-19 03:31:13 +0000
commit46d010e89d280d391935648f1f713fc784042050 (patch)
tree0d887e6ab08867821546de8463883baaf2dd305b /installer/views
parentad71e4263ef61efa0720ea6f08d6a9c582684c9b (diff)
Simplification pass over the installer:
- Flattened the directory structure - Greatly simplified structure in installer; it now only reports environmental checks that fail. Simplified code that prints exceptions. Use only mysql calls for the installer, but select mysqli automatically if it's available. Drop the response file; that's easily replicated with flag support - Create a random password for the admin user - Delete unused controllers - Invert the form of the database config template to be mostly non-PHP with just a few PHP calls
Diffstat (limited to 'installer/views')
-rw-r--r--installer/views/database.php.php44
-rw-r--r--installer/views/installer.html.php49
-rw-r--r--installer/views/installer.txt.php51
3 files changed, 0 insertions, 144 deletions
diff --git a/installer/views/database.php.php b/installer/views/database.php.php
deleted file mode 100644
index 42268422..00000000
--- a/installer/views/database.php.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php defined('SYSPATH') OR die('No direct access allowed.');
-print "<?php defined('SYSPATH') OR die('No direct access allowed.');\n";
-print "/**\n";
-print " * @package Database\n";
-print " *\n";
-print " * Database connection settings, defined as arrays, or \"groups\". If no group\n";
-print " * name is used when loading the database library, the group named \"default\"\n";
-print " * will be used.\n";
-print " *\n";
-print " * Each group can be connected to independently, and multiple groups can be\n";
-print " * connected at once.\n";
-print " *\n";
-print " * Group Options:\n";
-print " * benchmark - Enable or disable database benchmarking\n";
-print " * persistent - Enable or disable a persistent connection\n";
-print " * connection - Array of connection specific parameters; alternatively,\n";
-print " * you can use a DSN though it is not as fast and certain\n";
-print " * characters could create problems (like an '@' character\n";
-print " * in a password):\n";
-print " * 'connection' => 'mysql://dbuser:secret@localhost/kohana'\n";
-print " * character_set - Database character set\n";
-print " * table_prefix - Database table prefix\n";
-print " * object - Enable or disable object results\n";
-print " * cache - Enable or disable query caching\n";
-print " * escape - Enable automatic query builder escaping\n";
-print " */\n";
-print "\$config['default'] = array(\n";
-print " 'benchmark' => FALSE,\n";
-print " 'persistent' => FALSE,\n";
-print " 'connection' => array(\n";
-print " 'type' => '{$data['type']}',\n";
-print " 'user' => '{$data['user']}',\n";
-print " 'pass' => '{$data['password']}',\n";
-print " 'host' => '{$data['host']}',\n";
-print " 'port' => FALSE,\n";
-print " 'socket' => FALSE,\n";
-print " 'database' => '{$data['database']}'\n";
-print " ),\n";
-print " 'character_set' => 'utf8',\n";
-print " 'table_prefix' => '{$data['prefix']}',\n";
-print " 'object' => TRUE,\n";
-print " 'cache' => FALSE,\n";
-print " 'escape' => TRUE\n";
-print ");\n";
diff --git a/installer/views/installer.html.php b/installer/views/installer.html.php
deleted file mode 100644
index 43692846..00000000
--- a/installer/views/installer.html.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
-
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
- <title>Gallery3 Requirements Verification</title>
-
- <style type="text/css">
- body { width: 42em; margin: 0 auto; font-family: sans-serif; font-size: 90%; }
-
- #tests table { border-collapse: collapse; width: 100%; }
- #tests table th,
- #tests table td { padding: 0.2em 0.4em; text-align: left; vertical-align: top; }
- #tests table th { width: 12em; font-weight: normal; font-size: 1.2em; }
- #tests table tr:nth-child(odd) { background: #eee; }
- #tests table td.pass { color: #191; }
- #tests table td.fail { color: #911; }
- #tests #results { color: #fff; }
- #tests #results p { padding: 0.8em 0.4em; }
- #tests #results p.pass { background: #191; }
- #tests #results p.fail { background: #911; }
- </style>
-
- </head>
- <body>
- <?php foreach (self::$messages as $section) : ?>
- <h1><?php print $section["header"] ?></h1>
-
- <p><?php print $section["description"] ?></p>
-
- <div id="tests">
-
- <table cellspacing="0">
- <?php foreach ($section["msgs"] as $header => $msg): ?>
-
- <tr>
- <th><?php echo $header ?></th>
- <td class="<?php echo empty($msg["error"]) ? "pass" : "fail" ?>">
- <?php echo empty($msg["html"]) ? $msg["text"] : $msg["html"] ?>
- </td>
- </tr>
- <?php endforeach ?>
- </table>
- </div>
- <?php endforeach ?>
- </body>
- </html> \ No newline at end of file
diff --git a/installer/views/installer.txt.php b/installer/views/installer.txt.php
deleted file mode 100644
index 986b9297..00000000
--- a/installer/views/installer.txt.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<?php
-function green_start() {
- return "\x1B[32m";
-}
-
-function color_end() {
- return "\x1B[0m";
-}
-
-function red_start() {
- return "\x1B[31m";
-}
-
-function magenta_start() {
- return "\x1B[35m";
-}
-
-function print_msg($header, $msg, $error) {
- $format = "| %-21.21s | %-81.81s |\n";
- foreach (explode("\n", wordwrap($msg, 72)) as $text) {
- if ($error) {
- printf($format, $header, red_start() . $text . color_end());
- } else {
- printf($format, $header, green_start() . $text . color_end());
- }
- $header = "";
- }
-}
-
-foreach (self::$messages as $section) {
- echo "+", str_repeat("-", 98), "+\n";
- printf("| %-96.96s |\n", $section["header"]);
- foreach (explode("\n", wordwrap($section["description"], 92)) as $text) {
- printf("| %-96.96s |\n", $text);
- }
- echo "+", str_repeat("-", 98), "+\n";
-
- foreach ($section["msgs"] as $header => $msg) {
- print_msg($header, $msg["text"], $msg["error"]);
- }
-}
-
-echo "+", str_repeat("-", 98), "+\n";
-
-if (self::$config_errors) {
- printf("| %-96.96s |\n", magenta_start() .
- "Please fix the identified issues before attempting the install" . color_end());
- echo "+", str_repeat("-", 98), "+\n";
-}
-flush(); \ No newline at end of file