Skip to content

Commit

Permalink
Try to better explain why the user has been redirected
Browse files Browse the repository at this point in the history
  • Loading branch information
seblucas committed Jan 6, 2013
1 parent 024ac23 commit 48126bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public static function getDb () {
try {
self::$db = new PDO('sqlite:'. self::getDbFileName ());
} catch (Exception $e) {
header("location: checkconfig.php");
header("location: checkconfig.php?err=1");
exit();
}
}
Expand Down
18 changes: 18 additions & 0 deletions checkconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
require_once ("base.php");

header ("Content-Type:application/xhtml+xml");

$err = getURLParam ("err", -1);
$error = NULL;
switch ($err) {
case 1 :
$error = "Database error";
break;
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand All @@ -32,6 +40,16 @@
<div class="clearer" />
<div id="content" style="display: none;"></div>
<div class="entries">
<?php
if (!is_null ($error)) {
?>
<div class="entry">
<div class="entryTitle">You've been redirected because COPS is not configured properly</div>
<div class="entryContent"><?php echo $error ?></div>
</div>
<?php
}
?>
<div class="entry">
<div class="entryTitle">Check if GD is properly installed and loaded</div>
<div class="entryContent">
Expand Down

0 comments on commit 48126bc

Please sign in to comment.