X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-admins.php;h=53996e7c995c27f770dff0a32efd34f39a3d6518;hp=bfc09b6b4e8368021c7db6f897cd1761907d3d41;hb=b8e38719844932afed4b1ac23755a4c05b72eb99;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index bfc09b6b4e..53996e7c99 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,18 +122,18 @@ PRIMARY KEY (`id`) break; case '0.4.0': // SQL queries for v0.4.0 - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`"); + addDropTableSql('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."); + setExtensionUpdateNotes("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standardmässig wird weiter an alle versendet."); break; case '0.4.1': // SQL queries for v0.4.1 @@ -274,23 +276,26 @@ 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."); break; 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 NULL DEFAULT NULL"); + // Update notes (these will be set as task text!) setExtensionUpdateNotes("Veraltetes Update."); break; 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."); @@ -305,20 +310,52 @@ 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("Standardwert ist nicht mehr 0000-00-00 00:00:00, sondern NULL."); + break; } // END - switch break; case 'modify': // When the extension got modified break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + case 'test': // For testing purposes break; case 'init': // Do stuff when extension is initialized 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