]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-wernis.php
Extension ext-forced continued, 'earnings' are now in one menu block:
[mailer.git] / inc / extensions / ext-wernis.php
index 1de221578ffa94397a55f47743db46025075b59c..4a901fde259ebe6c753dc57b7ccaaa779a162559 100644 (file)
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -51,19 +49,19 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3'));
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`');
+               addDropTableSql('user_wernis');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_wernis` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-wernis_account VARCHAR(255) NOT NULL DEFAULT '',
-wernis_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
-wernis_timestamp VARCHAR(10) NOT NULL DEFAULT 0,
-wernis_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED',
-wernis_api_message TINYTEXT,
-wernis_api_status VARCHAR(255) NULL DEFAULT NULL,
-KEY (userid),
-PRIMARY KEY (id)
-) TYPE={?_TABLE_TYPE?}");
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`wernis_account` VARCHAR(255) NOT NULL DEFAULT '',
+`wernis_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+`wernis_timestamp` VARCHAR(10) NOT NULL DEFAULT 0,
+`wernis_type` ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED',
+`wernis_api_message` TINYTEXT,
+`wernis_api_status` VARCHAR(255) NULL DEFAULT NULL,
+INDEX (`userid`),
+PRIMARY KEY (`id`)
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
 
                // Confiuration
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
@@ -89,7 +87,7 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`');
+               addDropTableSql('user_wernis');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='wernis'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='wernis'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='wernis_portal'");
@@ -142,7 +140,7 @@ PRIMARY KEY (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