]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-yoomedia.php
Rewrote some parts:
[mailer.git] / inc / extensions / ext-yoomedia.php
index cb16e5b3ca39cbc4214f12f8ef9a92226a3b408f..9d5fd0d52caf3e72fb0a3e1e612e5fd2eb72409d 100644 (file)
@@ -17,8 +17,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * 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 *
  * it under the terms of the GNU General Public License as published by *
@@ -42,19 +42,19 @@ 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'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
 
-// This extension is deprecated!
-// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
+// This extension is deprecated
+// @TODO Only deprecated when 'ext-network' is ready: setExtensionDeprecated('Y');
 
 switch (getExtensionMode()) {
-       case 'register': // Do stuff when installation is running
+       case 'setup': // Do stuff when installation is running
                // SQL commands to run
                addConfigAddSql('yoomedia_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
                addConfigAddSql('yoomedia_sid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
@@ -73,15 +73,15 @@ switch (getExtensionMode()) {
 
                // Reload lock table
                addDropTableSql('yoomedia_reload');
-               addCreateTableSql('yoomedia_reload', "(
+               addCreateTableSql('yoomedia_reload', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `type` VARCHAR(255) NOT NULL DEFAULT 'general',
 `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
-UNIQUE `y_type` (`type`,`y_id`)
-) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Reload lock reminder for Yoo!Media campaigns'");
+UNIQUE INDEX `y_type` (`type`, `y_id`)",
+                       'Reload lock reminder for Yoo!Media campaigns');
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -99,15 +99,14 @@ UNIQUE `y_type` (`type`,`y_id`)
                break;
 
        case 'update': // Update an extension
-               switch (getCurrentExtensionVersion())
-               {
+               switch (getCurrentExtensionVersion()) {
                        case '0.0.1': // SQL queries for v0.0.1
                                addExtensionSql('');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes('');
                                break;
-               }
+               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
@@ -146,9 +145,9 @@ UNIQUE `y_type` (`type`,`y_id`)
                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
 
 // [EOF]
 ?>