X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-booking.php;h=d77204cdb31ac7d6b027e508c8ad811118ac9ff6;hp=20c60dd08f81608b0ee6402db4fbb783faecf902;hb=ee3a0b42f93de7676fca549c866c1c2e6f3f0576;hpb=180f978ebe21d5fcec3a51be8405028e7523e6a9 diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 20c60dd08f..d77204cdb3 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.0'); +setThisExtensionVersion('0.0.0'); -// Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0')); +// 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); @@ -52,33 +52,33 @@ enableExtensionProductive(false); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running // Configuration entries - addConfigAddSql('booking_per_page', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); + addConfigAddSql('booking_page_count', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3)); // Drop/create table for user bookings addDropTableSql('user_booking'); - addCreateTableSql('user_booking', "( + addCreateTableSql('user_booking', " `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_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`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Member points booking table'"); +PRIMARY KEY (`id`), +INDEX (`userid`)", + 'Member points booking table'); // Admin menu addAdminMenuSql('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14); 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); + addMemberMenuSql('main', 'booking', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Kontoauszug', 5); // Add the filters registerFilter('post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); - registerFilter('sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); + registerFilter('post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -88,17 +88,17 @@ PRIMARY KEY (`id`) // Remove the filters unregisterFilter(__FUNCTION__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='booking' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N',`locked`='Y' WHERE `what`='booking' LIMIT 1"); break; case 'update': // Update an extension