]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
Merge branch 'invite-enabled' of git://gitorious.org/~jeff-themovie/laconica/jeff...
[quix0rs-gnu-social.git] / index.php
index f5b32ea09086cc2e3a205404603b30553d7798a3..cb6a0fe6032677522b9cb42f1d360932f17f1fd5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
 <?php
 /**
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -48,7 +48,14 @@ function handleError($error)
         $logmsg .= " : ". $error->getDebugInfo();
     }
     common_log(LOG_ERR, $logmsg);
-    if ($error instanceof DB_DataObject_Error) {
+    if(common_config('site', 'logdebug')) {
+        $bt = $error->getBacktrace();
+        foreach ($bt as $line) {
+            common_log(LOG_ERR, $line);
+        }
+    }
+    if ($error instanceof DB_DataObject_Error ||
+        $error instanceof DB_Error) {
         $msg = sprintf(_('The database for %s isn\'t responding correctly, '.
                          'so the site won\'t work properly. '.
                          'The site admins probably know about the problem, '.