X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-yoomedia.php;h=534be3b12d5e7959b840b009c858dd28e12b40f2;hb=6560179e7c8dc565485503f374d4e31f333ffd0e;hp=8293a9d1791ff33aaa156f27946ea6eff47a17db;hpb=d62df0eac5b75cb89772779333ecdba9bc8ed5d9;p=mailer.git diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index 8293a9d179..534be3b12d 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -1,7 +1,7 @@ Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10); + addAdminMenuSql('setup', 'config_yoomedia', 'Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie Affiliate-Id, Interface-Passwort und vieles mehr.',17); + addAdminMenuSql('email', 'list_yoomedia_tm', 'Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10); // Reload lock table - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); - addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_yoomedia_reload` ( + addDropTableSql('yoomedia_reload'); + addCreateTableSql('yoomedia_reload', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0, `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), -UNIQUE `y_type` (`type`,`y_id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Reload lock reminder for Yoo!Media campaigns'"); +UNIQUE INDEX `y_type` (`type`,`y_id`)", + 'Reload lock reminder for Yoo!Media campaigns'); break; case 'remove': // Do stuff when removing extension // SQL commands to run addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); + addDropTableSql('yoomedia_reload'); break; case 'activate': // Do stuff when admin activates this extension @@ -114,7 +113,7 @@ UNIQUE `y_type` (`type`,`y_id`) 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 @@ -123,14 +122,15 @@ UNIQUE `y_type` (`type`,`y_id`) $GLOBALS['translation_tables']['yoomedia'] = array( // Error messages 'error_codes' => array( - 1 => 'wrong_pass', - 2 => 'wrong_sid', - 3 => 'website_locked', - 4 => 'api_data_error', - 5 => 'requests_depleted', - 6 => 'zero_result', - 7 => 'no_campaigns_with_interface', - 10 => 'incomplete_request' + -999 => 'unknown_error', + 1 => 'wrong_pass', + 2 => 'wrong_sid', + 3 => 'website_locked', + 4 => 'api_data_error', + 5 => 'requests_depleted', + 6 => 'zero_result', + 7 => 'no_campaigns_with_interface', + 10 => 'incomplete_request' ), // For text mails 'textmail' => array( @@ -146,7 +146,7 @@ UNIQUE `y_type` (`type`,`y_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; }