[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:
André
2018-08-13 23:20:40 +02:00
parent d5e81b987b
commit a11cce6765
30 changed files with 2720 additions and 3529 deletions

View File

@@ -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) {