[Web] Fix log line handling

[Web] Add mailcow UI logs
[Web] Changes to _SESSION['return'] logic and logger (more to come)
[Web] Show last login
[Web, Postfix] Allow to disable sender check completely
[Web] Many minor fixes
[Web] Update some libs
This commit is contained in:
André
2018-08-03 20:31:33 +02:00
parent bf9a180c00
commit 7f86a80670
56 changed files with 2299 additions and 784 deletions

View File

@@ -3,7 +3,7 @@ function init_db_schema() {
try {
global $pdo;
$db_version = "25072018_1129";
$db_version = "31072018_2319";
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@@ -363,6 +363,24 @@ function init_db_schema() {
),
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
),
"logs" => array(
"cols" => array(
"id" => "INT NOT NULL AUTO_INCREMENT",
"type" => "VARCHAR(32) DEFAULT ''",
"msg" => "TEXT",
"call" => "TEXT",
"user" => "VARCHAR(64) NOT NULL",
"role" => "VARCHAR(32) NOT NULL",
"remote" => "VARCHAR(32) NOT NULL",
"time" => "INT(11) NOT NULL"
),
"keys" => array(
"primary" => array(
"" => array("id")
)
),
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
),
"quota2" => array(
"cols" => array(
"username" => "VARCHAR(255) NOT NULL",
@@ -917,7 +935,8 @@ DELIMITER ;';
}
$_SESSION['return'] = array(
'type' => 'success',
'msg' => 'Database initialisation completed'
'log' => array(__FUNCTION__),
'msg' => 'db_init_complete'
);
// Fix user_acl
@@ -926,7 +945,8 @@ DELIMITER ;';
catch (PDOException $e) {
$_SESSION['return'] = array(
'type' => 'danger',
'msg' => 'Database initialisation failed: ' . $e->getMessage()
'log' => array(__FUNCTION__),
'msg' => array('mysql_error', $e)
);
}
}