* $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 *
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running
- //
- // SQL commands to run
- //
// Try to make it depend on repair
addExtensionDependency('repair');
// Add default entries
//
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_registry` (`ext_name`,`is_active`,`admin_id`,`stamp_added`) VALUES ('sponsor','N',".getCurrentAdminId().",NOW())");
- addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (`ext_name`,`conv_rate`,`conv_name`) VALUES ('sponsor','10','Mails')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (`ext_name`,`conv_rate`,`conv_name`) VALUES ('sponsor',10,'Mails')");
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Standard-Paket', 5, 1000.00000, '€')");
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Spar-Paket', 1, 200.00000, '€')");
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Power-Paket', 10, 2000.00000, '€')");
//
// Register module
//
- addModuleSql('sponsor', 'Y', 'Y', 'N', 'N');
- addModuleSql('sponsor_confirm', 'Y', 'Y', 'N', 'N');
- addModuleSql('sponsor_ref', 'Y', 'Y', 'N', 'N');
-
- // Update name, if not yet set
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsorbereich' WHERE `module`='sponsor' AND `title`='' LIMIT 1");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsor-Bestätigung' WHERE `module`='sponsor_confirm' AND `title`='' LIMIT 1");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsor-Referrallink' WHERE `module`='sponsor_ref' AND `title`='' LIMIT 1");
+ addModuleSql('sponsor', '{OPEN_TEMPLATE}MODULE_SPONSOR_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N');
+ addModuleSql('sponsor_confirm', '{OPEN_TEMPLATE}MODULE_SPONSOR_CONFIRM_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N');
+ addModuleSql('sponsor_ref', '{OPEN_TEMPLATE}MODULE_SPONSOR_REF_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N');
break;
case 'remove': // Do stuff when removing extension