Try to better explain why the user has been redirected

This commit is contained in:
Sébastien Lucas 2013-01-06 09:49:05 +01:00
parent 024ac23fbd
commit 48126bcad7
2 changed files with 19 additions and 1 deletions

View file

@ -463,7 +463,7 @@ abstract class Base
try { try {
self::$db = new PDO('sqlite:'. self::getDbFileName ()); self::$db = new PDO('sqlite:'. self::getDbFileName ());
} catch (Exception $e) { } catch (Exception $e) {
header("location: checkconfig.php"); header("location: checkconfig.php?err=1");
exit(); exit();
} }
} }

View file

@ -12,6 +12,14 @@
header ("Content-Type:application/xhtml+xml"); 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"> <!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="fr" lang="fr"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
@ -32,6 +40,16 @@
<div class="clearer" /> <div class="clearer" />
<div id="content" style="display: none;"></div> <div id="content" style="display: none;"></div>
<div class="entries"> <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="entry">
<div class="entryTitle">Check if GD is properly installed and loaded</div> <div class="entryTitle">Check if GD is properly installed and loaded</div>
<div class="entryContent"> <div class="entryContent">