diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-10 22:00:14 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-10 22:00:14 +0000 |
commit | 144f8c342b35b8940b93e5934f0c149266f5c313 (patch) | |
tree | df5abc5b8a6aa6fd351052efc21b0bfa258ea0e9 /installer/views | |
parent | 15c25d85ece4fa53d5b3ec35e3e564133a328648 (diff) |
Change the format of the internal error messages and pretty print the installation parameters
Diffstat (limited to 'installer/views')
-rw-r--r-- | installer/views/installer.html.php | 9 | ||||
-rw-r--r-- | installer/views/installer.txt.php | 20 |
2 files changed, 15 insertions, 14 deletions
diff --git a/installer/views/installer.html.php b/installer/views/installer.html.php index fef71834..34bcb56c 100644 --- a/installer/views/installer.html.php +++ b/installer/views/installer.html.php @@ -25,15 +25,15 @@ </head> <body> - <h1>Environment Tests</h1> + <? foreach (self::$messages as $section) : ?> + <h1><?php print $section["header"] ?></h1> - <p>The following tests have been run to determine if Gallery3 will work in your environment. If any of the tests have failed, consult the - <a href="http://gallery.menalto.com">documentation</a> for more information on how to correct the problem.</p> + <p><?php print $section["description"] ?></p> <div id="tests"> <table cellspacing="0"> - <?php foreach (self::$messages as $header => $msg): ?> + <?php foreach ($section["msgs"] as $header => $msg): ?> <tr> <th><?php echo $header ?></th> @@ -44,5 +44,6 @@ <?php endforeach ?> </table> </div> + <? endforeach ?> </body> </html>
\ No newline at end of file diff --git a/installer/views/installer.txt.php b/installer/views/installer.txt.php index 5c98752f..3b6f0512 100644 --- a/installer/views/installer.txt.php +++ b/installer/views/installer.txt.php @@ -27,17 +27,17 @@ function print_msg($header, $msg, $error) { } } -echo "+", str_repeat("-", 98), "+\n"; -printf("| %-96.96s |\n", "Environment Tests"); -printf("| %-96.96s |\n", "The following tests have been run to determine if Gallery3 will work " . - "in your environment."); -printf("| %-96.96s |\n", "If any of the tests have failed, consult the documention on " . - "http://gallery.menalto.com"); -printf("| %-96.96s |\n", "for more information on how to correct the problem."); -echo "+", str_repeat("-", 98), "+\n"; +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 (self::$messages as $header => $msg) { - print_msg($header, $msg["text"], $msg["error"]); + foreach ($section["msgs"] as $header => $msg) { + print_msg($header, $msg["text"], $msg["error"]); + } } echo "+", str_repeat("-", 98), "+\n"; |