public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] Minor changes
cbe4f4ce
data/web/inc/init_db.inc.php | 15 ++++++++++++++-
data/web/inc/prerequisites.inc.php | 6 ++++++
2 files changed, 20 insertions(+), 1 deletion(-)
Diff
diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php
index 1027f0aa..02813ece 100644
--- a/data/web/inc/init_db.inc.php
+++ b/data/web/inc/init_db.inc.php
@@ -3,7 +3,7 @@ function init_db_schema() {
try {
global $pdo;
- $db_version = "01122019_0755";
+ $db_version = "28012020_0755";
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@@ -483,6 +483,19 @@ function init_db_schema() {
),
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
),
+ "quota2replica" => array(
+ "cols" => array(
+ "username" => "VARCHAR(255) NOT NULL",
+ "bytes" => "BIGINT(20) NOT NULL DEFAULT '0'",
+ "messages" => "BIGINT(20) NOT NULL DEFAULT '0'"
+ ),
+ "keys" => array(
+ "primary" => array(
+ "" => array("username")
+ )
+ ),
+ "attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
+ ),
"domain_admins" => array(
"cols" => array(
"id" => "INT NOT NULL AUTO_INCREMENT",
diff --git a/data/web/inc/prerequisites.inc.php b/data/web/inc/prerequisites.inc.php
index a90c54c5..46f902e6 100644
--- a/data/web/inc/prerequisites.inc.php
+++ b/data/web/inc/prerequisites.inc.php
@@ -1,4 +1,10 @@
<?php
+
+// Slave does not serve UI
+if (!preg_match('/y|yes/i', getenv('MASTER'))) {
+ header('Location: /SOGo', true, 307);
+}
+
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';
$default_autodiscover_config = $autodiscover_config;