mailer project continued:
[mailer.git] / inc / extensions / ext-mailid.php
index 3229fc02fcb3684ad237aafff6651cc22e8c713d..33387e646355331ea4d551139189b45cc277987a 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -48,13 +48,16 @@ setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
+               // This extension requires ext-other
+               addExtensionDependency('other');
+
                // SQL commands to run
                addExtensionSql('');
                break;
 
        case 'remove': // Do stuff when removing extension
-               // SQL commands to run
-               addExtensionSql('');
+               // Unregister points data
+               unregisterExtensionPointsData('mailid_payback');
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -233,8 +236,8 @@ switch (getExtensionMode()) {
                                // This update depends on latest sql_patches version
                                addExtensionDependency('sql_patches');
 
-                               // Insert data in points_data
-                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('mailid_payback','points','LOCKED','DIRECT')");
+                               // Register points data
+                               registerExtensionPointsData('mailid_payback', 'points', 'LOCKED', 'DIRECT');
                                break;
                } // END - switch
                break;