Marked some unfinished extensions as 'work-in-progress'
[mailer.git] / inc / extensions / ext-doubler.php
index 19849d3e9c21d03daef020519dd83938db7a2b5b..088190a19e7c8f270092a3c4cd5b933f04a3b3f2 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 02/03/2005 *
- * ================                             Last change: 02/03/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 02/03/2005 *
+ * ===================                          Last change: 02/03/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-doubler.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 *
@@ -52,18 +53,18 @@ switch (getExtensionMode()) {
                // Doubler table
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_doubler` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
-remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
-timemark VARCHAR(10) NOT NULL DEFAULT '',
-completed ENUM('Y','N') NOT NULL DEFAULT 'N',
-is_ref ENUM('Y','N') NOT NULL DEFAULT 'N',
-KEY (refid),
-KEY (userid),
-PRIMARY KEY (id)
-)TYPE=MYISAM");
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+`remote_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
+`timemark` VARCHAR(10) NOT NULL DEFAULT '',
+`completed` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`is_ref` ENUM('Y','N') NOT NULL DEFAULT 'N',
+KEY (`refid`),
+KEY (`userid`),
+PRIMARY KEY (`id`)
+)TYPE={?_TABLE_TYPE?}");
 
                //
                // --- SETTINGS ---
@@ -73,7 +74,7 @@ PRIMARY KEY (id)
                // Maximum points to double
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
                // Points left on users account after doubling
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_left2 BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
                // Charge for doubling points which goes to the webmaster (shreddered in fact!)
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
                // Referal percents
@@ -243,7 +244,7 @@ PRIMARY KEY (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;
 }