X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-order.php;h=37854c2fc62c6d15afe07c5f5e8f4f593e30ab8c;hb=0187fd5903cddd98c2152dbb4c84da58e5083303;hp=736b48c2706fffabe13ef8109130a90c7b0f4870;hpb=c3f2beb3f1d47c9593d262d7f5dac47640b4aa52;p=mailer.git diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 736b48c270..37854c2fc6 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -299,7 +300,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case '0.5.0': // SQL queries for v0.5.0 - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -329,7 +330,7 @@ INDEX (`pool_id`) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert."); break; - } + } // END - switch break; case 'modify': // When the extension got modified @@ -340,9 +341,10 @@ INDEX (`pool_id`) case 'init': // Do stuff when extension is initialized // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (getExtensionVersion('order') >= '0.1.1')) { + // @TODO This should be moved out to inc/reset/ + if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (isExtensionInstalledAndNewer('order', '0.1.1'))) { // Reset mail order values - $result_ext = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); + $result_ext = SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mail_orders`=0 WHERE `mail_orders` > 0', __FILE__, __LINE__); } // END - if break; @@ -350,9 +352,9 @@ INDEX (`pool_id`) break; default: // Unknown extension mode - logDebugMessage(__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 // [EOF] ?>