]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-admins.php
Introduced wrapper function addCreateTableSql(), fixed parameter order:
[mailer.git] / inc / extensions / ext-admins.php
index 53996e7c995c27f770dff0a32efd34f39a3d6518..fc1a9b6e22e573df0a18601ac7c0dd352a626734 100644 (file)
@@ -103,7 +103,7 @@ switch (getExtensionMode()) {
                                // But allow current admin everything (THIS SHALL BE YOU!)
                                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `default_acl`='allow' WHERE `id`=".bigintval(getCurrentAdminId())." LIMIT 1");
                                addDropTableSql('admins_acls');
-                               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_acls` (
+                               addCreateTableSql('admins_acls', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `action_menu` VARCHAR(255) NOT NULL DEFAULT '',
@@ -111,7 +111,7 @@ switch (getExtensionMode()) {
 `access_mode` ENUM('deny','allow') NOT NULL DEFAULT 'deny',
 KEY (`admin_id`),
 PRIMARY KEY (`id`)
-) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Access control lines (ACLs)'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Sogn. ACLs werden hinzugef&uuml;gt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen k&ouml;nnen, was welcher Admin machen darf oder nicht. <strong>Nur Sie haben momentan Vollzugriff auf den Adminbereich.</strong>");
@@ -123,13 +123,13 @@ PRIMARY KEY (`id`)
 
                        case '0.4.0': // SQL queries for v0.4.0
                                addDropTableSql('admins_mails');
-                               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_mails` (
+                               addCreateTableSql('admins_mails', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `mail_template` VARCHAR(255) NOT NULL,
 KEY (`admin_id`),
 PRIMARY KEY (`id`)
-) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Mail template -> admin connection table'");
                                addExtensionSql("INSERT INTO  `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;nnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!',5)");
 
                                // Update notes (these will be set as task text!)