diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-11 14:45:06 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-11 14:45:06 -0500 |
commit | b5cc7e4aabeddd08a27e02b2249ce86f92f96fac (patch) | |
tree | eb3e1202b189e1dbb0c69d65a83fc8169f32d3e6 /lib/htmloutputter.php | |
parent | 22b10399aaa97061ed940f92f5b15f6aacfb1093 (diff) |
Handle DB_DataObject errors better
We try to handle DB_DataObject errors a little bit better. Previously,
they just spit out a cryptic string to the browser with a suggestion
to turn on debugging (not a good idea!). So, we catch the error, write
the full error message to the log, and then tell users that the can
contact the admins if they need to.
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r-- | lib/htmloutputter.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index e2319b1fd..45e61d2fc 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -108,22 +108,26 @@ class HTMLOutputter extends XMLOutputter } header('Content-Type: '.$type); - + $this->extraHeaders(); $this->startXML('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); - // FIXME: correct language for interface - - $language = common_language(); + $language = $this->getLanguage(); $this->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', 'xml:lang' => $language, 'lang' => $language)); } + function getLanguage() + { + // FIXME: correct language for interface + return common_language(); + } + /** * Ends an HTML document * @@ -134,7 +138,7 @@ class HTMLOutputter extends XMLOutputter $this->elementEnd('html'); $this->endXML(); } - + /** * To specify additional HTTP headers for the action * |