]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-rallye.php
Deprecated 'replacer' removed. Now we use EL code instead (there are a lot example...
[mailer.git] / inc / extensions / ext-rallye.php
index 6b2fb3bdf00f5c8b3a040e23f7aac624cfc7edc7..29b5030f05ff7757954eaef8d726d153a07ab85c 100644 (file)
@@ -14,8 +14,6 @@
  * $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                    *
@@ -52,41 +50,41 @@ 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?}_rallye_data`');
-               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`');
-               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_data` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-title VARCHAR(255) NOT NULL DEFAULT '',
-descr LONGTEXT NOT NULL,
-template VARCHAR(255) NOT NULL DEFAULT '',
-start_time VARCHAR(10) NOT NULL DEFAULT 0,
-end_time VARCHAR(10) NOT NULL DEFAULT 0,
-auto_add_new_user ENUM('Y','N') NOT NULL DEFAULT 'Y',
-is_active ENUM('Y','N') NOT NULL DEFAULT 'N',
-send_notify ENUM('Y','N') NOT NULL DEFAULT 'Y',
-notified ENUM('Y','N') NOT NULL DEFAULT 'N',
-KEY (admin_id),
-PRIMARY KEY (id)
-) TYPE={?_TABLE_TYPE?}");
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`title` VARCHAR(255) NOT NULL DEFAULT '',
+`descr` LONGTEXT NOT NULL,
+`template` VARCHAR(255) NOT NULL DEFAULT '',
+`start_time` VARCHAR(10) NOT NULL DEFAULT 0,
+`end_time` VARCHAR(10) NOT NULL DEFAULT 0,
+`auto_add_new_user` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`is_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`send_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`notified` ENUM('Y','N') NOT NULL DEFAULT 'N',
+KEY (`admin_id`),
+PRIMARY KEY (`id`)
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_prices` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-info LONGTEXT NOT NULL,
-KEY (rallye_id),
-PRIMARY KEY (id)
-) TYPE={?_TABLE_TYPE?}");
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`rallye_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`price_level` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`info` LONGTEXT NOT NULL,
+INDEX (`rallye_id`),
+PRIMARY KEY (`id`)
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_users` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-refs BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-KEY (rallye_id),
-KEY (userid),
-PRIMARY KEY (id)
-) TYPE={?_TABLE_TYPE?}");
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`rallye_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`refs` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`rallye_id`),
+INDEX (`userid`),
+PRIMARY KEY (`id`)
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci");
 
                // Admin menu
                addAdminMenuSql('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.',9);
@@ -309,7 +307,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
 
                        case '0.3.5': // SQL queries for 0.3.5
                                // This update depends on sql_patches
-                               addExtensionUpdateDependency('sql_patches');
+                               addExtensionDependency('sql_patches');
 
                                // Register filter
                                registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun());
@@ -317,7 +315,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
                                break;
-               }
+               } // END - switch
                break;
 
        case 'modify': // When the extension got modified