From 0e2978ef48e7877ee46aa4a9e52e86b8f76c9733 Mon Sep 17 00:00:00 2001
From: Dominik Müller <info@profi-webdesign.net>
Date: Sat, 18 Jan 2014 23:34:06 -0500
Subject: [PATCH] Mailbox quota can now be included into website quota (FS#3297) -------------------------------------------------------------- Feature can be activated over admin mailserver settings. when activated websites uid is used instead of standard vmail-uid. this only takes effect if web and mailserver are on the same server, otherwise it will be old behaviour. switching this setting when mailboxes exist doesn't matter. Mailboxfolder will be created with website uid for this. access of postfix and dovecot now works over mysql-table mail_user. virtual_uid_maps is changed from static to mysql-table. for dovecot<->postfix communication protocoll is changed vrom lda to lmtp. disablelmtp-column is added to mail_user-table. uid and gid can be overwritten by remoting. ONE OPEN ISSUE: since remoting has completly changed and mail_user_add function is missing at the moment, this function now was inclulded again. it is important to add the both new lines to the future function and then remove this new one.
---
interface/web/admin/form/dbsync.tform.php | 326 ++++++++++++++++++++++++++---------------------------
1 files changed, 160 insertions(+), 166 deletions(-)
diff --git a/interface/web/admin/form/dbsync.tform.php b/interface/web/admin/form/dbsync.tform.php
index 9199a52..8a4181b 100644
--- a/interface/web/admin/form/dbsync.tform.php
+++ b/interface/web/admin/form/dbsync.tform.php
@@ -34,9 +34,9 @@
Tabellendefinition
Datentypen:
- - INTEGER (Wandelt Ausdr�cke in Int um)
+ - INTEGER (Wandelt Ausdr�cke in Int um)
- DOUBLE
- - CURRENCY (Formatiert Zahlen nach W�hrungsnotation)
+ - CURRENCY (Formatiert Zahlen nach W�hrungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
@@ -55,216 +55,210 @@
- Wert oder Array
Hinweis:
- Das ID-Feld ist nicht bei den Table Values einzuf�gen.
+ Das ID-Feld ist nicht bei den Table Values einzuf�gen.
*/
-// lese Module aus
+//* Load modules
$modules_list = array();
-$handle = @opendir($conf["rootpath"]."/web");
-while ($file = @readdir ($handle)) {
- if ($file != "." && $file != "..") {
- if(@is_dir($conf["rootpath"]."/web/".$file)) {
- if(is_file($conf["rootpath"]."/web/".$file."/lib/module.conf.php") and $file != 'login') {
+$handle = @opendir(ISPC_WEB_PATH);
+while ($file = @readdir($handle)) {
+ if ($file != "." && $file != "..") {
+ if(@is_dir(ISPC_WEB_PATH."/$file")) {
+ if(is_file(ISPC_WEB_PATH."/$file/lib/module.conf.php") and $file != 'login') {
$modules_list[$file] = $file;
}
- }
+ }
}
}
closedir($handle);
-// lese Datenbanken mit aktivierter db_history ein.
+//* read data bases in with more activated db_history.
$db_tables = array();
foreach($modules_list as $md) {
- $handle = @opendir($conf["rootpath"]."/web/".$md."/form");
- while ($file = @readdir ($handle)) {
- if ($file != "." && $file != ".." && substr($file,0,1) != '.') {
- include_once($conf["rootpath"]."/web/".$md."/form/".$file);
- if($form["db_history"] == "yes") {
- $tmp_id = $form["db_table"];
- $db_tables[$tmp_id] = $form["db_table"];
+ $handle = @opendir(ISPC_WEB_PATH."/$md/form");
+ while ($file = @readdir($handle)) {
+ if ($file != '.' && $file != '..' && substr($file, 0, 1) != '.') {
+ include_once ISPC_WEB_PATH."/$md/form/$file";
+ if(isset($form['db_history']) && $form['db_history'] == 'yes') {
+ $tmp_id = $form['db_table'];
+ $db_tables[$tmp_id] = $form['db_table'];
}
unset($form);
}
}
closedir($handle);
}
-
unset($form);
+$form['title'] = 'DB sync';
+$form['description'] = 'ISPConfig database synchronisation tool.';
+$form['name'] = 'dbsync';
+$form['action'] = 'dbsync_edit.php';
+$form['db_table'] = 'sys_dbsync';
+$form['db_table_idx'] = 'id';
+$form['tab_default'] = 'dbsync';
+$form['list_default'] = 'dbsync_list.php';
+$form['auth'] = 'no';
-$form["title"] = "DB sync";
-$form["description"] = "Formular zum Anlegen von Datenbank-Synchronisierungen.";
-$form["name"] = "dbsync";
-$form["action"] = "dbsync_edit.php";
-$form["db_table"] = "sys_dbsync";
-$form["db_table_idx"] = "id";
-$form["tab_default"] = "dbsync";
-$form["list_default"] = "dbsync_list.php";
-$form["auth"] = 'no';
-
-
-
-
-
-$form["tabs"]['dbsync'] = array (
- 'title' => "DB sync",
- 'width' => 80,
- 'template' => "templates/dbsync_edit.htm",
- 'fields' => array (
- ##################################
- # Beginn Datenbankfelder
- ##################################
+$form['tabs']['dbsync'] = array (
+ 'title' => 'DB sync',
+ 'width' => 80,
+ 'template' => 'templates/dbsync_edit.htm',
+ 'fields' => array (
+ //#################################
+ // Beginn Datenbankfelder
+ //#################################
'jobname' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'regex' => '/^.{1,30}$/',
- 'errmsg' => 'jobname_err',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '15',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'regex' => '/^.{1,30}$/',
+ 'errmsg' => 'jobname_err',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '15',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'sync_interval_minutes' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '15',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '15',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_type' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => array('mysql' => 'mysql'),
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => array('mysql' => 'mysql'),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_host' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_name' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_username' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_password' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'db_tables' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOXARRAY',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => 'admin,forms',
- 'value' => $db_tables,
- 'separator' => ',',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOXARRAY',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => 'admin,forms',
+ 'value' => $db_tables,
+ 'separator' => ',',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'empty_datalog' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'CHECKBOX',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '1',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => array(0 => 0, 1 => 1),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'sync_datalog_external' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'CHECKBOX',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '',
- 'value' => '1',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '',
+ 'value' => array(0 => 0, 1 => 1),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
),
'active' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'CHECKBOX',
- 'regex' => '',
- 'errmsg' => '',
- 'default' => '1',
- 'value' => '1',
- 'separator' => '',
- 'width' => '30',
- 'maxlength' => '255',
- 'rows' => '',
- 'cols' => ''
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'CHECKBOX',
+ 'regex' => '',
+ 'errmsg' => '',
+ 'default' => '1',
+ 'value' => array(0 => 0, 1 => 1),
+ 'separator' => '',
+ 'width' => '30',
+ 'maxlength' => '255',
+ 'rows' => '',
+ 'cols' => ''
)
- ##################################
- # ENDE Datenbankfelder
- ##################################
+ //#################################
+ // ENDE Datenbankfelder
+ //#################################
)
);
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1