X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-booking.php;h=4abbcde976875ce5d1c6c8cce07342c1bd2509f8;hb=99966a712b3b3d8b521524762e153353d1d20bd4;hp=827d4151bfcffea35a7e5f9a10c4650a5e5f07cf;hpb=596c8ab32594401ca84abfbfe35513ddfff31bec;p=mailer.git diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 827d4151bf..4abbcde976 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,16 +41,14 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.0.0'); +setThisExtensionVersion('0.0.1'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0')); - -// This extension is in development (non-productive) -enableExtensionProductive(FALSE); +setExtensionVersionHistory(array('0.0.0', '0.0.1')); +// Check extension load-mode switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running + case 'setup': // Do stuff when installation is running // Configuration entries addConfigAddSql('booking_page_count', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3)); @@ -58,14 +56,15 @@ switch (getExtensionMode()) { // Drop/create table for user bookings addDropTableSql('user_booking'); addCreateTableSql('user_booking', " -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`booking_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', `points_mode` ENUM('ADD','SUB') NOT NULL DEFAULT 'ADD', +`points_account_type` VARCHAR(255) NOT NULL DEFAULT 'INVALID', `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, `comments` TINYTEXT NULL DEFAULT NULL, `recorded` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (`id`), +PRIMARY KEY (`booking_id`), INDEX (`userid`)", 'Member points booking table'); @@ -106,10 +105,10 @@ INDEX (`userid`)", case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql(''); + addExtensionChangeTableColumnSql('user_booking', 'id', 'booking_id', 'BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT'); // Update notes (these will be set as task text!) - setExtensionUpdateNotes(''); + setExtensionUpdateNotes("Spalte idbooking_id, da id zu allgemein ist (sollte am besten überall folgen)."); break; } // END - switch @@ -123,7 +122,7 @@ INDEX (`userid`)", break; default: // Unknown extension mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch