[Web] Fixes for BCC map input fields
[Web] Allow to edit alias address [Web] $_SESSION['return'] now contains arrays and allows multiple returned messages and log entries [Web] Some language string changes [Web] General SQL exception handler, remove all try catch handlers [Web] Alias table now has an ID as primary key [Web] Be more aggressive with localStorage cleaning
This commit is contained in:
@@ -51,6 +51,25 @@ catch (PDOException $e) {
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
function pdo_exception_handler($e) {
|
||||
if ($e instanceof PDOException) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__),
|
||||
'msg' => array('mysql_error', $e)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__),
|
||||
'msg' => array('mysql_error', 'unknown error')
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
set_exception_handler('pdo_exception_handler');
|
||||
|
||||
// TODO: Move function
|
||||
function get_remote_ip($anonymize = null) {
|
||||
|
Reference in New Issue
Block a user