X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fextensions%2Fext-transfer.php;h=bfa708f1ccb25ed4de8a9d02f7aaa3245ae87537;hb=16b311c338bb4f8436e2ed9e76cb1cd5f3741640;hp=1b3aee19e93ab523e36bc66a5d2cfb1a5363c0ba;hpb=ff9e8f739bd4b6e184b2a6bf427334196e501da8;p=mailer.git diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 1b3aee19e9..bfa708f1cc 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -14,11 +14,9 @@ * $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 * @@ -50,11 +48,8 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running - // SQL commands to run - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`'); - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`'); - // Transfer from a member + addDropTableSql('user_transfers_in'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_in` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -66,9 +61,10 @@ switch (getExtensionMode()) { KEY (`userid`), KEY (`from_userid`), PRIMARY KEY (`id`) -) Type={?_TABLE_TYPE?}"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Transfers to a member + addDropTableSql('user_transfers_out'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_out` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -80,7 +76,7 @@ PRIMARY KEY (`id`) KEY (`userid`), KEY (`to_userid`), PRIMARY KEY (`id`) -) Type={?_TABLE_TYPE?}"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Admin menu addAdminMenuSql('transfer', NULL, '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','Verwalten Sie hier die {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transaktionen zwischen Ihren Mitgliedern.', 7); @@ -93,7 +89,7 @@ PRIMARY KEY (`id`) // Add config values addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT 50"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_age` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*28)); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_age` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*28)); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_balance` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_code` BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); @@ -104,8 +100,8 @@ PRIMARY KEY (`id`) case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`'); - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`'); + addDropTableSql('user_transfers_in'); + addDropTableSql('user_transfers_out'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='transfer'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='transfer'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `opt_in`"); @@ -125,7 +121,7 @@ PRIMARY KEY (`id`) switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227
behoben."); + setExtensionUpdateNotes("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227
behoben."); break; case '0.0.3': // SQL queries for v0.0.3 @@ -236,7 +232,7 @@ PRIMARY KEY (`id`) addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('config', '', 'config_transfer')"); // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Erweiterung in's neue Menüsystem integriert."); @@ -279,7 +275,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': // When extension is initialized