return ($GLOBALS['cache_array']['extension']['ext_func'][$ext_name] == 'Y');
}
+// Adds a CREATE TABLE statement if the requested table is not there
+function addCreateTableSql ($tableName, $sql) {
+ // Is the table not there?
+ if (!isSqlTableCreated($tableName)) {
+ // Is not found, so add it
+ addExtensionSql('CREATE TABLE `{?_MYSQL_PREFIX?}_' . $tableName . '` ' . $sql);
+ } else {
+ // Is already there, which should not happen
+ debug_report_bug(__FUNCTION__, __LINE__, 'The table ' . $tableName . ' is already created which should not happen.');
+ }
+}
+
// Adds a DROP TABLE statement if the requested tabled is there
-function addDropTableSql ($table) {
+function addDropTableSql ($tableName) {
// Is the table there?
- if (isSqlTableCreated($table)) {
+ if (isSqlTableCreated($tableName)) {
// Then add it, non-existing tables can be ignored because it will
// happen with every newly installed extension.
- addExtensionSql('DROP TABLE `{?_MYSQL_PREFIX?}_' . $table . '`');
+ addExtensionSql('DROP TABLE `{?_MYSQL_PREFIX?}_' . $tableName . '`');
+
+ // Mark it as gone
+ $GLOBALS['isSqlTableCreated'][$tableName] = false;
} // END - if
}
// But allow current admin everything (THIS SHALL BE YOU!)
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `default_acl`='allow' WHERE `id`=".bigintval(getCurrentAdminId())." LIMIT 1");
addDropTableSql('admins_acls');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_acls` (
+ addCreateTableSql('admins_acls', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`action_menu` VARCHAR(255) NOT NULL DEFAULT '',
case '0.4.0': // SQL queries for v0.4.0
addDropTableSql('admins_mails');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_mails` (
+ addCreateTableSql('admins_mails', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`mail_template` VARCHAR(255) NOT NULL,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('bank_accounts');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_accounts` (
+ addCreateTableSql('bank_accounts', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`account_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`last_tan_stamp`)
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User bank accounts data'");
addDropTableSql('bank_transfers');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_transfers` (
+ addCreateTableSql('bank_transfers', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`to_account_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`from_account_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`day_bookkeeping`, `day_available`)
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Bank user->user transfers'");
addDropTableSql('bank_packages');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_packages` (
+ addCreateTableSql('bank_packages', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL DEFAULT '',
`description` TINYTEXT,
// must be extended with the mode you get for free: output_system_mode:LOGIN
// should be fine. More than one entry and not DISABLED ;) are not supported.
addDropTableSql('bank_tanlist');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_tanlist` (
+ addCreateTableSql('bank_tanlist', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`idx` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
`account_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
addConfigAddSql('beg_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
addDropTableSql('beg_ips');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_beg_ips` (
+ addCreateTableSql('beg_ips', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`remote_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
break;
case '0.0.3': // SQL queries for v0.0.3
- addConfigAddSql("beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
+ addConfigAddSql('beg_points_max', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Maximale Obergrenze an {?POINTS?} einstellbar (Standard: 0,1 {?POINTS?})");
break;
case '0.0.6': // SQL queries for v0.0.6
- addConfigAddSql("beg_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('beg_userid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {?POINTS?} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
break;
case '0.0.8': // SQL queries for v0.0.8
- addConfigAddSql("beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+ addConfigAddSql('beg_ip_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Zeitsperre gegen die selbe IP-Nummer hinzugefügt.");
case '0.2.9': // SQL queries for v0.2.9
addDropTableSql('beg_referals');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_beg_referals` (
+ addCreateTableSql('beg_referals', "(
`id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
`remote_ip` VARCHAR( 15 ) NOT NULL DEFAULT '0.0.0.0',
case '0.2.0': // SQL queries for v0.2
addConfigAddSql('birthday_points', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
addDropTableSql('user_birthday');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_birthday` (
+ addCreateTableSql('user_birthday', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
addAdminMenuSql('email','send_bonus','Bonusmail senden','Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.', 5);
addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);
addDropTableSql('bonus');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus` (
+ addCreateTableSql('bonus', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT '',
case '0.2.2': // SQL queries for v0.2.2
addDropTableSql('bonus_turbo');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` (
+ addCreateTableSql('bonus_turbo', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`mail_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Drop/create table for user bookings
addDropTableSql('user_book');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_book`(
+ addCreateTableSql('user_book', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT 'missing',
break;
case '0.0.7': // SQL queries for v0.0.7
- addConfigAddSql("db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addConfigAddSql("cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('db_hits', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('cache_hits', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
addAdminMenuSql('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4);
// Update notes (these will be set as task text!)
break;
case '0.2.3': // SQL queries for v0.2.3
- addConfigAddSql("cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('cache_filter', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Cachen von Filtern hinzugefügt.");
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('countries');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_countries` (
+ addCreateTableSql('countries', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`code` CHAR(2) NOT NULL DEFAULT 'DE',
`descr` VARCHAR(255) NOT NULL DEFAULT 'Deutschland',
case 'register': // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
// Coupon data
addDropTableSql('coupons');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_coupons` (
+ addCreateTableSql('coupons', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`timestamp_created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`timestamp_expired` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
// Coupon->user connection table
addDropTableSql('user_coupons');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_coupons` (
+ addCreateTableSql('coupons', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`coupon_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`userid` BIGINT(2) UNSIGNED NOT NULL DEFAULT 0,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// Table for debug log entries
addDropTableSql('debug_log');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_log` (
+ addCreateTableSql('debug_log', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
// Table against debug log abuse
addDropTableSql('debug_log_abuse');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_log_abuse` (
+ addCreateTableSql('debug_log_abuse', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
// Table on relay/server for client exchanges
addDropTableSql('debug_client');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_client` (
+ addCreateTableSql('debug_client', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
`url` VARCHAR(255) NOT NULL DEFAULT '',
// Table for debug log <-> client connection
addDropTableSql('debug_client_log');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_client_log` (
+ addCreateTableSql('debug_client_log', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
`log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// Doubler table
addDropTableSql('doubler');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_doubler` (
+ addCreateTableSql('doubler', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
case '0.0.2': // SQL queries for v0.0.2
// Total used points
- addConfigAddSql("doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addConfigAddSql('doubler_user', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Gebühr wird vom Verdoppler-Pott abgezogen.");
case '0.0.4': // SQL queries for v0.0.4
// Shall I use the doubler's account to take points from? (Y/N, default=Y)
- addConfigAddSql("doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('doubler_own', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("{?POINTS?}-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.");
// All required tables for this extension:
// - Ads
addDropTableSql('forced_ads');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_ads` (
+ addCreateTableSql('forced_ads', "(
`forced_ads_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_ads_ad_url` VARCHAR( 255 ) NULL DEFAULT NULL ,
`forced_ads_click_url` VARCHAR( 255 ) NOT NULL ,
// - Campaigns
addDropTableSql('forced_campaigns');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_campaigns` (
+ addCreateTableSql('forced_campaigns', "(
`forced_campaign_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_campaign_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`forced_campaign_status` ENUM( 'ACTIVE', 'PENDING', 'EXPIRED', 'LOCKED' ) NOT NULL DEFAULT 'PENDING',
// - Campaigns <-> Ads
addDropTableSql('forced_campaigns_ads');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_campaigns_ads` (
+ addCreateTableSql('forced_campaigns_ads', "(
`forced_campaign_ads_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_campaign_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
`forced_ads_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
// - Campaigns <-> User
addDropTableSql('forced_campaigns_user');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_campaigns_user` (
+ addCreateTableSql('forced_campaigns_user', "(
`forced_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_campaign_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
`forced_user_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
// - Campaign costs
addDropTableSql('forced_costs');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_costs` (
+ addCreateTableSql('forced_costs', "(
`forced_costs_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_costs_price_click` FLOAT( 20, 5 ) UNSIGNED NULL DEFAULT NULL ,
`forced_costs_payment_click` FLOAT( 20, 5 ) UNSIGNED NULL DEFAULT NULL ,
// - Campaign Statistics
addDropTableSql('forced_stats');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_forced_stats` (
+ addCreateTableSql('forced_stats', "(
`forced_stats_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`forced_stats_campaign_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
`forced_stats_user_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL ,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// Create database
addDropTableSql('user_holidays');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_holidays` (
+ addCreateTableSql('user_holidays', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`holiday_start` VARCHAR(10) NOT NULL DEFAULT 0,
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User holiday data'");
// Add default values to config
- addConfigAddSql("holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+ addConfigAddSql('holiday_max', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
// Add member menu
addMemberMenuSql('main','holiday','Urlaubsschaltung','Y','Y',4);
case '0.1.3': // SQL queries for v0.1.3
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
- addConfigAddSql("holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'");
+ addConfigAddSql('holiday_lock', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!");
// Create imprint data table
addDropTableSql('imprint_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_imprint_data` (
+ addCreateTableSql('imprint_data', "(
`imprint_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`imprint_key` VARCHAR(255) NOT NULL DEFAULT '',
`imprint_value` VARCHAR(255) NOT NULL DEFAULT '',
case '0.0.4': // SQL queries for v0.0.4
// SQL commands to run
addDropTableSql('mediadata');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_mediadata` (
+ addCreateTableSql('mediadata', "(
`media_key` VARCHAR(255) NOT NULL DEFAULT '',
`media_value` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`media_key`)
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// Main table which hold
addDropTableSql('network_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_data` (
+ addCreateTableSql('network_data', "(
`network_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_short_name` VARCHAR(50) NOT NULL DEFAULT '',
`network_title` VARCHAR(255) NOT NULL DEFAULT '',
// Types the network provider is supporting (e.g. Forced-Banner and so on)
// @TODO network_type_handle is an internal name and needs documentation
addDropTableSql('network_types');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_types` (
+ addCreateTableSql('network_types', "(
`network_type_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_handle` VARCHAR(255) NOT NULL DEFAULT '',
// HTTP parameters (names) for URLs
addDropTableSql('network_request_params');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_request_params` (
+ addCreateTableSql('network_request_params', "(
`network_param_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Error status codes
addDropTableSql('network_error_codes');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_error_codes` (
+ addCreateTableSql('network_error_codes', "(
`network_type_code_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_code_value` VARCHAR(50) NOT NULL DEFAULT '',
// Code types (internal table)
addDropTableSql('network_error_types');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_error_types` (
+ addCreateTableSql('network_error_types', "(
`network_code_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_code` VARCHAR(100) NOT NULL DEFAULT 'INVALID_CODE',
UNIQUE (`network_code`),
// Valid translation keys (we hate hard-coded arrays, you see?)
addDropTableSql('network_translations');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_translations` (
+ addCreateTableSql('network_translations', "(
`network_translation_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_translation_name` VARCHAR(100) NOT NULL DEFAULT '',
UNIQUE (`network_translation_name`),
// Array-Element translation tables per type/provider
addDropTableSql('network_api_translation');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_api_translation` (
+ addCreateTableSql('network_api_translation', "(
`network_api_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Data from the webmaster (you!)
addDropTableSql('network_config');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_config` (
+ addCreateTableSql('network_config', "(
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_affiliate_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_api_password` VARCHAR(255) NOT NULL DEFAULT '',
// Configuration data for e.g. reload-time
addDropTableSql('network_types_config');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_types_config` (
+ addCreateTableSql('network_types_config', "(
`network_data_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// `network_cache_refresh` in seconds or if set to zero, full day
// divided by query amount.
addDropTableSql('network_cache');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_cache` (
+ addCreateTableSql('network_cache', "(
`network_cache_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Reload locks for several types
addDropTableSql('network_reloads');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_reloads` (
+ addCreateTableSql('network_reloads', "(
`network_reload_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Tables:
// - Main data table
addDropTableSql('newsletter_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_data` (
+ addCreateTableSql('newsletter_data', "(
`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,
// - Topics data table
addDropTableSql('newsletter_topics');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_topics` (
+ addCreateTableSql('newsletter_topics', "(
`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 '',
// - Sponsor orders data table
addDropTableSql('newsletter_orders');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_orders` (
+ addCreateTableSql('newsletter_orders', "(
`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,
case '0.1.9': // SQL queries for v0.1.9
addAdminMenuSql('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12);
addDropTableSql('nickname_history');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_nickname_history` (
+ addCreateTableSql('nickname_history', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`nickname` VARCHAR(255) NOT NULL DEFAULT '',
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('online');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_online` (
+ addCreateTableSql('online', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sid` VARCHAR(32) NOT NULL DEFAULT '',
`ip` VARCHAR(15) NOT NULL DEFAULT '',
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('optimize_gain');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_optimize_gain` (
+ addCreateTableSql('optimize_gain', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`gain` decimal(10,3) NOT NULL DEFAULT '0.000',
PRIMARY KEY (`id`)
case '0.5.0': // SQL queries for v0.5.0
addDropTableSql('url_blacklist');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` (
+ addCreateTableSql('url_blacklist', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
break;
case '0.0.4': // SQL queries for v0.0.4
- addConfigAddSql("max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
+ addConfigAddSql('max_comma', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('user_payouts');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_payouts` (
+ addCreateTableSql('user_payouts', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`payout_total` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
PRIMARY KEY (`id`)
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Done user payouts (and status)'");
addDropTableSql('payout_types');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_payout_types` (
+ addCreateTableSql('payout_types', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL DEFAULT '',
`rate` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('user_primera');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_primera` (
+ addCreateTableSql('user_primera', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`primera_account` VARCHAR(255) NOT NULL DEFAULT '',
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('rallye_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_data` (
+ addCreateTableSql('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 '',
PRIMARY KEY (`id`)
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Main rallye data'");
addDropTableSql('rallye_prices');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_prices` (
+ addCreateTableSql('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,
PRIMARY KEY (`id`)
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Prices data for a rallye'");
addDropTableSql('rallye_users');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_users` (
+ addCreateTableSql('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,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('user_refs');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_refs` (
+ addCreateTableSql('user_refs', "(
`id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
- addGuestMenuSql('register', 'members', 'Anmeldung', 'Y', 'N', 2);
+ addGuestMenuSql('members', 'register', 'Anmeldung', 'Y', 'N', 2);
break;
case 'remove': // Do stuff when removing extension
switch (getCurrentExtensionVersion()) {
case '0.1.0': // SQL queries for v0.1
addDropTableSql('must_register');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_must_register` (
+ addCreateTableSql('must_register', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`field_name` VARCHAR(255) NOT NULL DEFAULT '',
`field_required` ENUM('Y','N') NOT NULL DEFAULT 'Y',
// Sponsor data
//
addDropTableSql('sponsor_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_data` (
+ addCreateTableSql('sponsor_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`company` VARCHAR(255) NOT NULL DEFAULT '',
`position` VARCHAR(255) NOT NULL DEFAULT '',
// Sponsor orders
//
addDropTableSql('sponsor_orders');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_orders` (
+ addCreateTableSql('sponsor_orders', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Pay-types
//
addDropTableSql('sponsor_paytypes');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_paytypes` (
+ addCreateTableSql('sponsor_paytypes', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`pay_name` VARCHAR(255) NOT NULL DEFAULT '',
`pay_rate` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
// Points-to-action converting
//
addDropTableSql('sponsor_action_convert');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_action_convert` (
+ addCreateTableSql('sponsor_action_convert', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`ext_name` VARCHAR(255) NOT NULL DEFAULT 'sponsor',
`conv_rate` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Sponsor menu system (default)
//
addDropTableSql('sponsor_menu');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_menu` (
+ addCreateTableSql('sponsor_menu', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`action` VARCHAR(255) NOT NULL DEFAULT '',
`what` VARCHAR(255) NULL DEFAULT NULL,
// Registry for performable actions by your sponsors
//
addDropTableSql('sponsor_registry');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_registry` (
+ addCreateTableSql('sponsor_registry', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`ext_name` VARCHAR(255) NOT NULL DEFAULT 'sponsor',
// URLs from the sponsors
//
addDropTableSql('sponsor_urls');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_urls` (
+ addCreateTableSql('sponsor_urls', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT 'http://',
// Banners of any size from the sponsors
//
addDropTableSql('sponsor_banner');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_banner` (
+ addCreateTableSql('sponsor_banner', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT 'http://',
// Campaigns
//
addDropTableSql('sponsor_campaigns');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaigns` (
+ addCreateTableSql('sponsor_campaigns', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Campaigns + URLs + Banner
//
addDropTableSql('sponsor_campaign_assigns');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns` (
+ addCreateTableSql('sponsor_campaign_assigns', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`campaignid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`urlid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Allowed data to display (administrative)
//
addDropTableSql('sponsor_admin_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_admin_data` (
+ addCreateTableSql('sponsor_admin_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`data_row` VARCHAR(255) NOT NULL DEFAULT '',
`display` ENUM('Y','N') NOT NULL DEFAULT 'N',
// Allowed data to display (sponsor-side)
//
addDropTableSql('sponsor_display_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_display_data` (
+ addCreateTableSql('sponsor_display_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`data_row` VARCHAR(255) NOT NULL DEFAULT '',
break;
case '0.1.3': // SQL queries for v0.1.3
- addConfigAddSql("refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
+ addConfigAddSql('refid_target', "ENUM('register','index') NOT NULL DEFAULT 'register'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
case '0.3.2': // SQL queries for v0.3.2
// Connection table between the menu system and the "logical area system"
addDropTableSql('admin_menu_las');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admin_menu_las` (
+ addCreateTableSql('admin_menu_las', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`la_id` VARCHAR(255) NOT NULL DEFAULT '',
`la_action` VARCHAR(255) NOT NULL DEFAULT '',
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Menu system -> LAS'");
// All "logical areas" together
addDropTableSql('admin_menu_las_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admin_menu_las_data` (
+ addCreateTableSql('admin_menu_las_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`la_id` VARCHAR(255) NOT NULL DEFAULT '',
`la_title` VARCHAR(255) NOT NULL DEFAULT '',
// The statistics table
addDropTableSql('admin_las_stats');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admin_las_stats` (
+ addCreateTableSql('admin_las_stats', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`type` ENUM('la','action','what') NOT NULL DEFAULT 'what',
case '0.5.9': // SQL queries for v0.5.9
addDropTableSql('filters');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_filters` (
+ addCreateTableSql('filters', "(
`filter_id` BIGINT(20) UNSIGNED AUTO_INCREMENT,
`filter_name` VARCHAR(50) NOT NULL DEFAULT '',
`filter_function` VARCHAR(100) NOT NULL DEFAULT '',
case '0.7.0': // SQL queries for 0.7.0
// Table definition
addDropTableSql('dns_cache');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_dns_cache` (
+ addCreateTableSql('dns_cache', "(
`hostname` VARCHAR(255) NOT NULL,
`ip` VARCHAR(15) NOT NULL,
`added` DATETIME NOT NULL,
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run (surfbar URLs)
addDropTableSql('surfbar_urls');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_urls` (
+ addCreateTableSql('surfbar_urls', "(
`url_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`url_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
// Reload locks
addDropTableSql('surfbar_locks');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_locks` (
+ addCreateTableSql('surfbar_locks', "(
`locks_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`locks_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`locks_url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Surfbar salts
addDropTableSql('surfbar_salts');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_salts` (
+ addCreateTableSql('surfbar_salts', "(
`salts_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`salts_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`salts_url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Statistics
addDropTableSql('surfbar_stats');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_stats` (
+ addCreateTableSql('surfbar_stats', "(
`stats_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`stats_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`stats_url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Member actions pending on status
addDropTableSql('surfbar_actions');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_actions` (
+ addCreateTableSql('surfbar_actions', "(
`actions_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`actions_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
`actions_action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
case '0.0.8': // SQL queries for v0.0.8
// Theme table
addDropTableSql('themes');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_themes` (
+ addCreateTableSql('themes', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`theme_path` VARCHAR(255) NOT NULL DEFAULT '',
`theme_name` VARCHAR(255) NOT NULL DEFAULT '',
case 'register': // Do stuff when installation is running
// Transfer from a member
addDropTableSql('user_transfers_in');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_in` (
+ addCreateTableSql('user_transfers_in', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`from_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Transfers to a member
addDropTableSql('user_transfers_out');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_out` (
+ addCreateTableSql('user_transfers_out', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`to_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
addDropTableSql('user_cats');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_cats` (
+ addCreateTableSql('user_cats', "(
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User->category connection data'");
addDropTableSql('user_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_data` (
+ addCreateTableSql('user_data', "(
`userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
`surname` VARCHAR(255) NOT NULL DEFAULT '',
`family` VARCHAR(255) NOT NULL DEFAULT '',
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Main user data'");
addDropTableSql('user_points');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_points` (
+ addCreateTableSql('user_points', "(
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,
`userid` BIGINT(22) NOT NULL DEFAULT 0,
`ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User points (no used points)'");
addDropTableSql('user_links');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_links` (
+ addCreateTableSql('user_links', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Unconfirmed mails per user'");
addDropTableSql('user_stats');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats` (
+ addCreateTableSql('user_stats', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Mail statistics per user order'");
addDropTableSql('user_stats_data');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats_data` (
+ addCreateTableSql('user_stats_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
addConfigAddSql('user_delete_purge', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 30)."");
addAdminMenuSql('user', 'list_user_del', 'Löschungen auflisten', 'Listet die Löschungen von Usern auf.', 9);
addDropTableSql('user_del');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_del` (
+ addCreateTableSql('user_del', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`email` VARCHAR(255) NOT NULL DEFAULT '',
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addDropTableSql('user_wernis');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_wernis` (
+ addCreateTableSql('user_wernis', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`wernis_account` VARCHAR(255) NOT NULL DEFAULT '',
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfered Wernis per user'");
// Confiuration
- addConfigAddSql("wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
- addConfigAddSql("wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
- addConfigAddSql("wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addConfigAddSql("wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
- addConfigAddSql("wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
+ addConfigAddSql('wernis_min_payout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
+ addConfigAddSql('wernis_min_withdraw', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
+ addConfigAddSql('wernis_api_id', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('wernis_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''");
+ addConfigAddSql('wernis_api_url', "VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
// User data
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
addMemberMenuSql('main','wernis','Wernis-Ein-/Auszahlungen','N','Y', 11);
// Guest menu
- addGuestMenuSql('main','wernis_portal','WDS66-News','N','Y', 7);
+ addGuestMenuSql('main', 'wernis_portal', 'WDS66-News', 'N', 'Y', 7);
break;
case 'remove': // Do stuff when removing extension
// Reload lock table
addDropTableSql('yoomedia_reload');
- addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_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,