X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-admins.php;h=8fb79f24aedeb6018802b1d945daccc95de431af;hb=e4bb9dcc763483e7cc6a11d57cad79cf2425cc6d;hp=4ddb55bdc59208c1883406e4799b89dfeb3d75b1;hpb=7fabfadce30a7bea7ce3ad1f1e2e7e5e616f2669;p=mailer.git diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 4ddb55bdc5..8fb79f24ae 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`"); + 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."); @@ -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,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("Standartwert 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