diff options
author | Robert Treat | 2010-01-09 21:19:16 +0000 |
---|---|---|
committer | Robert Treat | 2010-01-09 21:19:16 +0000 |
commit | a6371a7d834bcdafd64e796e67bf12a603d75d74 (patch) | |
tree | 00d0e59180dbf30d89e7e72bbfedd880d171c6cc | |
parent | 4ad40ce109ecd2342c7f9cdc35e37e463249058e (diff) |
out error messages in monospaced fonts, so that pg's error pointer to align properly with the error. per gripe from Philippe Cloutier
-rw-r--r-- | classes/Misc.php | 5 | ||||
-rw-r--r-- | libraries/errorhandler.inc.php | 2 | ||||
-rw-r--r-- | themes/default/global.css | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/classes/Misc.php b/classes/Misc.php index 08d4f6e5..35d75254 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -157,6 +157,11 @@ $class = 'pre'; $out = $data->escapeBytea($str); break; + case 'errormsg': + $tag = 'pre'; + $class = 'error'; + $out = htmlspecialchars($str); + break; case 'pre': $tag = 'pre'; $out = htmlspecialchars($str); diff --git a/libraries/errorhandler.inc.php b/libraries/errorhandler.inc.php index 6f17cc45..fd9420be 100644 --- a/libraries/errorhandler.inc.php +++ b/libraries/errorhandler.inc.php @@ -28,7 +28,7 @@ function Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false) $sql = $p1; $inputparams = $p2; - $s = "<p><b>{$lang['strsqlerror']}</b><br />" . $misc->printVal($errmsg) . "</p> + $s = "<p><b>{$lang['strsqlerror']}</b><br />" . $misc->printVal($errmsg,'errormsg') . "</p> <p><b>{$lang['strinstatement']}</b><br />" . $misc->printVal($sql) . "</p> "; echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table><br />\n"; diff --git a/themes/default/global.css b/themes/default/global.css index 1584a9df..90e8282d 100644 --- a/themes/default/global.css +++ b/themes/default/global.css @@ -359,6 +359,12 @@ pre.data font-size: 100%; } +pre.error +{ + font-family: "Lucida Console", "Courier New", "DejaVu Sans Mono", monospace; + font-size: 120%; +} + .intro li { font-weight: bold; @@ -449,4 +455,4 @@ pre.data white-space:pre; } .ac_values {width:100%} -.ac_field {border:1px solid #D9D95F}
\ No newline at end of file +.ac_field {border:1px solid #D9D95F} |