X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-admins.php;h=5657dcff112718c15f7d24ef75f4882e7f02b8f3;hp=7bf9ef602821141a5818a53f709a1ece5de38af0;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hpb=8268379f7f0f38f5cd605714ecd5cbfacff0e282 diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 7bf9ef6028..5657dcff11 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -1,7 +1,7 @@ Access Control Lines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht. Nur Sie haben momentan Vollzugriff auf den Adminbereich."); @@ -120,15 +122,15 @@ PRIMARY KEY (`id`) break; case '0.4.0': // SQL queries for v0.4.0 - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_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) -) TYPE={?_TABLE_TYPE?}"); - 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önnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"); +`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"); + 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önnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!',5)"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."); @@ -274,7 +276,7 @@ PRIMARY KEY (id) break; case '0.6.9': // SQL queries for v0.6.9 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Admin-Management' WHERE `action`='admins' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Verwaltung nach Management umbenannt."); @@ -282,7 +284,7 @@ PRIMARY KEY (id) case '0.7.0': // SQL queries for v0.7.0 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `login_failtures` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `last_failture` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `last_failture` TIMESTAMP NULL DEFAULT NULL"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Veraltetes Update."); @@ -290,10 +292,10 @@ PRIMARY KEY (id) case '0.7.1': // SQL queries for v0.7.1 // Update depends on sql_patches - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Add filters - registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, getExtensionDryRun()); + registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -308,6 +310,38 @@ PRIMARY KEY (id) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Schreibweise korregiert."); break; + + case '0.7.3': // SQL queries for v0.7.3 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `expert_settings` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `expert_warning` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Experten-Einstellungen sind nun hinzugekommen."); + break; + + case '0.7.4': // SQL queries for v0.7.4 + // Add filter + registerFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, isExtensionDryRun()); + registerFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter hinzugefuegt."); + break; + + case '0.7.5': // SQL queries for v0.7.5 + // Add filter + registerFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter hinzugefuegt."); + break; + + case '0.7.6': // SQL queries for v0.7.6 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Standartwert ist nicht mehr 0000-00-00 00:00:00, sondern NULL."); + break; } // END - switch break; @@ -321,7 +355,7 @@ PRIMARY KEY (id) break; default: // Unknown extension mode - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; } // END - switch