|| $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, '.
function isLoginAction($action)
{
- static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds');
+ static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds', 'otp');
$login = null;