X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-booking.php;h=30183f9999817fcd52b2f4dd150235b3c319aa7a;hp=a6a8995fd9146d74b5f1d57edf548d6481ec507d;hb=16b311c338bb4f8436e2ed9e76cb1cd5f3741640;hpb=4f089d36fcc801992932f3a1f47ab139b573a38d diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index a6a8995fd9..30183f9999 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.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 * @@ -55,23 +53,25 @@ switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Configuration entries addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 3).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 3).""); // Drop/create table for user bookings - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`'); + addDropTableSql('user_book'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_book`( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', `mode` ENUM('add','sub') NOT NULL DEFAULT 'add', `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, +`comments` TINYTEXT NULL DEFAULT NULL, +`recorded` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, INDEX (`userid`), PRIMARY KEY (`id`) -) TYPE={?_TABLE_TYPE?} COMMENT='Member points booking table'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Member points booking table'"); // Admin menu addAdminMenuSql('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14); - addAdminMenuSql('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10); + addAdminMenuSql('user','list_booking','Kontoauszüge','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10); // Member menu addMemberMenuSql('main','booking','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Kontoauszug','N','Y',5); @@ -82,7 +82,7 @@ PRIMARY KEY (`id`) break; case 'remove': // Do stuff when removing extension - addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`'); + addDropTableSql('user_book'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_booking','list_booking')"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'"); @@ -109,12 +109,12 @@ PRIMARY KEY (`id`) // Update notes (these will be set as task text!) setExtensionUpdateNotes(''); break; - } + } // END - switch 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 @@ -123,7 +123,7 @@ PRIMARY KEY (`id`) default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?>