Introduced wrapper function addCreateTableSql(), fixed parameter order:
[mailer.git] / inc / extensions / ext-coupon.php
index 8c87f9ab67ca347f21b5bd0dddd6368c6126164f..f173b2c4f8261f639cc7b1a02b017263d9675071 100644 (file)
@@ -55,7 +55,7 @@ switch (getExtensionMode()) {
        case 'register': // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
                // Coupon data
                addDropTableSql('coupons');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_coupons` (
+               addCreateTableSql('coupons', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `timestamp_created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
 `timestamp_expired` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -70,7 +70,7 @@ UNIQUE KEY (`coupon_code`)
 
                // Coupon->user connection table
                addDropTableSql('user_coupons');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_coupons` (
+               addCreateTableSql('coupons', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `coupon_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `userid` BIGINT(2) UNSIGNED NOT NULL DEFAULT 0,