<?php
/************************************************************************
- * MXChange v0.2.1 Start: 09/09/2008 *
- * ================ Last change: 09/09/2008 *
+ * Mailer v0.2.1-FINAL Start: 09/09/2008 *
+ * =================== Last change: 09/09/2008 *
* *
* -------------------------------------------------------------------- *
* File : ext-primera.php *
* $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 - 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 *
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_primera`");
+ addDropTableSql('user_primera');
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_primera` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`primera_api_status` VARCHAR(255) NULL DEFAULT NULL,
KEY (`userid`),
PRIMARY KEY (`id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Transfers in Primera'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfers in Primera'");
// Confiuration
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_min_payout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
case 'remove': // Do stuff when removing extension
// SQL commands to run
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`");
+ addDropTableSql('user_primera');
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='primera'");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='primera'");
break;
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
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;
}