out error messages in monospaced fonts, so that pg's error pointer to align properly...
authorRobert Treat <robert@robert-treats-macbook.local>
Sat, 9 Jan 2010 21:19:16 +0000 (16:19 -0500)
committerRobert Treat <robert@robert-treats-macbook.local>
Sat, 9 Jan 2010 21:19:16 +0000 (16:19 -0500)
classes/Misc.php
libraries/errorhandler.inc.php
themes/default/global.css

index 08d4f6e539854d1223d261a4ebb26497ade8ea63..35d7525486b99fd641341ee8c3823683e517531d 100644 (file)
                                        $class = 'pre';
                                        $out = $data->escapeBytea($str);
                                        break;
+                               case 'errormsg':
+                                       $tag = 'pre';
+                                       $class = 'error';
+                                       $out = htmlspecialchars($str);
+                                       break;
                                case 'pre':
                                        $tag = 'pre';
                                        $out = htmlspecialchars($str);
index 6f17cc454feaac152be7b7b4cc61717adc26750a..fd9420be3721245159f0f03f61cb0efa0a3b79c6 100644 (file)
@@ -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";
index 1584a9df733808f303d26126ac32d142d3c2b012..90e8282d4a8780a0ddfe98857363caeb901d693b 100644 (file)
@@ -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}