X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-mediadata.php;h=5f061e8543977218abf852b3ea333199ca177edf;hb=b38ad6ba590c952cfe839d11d467c41a8bfe4748;hp=04aa11893960d0d222468d0a9af5aa7586f9c950;hpb=5cbe0f6707ac473dc2ba431236bc4a6e2600a699;p=mailer.git diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 04aa118939..5f061e8543 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -43,20 +43,20 @@ if (!defined('__SECURITY')) { // Version number setThisExtensionVersion('0.0.9'); -// Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); +// Version history array (add more with , '0.0.1' and so on) +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); // Keep this extension always active! setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + case 'register': // Do stuff when installation is running // SQL commands to run addExtensionSql(''); // Add the filters - registerFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); - registerFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter('post_add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter('post_sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -66,8 +66,8 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'"); // Remove the filters - unregisterFilter(__FUNCTION__, __LINE__, 'add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -100,11 +100,11 @@ switch (getExtensionMode()) { case '0.0.4': // SQL queries for v0.0.4 // SQL commands to run addDropTableSql('mediadata'); - addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_mediadata` ( + addCreateTableSql('mediadata', " `media_key` VARCHAR(255) NOT NULL DEFAULT '', `media_value` VARCHAR(255) NOT NULL DEFAULT '', -PRIMARY KEY (`media_key`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); +PRIMARY KEY (`media_key`)", + 'Media data key->value'); // Add auto-check file addIncludeToPool('extension', 'inc/gen_mediadata.php'); @@ -124,9 +124,9 @@ PRIMARY KEY (`media_key`) break; case '0.0.7': // SQL queries for v0.0.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_start` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_stage` BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"); - addAdminMenuSql('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10); + addConfigAddSql('mt_start', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addConfigAddSql('mt_stage', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 500'); + addAdminMenuSql('setup', 'config_mediadata', 'Mediendaten', 'Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Start des {?mt_word2?} und Anzahl Anmeldungen aufgenommen. (Task #13)
@@ -139,7 +139,7 @@ Bitte stellen Sie diesen derzeit manuell unter