Marked some unfinished extensions as 'work-in-progress'
[mailer.git] / inc / extensions / ext-newsletter.php
index 6e6d0174b12fd4a4ee61c5b06144b732bc6da71b..cc760b94aae12a7ffdf8aed9c60893fd55d57376 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 02/26/2005 *
- * ================                             Last change: 02/26/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 02/26/2005 *
+ * ===================                          Last change: 02/26/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-newsletter.php                               *
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -92,7 +93,7 @@ switch (getExtensionMode()) {
 
                        case '0.0.3': // SQL queries for v0.0.3
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
                                break;
 
                        case '0.0.4': // SQL queries for v0.0.4
@@ -145,7 +146,7 @@ switch (getExtensionMode()) {
                                // - Main data table
                                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_data`");
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_data` (
-`nl_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`nl_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `nl_subject` VARCHAR(255) NOT NULL DEFAULT '{OPEN_CONFIG}nl_default_subject{CLOSE_CONFIG}',
 `nl_header_text` MEDIUMTEXT,
 `nl_footer_text` MEDIUMTEXT,
@@ -155,17 +156,17 @@ switch (getExtensionMode()) {
 `nl_sent` ENUM('Y','N') NOT NULL DEFAULT 'N',
 `nl_expired` ENUM('Y','N') NOT NULL DEFAULT 'N',
 `nl_do_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y',
-`nl_recipients` BIGINT(20) NOT NULL DEFAULT 0,
-`nl_received` BIGINT(20) NOT NULL DEFAULT 0,
-`nl_total_clicks` BIGINT(20) NOT NULL DEFAULT 0,
+`nl_recipients` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`nl_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`nl_total_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`nl_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='General newsletter data'");
 
                                // - Topics data table
                                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_topics`");
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_topics` (
-`nl_topic_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`nl_id` BIGINT(20) NOT NULL DEFAULT '0',
+`nl_topic_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`nl_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `nl_topic_title` VARCHAR(255) NOT NULL DEFAULT '',
 `nl_topic_text` MEDIUMTEXT,
 INDEX `newsletter_id` (`nl_id`),
@@ -175,10 +176,10 @@ PRIMARY KEY (`nl_topic_id`)
                                // - Sponsor orders data table
                                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_orders`");
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_orders` (
-`nl_order_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
-`nl_sponsor_id` BIGINT(20) NOT NULL DEFAULT 0,
-`nl_id` BIGINT(20) NOT NULL DEFAULT 0,
-`nl_topic_id` BIGINT(20) NOT NULL DEFAULT 0,
+`nl_order_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`nl_sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`nl_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`nl_topic_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `nl_order_placed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `nl_order_accepted` ENUM('Y','N') NOT NULL DEFAULT 'N',
 UNIQUE KEY `sponsor_nl_topic` (`nl_sponsor_id`,`nl_id`,`nl_topic_id`),
@@ -187,8 +188,8 @@ PRIMARY KEY (`nl_order_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Newsletter orders'");
 
                                // Configuration
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 7)."");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 14)."");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 7)."");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 14)."");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_subject` VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_header` MEDIUMTEXT");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_footer` MEDIUMTEXT");
@@ -224,13 +225,13 @@ PRIMARY KEY (`nl_order_id`)
                $GLOBALS['valid_email_chars'] = array(
                        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
                        't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L',
-                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1',
-                       '2','3','4','5','6','7','8','9'
+                       'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_',0,1,
+                       2,3,4,5,6,7,8,9
                );
                break;
 
        default: // Unknown extension mode
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
 } // END - switch