]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
use the new maxNoticeLength and maxUrlLength functionality introduced in commit 14adb...
[quix0rs-gnu-social.git] / index.php
index 78c4de62a39d0361ea1eecb97536f9208f15c226..b60b5bd8c9ad2507851e53c2bc4236944c191c4e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -92,6 +92,12 @@ function handleError($error)
             || $error instanceof DB_Error
             || ($error instanceof PEAR_Exception && $error->getCode() == -24)
         ) {
+            //If we run into a DB error, assume we can't connect to the DB at all
+            //so set the current user to null, so we don't try to access the DB
+            //while rendering the error page.
+            global $_cur;
+            $_cur = null;
+
             $msg = sprintf(
                 _(
                     'The database for %s isn\'t responding correctly, '.
@@ -194,7 +200,7 @@ function checkMirror($action_obj, $args)
 
 function isLoginAction($action)
 {
-    static $loginActions =  array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds', 'otp', 'opensearch');
+    static $loginActions =  array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds', 'otp', 'opensearch', 'rsd');
 
     $login = null;