From: Roland Häder Date: Thu, 4 Dec 2008 03:35:55 +0000 (+0000) Subject: More default values rewritten, UNSIGNED added to many numerical database columns... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=61cd26135cd5e043032bcd50aff24fbf5429352b;p=mailer.git More default values rewritten, UNSIGNED added to many numerical database columns, DOUBLE->FLOAT converted --- diff --git a/inc/databases.php b/inc/databases.php index 61e304d180..9146e30005 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "594"); +define('CURR_SVN_REVISION', "595"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index a6f79aedda..95640968a3 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -58,7 +58,7 @@ account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, locked_reason TINYTEXT, status ENUM('NEW','ACTIVE','LOCKED') NOT NULL DEFAULT 'NEW', -account_balance DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +account_balance FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, output_mode ENUM('LOGIN','EMAIL','DISABLED'), pin VARCHAR(50) NOT NULL DEFAULT '', tan_mode ENUM('NORMAL','INDEXED'), @@ -69,7 +69,7 @@ last_tan VARCHAR(5) NOT NULL DEFAULT '00000', last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, last_tan_purpose TINYTEXT, account_type ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK', -overdraft_credit DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +overdraft_credit FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (id), UNIQUE KEY (pin), INDEX `uid_type` (uid, account_type), @@ -82,7 +82,7 @@ INDEX (last_tan_stamp) 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, -points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, day_bookkeeping CHAR(4) NOT NULL DEFAULT '0000', day_available CHAR(4) NOT NULL DEFAULT '0000', transfer_purpose TINYTEXT, @@ -95,17 +95,17 @@ INDEX (day_bookkeeping, day_available) id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, -account_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +account_fee FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, free_transfers INT(7) UNSIGNED NOT NULL DEFAULT 0, -transfer_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +transfer_fee FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, available TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, output_system_mode ENUM('LOGIN','EMAIL','DISABLED'), package_active ENUM('Y','N') NOT NULL DEFAULT 'N', free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, -first_payment DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, -free_account_income DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +first_payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +free_account_income FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, free_account_stuff TINYTEXT null, tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index d68b263e81..55eba3395b 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_beg_ips`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_beg_ips` ( @@ -107,7 +107,7 @@ case "update": // Update an extension break; case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})"; @@ -158,7 +158,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_points DOUBLE(21,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $VIS = "N"; $LOCKED = "Y"; if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"; @@ -194,7 +194,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_bonus DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 3cabd44217..d55405c4c9 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -123,14 +123,14 @@ case "update": // Update an extension case "0.2.1": // SQL queries for v0.2.1 $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT 10.000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT 100.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day'].""; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Use actual month for this update - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT 0.000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT 0.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; @@ -146,7 +146,7 @@ userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -points DOUBLE(20,3) NOT NULL DEFAULT '0.000', +points FLOAT(20,3) NOT NULL DEFAULT '0.000', timemark VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(id), KEY mail_id (mail_id), @@ -191,11 +191,11 @@ KEY userid (userid) case "0.2.8": // SQL queries for v0.2.8 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; @@ -285,13 +285,13 @@ KEY userid (userid) break; case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; // Update notes (these will be set as task text!) @@ -473,7 +473,7 @@ WHERE last_online < ".$mark." ORDER BY userid"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index c438f07004..8cf0659221 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -56,11 +56,11 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Drop/create table for user bookings $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_book`( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', `mode` ENUM('add','sub') NOT NULL DEFAULT 'add', -`points` DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, +`points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, INDEX (`userid`), PRIMARY KEY(`id`) ) TYPE=MyISAM COMMENT='Member points booking table'"; diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 8998dd5724..7cda547dcd 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -51,9 +51,9 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT '3600'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_tested tinyint(1) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)"; break; diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index a086ed4ab6..b93312c63d 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -52,8 +52,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Table for debug log entries $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`sender_id` BIGINT(20) NOT NULL DEFAULT 0, +`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', `file` VARCHAR(255) NOT NULL DEFAULT '', `line` MEDIUMINT NOT NOT NULL DEFAULT 0, @@ -68,8 +68,8 @@ PRIMARY KEY (`id`) // Table against debug log abuse $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_log_abuse`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_log_abuse` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`client_id` BIGINT(20) NOT NULL DEFAULT 0, +`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', `raw_data` LONGTEXT, `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, @@ -80,7 +80,7 @@ PRIMARY KEY (`id`) // Table on relay/server for client exchanges $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `key` VARCHAR(255) NOT NULL DEFAULT 'SELF', `url` VARCHAR(255) NOT NULL DEFAULT '', `webmaster` VARCHAR(255) NOT NULL DEFAULT '', @@ -100,9 +100,9 @@ PRIMARY KEY (`id`) // Table for debug log <-> client connection $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_debug_client_log`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_debug_client_log` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`client_id` BIGINT(20) NOT NULL DEFAULT 1, -`log_id` BIGINT(20) NOT NULL DEFAULT 0, +`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, INDEX `client_log` (`client_id`,`log_id`), UNIQUE (`log_id`), PRIMARY KEY (`id`) @@ -124,12 +124,12 @@ PRIMARY KEY (`id`) $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)"; // Config entries - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_id` BIGINT(20) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_reject_log` BIGINT(20) NOT NULL DEFAULT ".($_CONFIG['one_day'] * 30).""; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day'] * 30).""; break; case "remove": // Do stuff when removing extension diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 97160da4ea..20c4beef30 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', timemark VARCHAR(10) NOT NULL DEFAULT '', completed ENUM('Y','N') NOT NULL DEFAULT 'N', @@ -69,9 +69,9 @@ PRIMARY KEY(id) // --- SETTINGS --- // // Minimum points to double - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; // Maximum points to double - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"; // Points left on users account after doubling $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"; // Charge for doubling points which goes to the webmaster (shreddered in fact!) @@ -83,7 +83,7 @@ PRIMARY KEY(id) // A user account to take points from (default: 0->none) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Total payed out points from your doublers - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Sending mode of mails (immediately/daily reset) // --> This also means who fast the doubled points will be payed out! $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"; @@ -96,7 +96,7 @@ PRIMARY KEY(id) // Number of entries which are already payed out $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; // Points used by every member - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Counter for usage of the doubler $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; @@ -147,7 +147,7 @@ case "update": // Update an extension case "0.0.2": // SQL queries for v0.0.2 // Total used points - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen."; diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 2b7ec55630..4f8e1a314d 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -54,7 +54,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_payouts ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -payout_total DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +payout_total FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', target_account VARCHAR(255) NOT NULL DEFAULT '', target_bank VARCHAR(255) NOT NULL DEFAULT '', payout_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -68,7 +68,7 @@ PRIMARY KEY(id) $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_payout_types ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, type VARCHAR(255) NOT NULL DEFAULT '', -rate DOUBLE(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(id) ) TYPE=MyISAM"; @@ -143,8 +143,8 @@ case "update": // Update an extension break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index e831d9ae14..0d3a664c2d 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, primera_account VARCHAR(255) NOT NULL DEFAULT '', -primera_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT 0.00000, +primera_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, primera_timestamp VARCHAR(10) NOT NULL DEFAULT 0, primera_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', primera_api_message TINYTEXT, @@ -65,8 +65,8 @@ PRIMARY KEY(id) ) TYPE=MyISAM"; // Confiuration - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 5d8d1c54a9..e11bad5d8b 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -130,7 +130,7 @@ case "update": // Update an extension break; case "0.0.2": // SQL queries for v0.0.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users ADD curr_points DOUBLE(23,3) NOT NULL DEFAULT '0.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Aktueller {!POINTS!}-Stand wird beachtet."; @@ -157,7 +157,7 @@ case "update": // Update an extension break; case "0.1.0": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points DOUBLE(23,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert."; diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index b375fd641e..c97e551729 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -52,10 +52,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // SQL commands to run $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_refs`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_refs` ( -`id` bigint(20) NOT NULL auto_increment, -`userid` bigint(20) NOT NULL DEFAULT 0, -`level` smallint(6) NOT NULL DEFAULT 0, -`refid` bigint(20) NOT NULL DEFAULT 0, +`id` BIGINT(20) UNSIGNED NOT NULL auto_increment, +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0, +`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `refback` float(4,1) NOT NULL DEFAULT 0.0, `points` FLOAT( 20,5) DEFAULT 0.00000 NOT NULL, PRIMARY KEY (`id`), diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index e8a3dfbc48..9342c009b6 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -86,8 +86,8 @@ last_change VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('UNCONFIRMED','PENDING','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED', receive_warnings ENUM('Y','N') NOT NULL DEFAULT 'Y', warning_interval BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."', -points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, -points_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +points_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, ref_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, hash VARCHAR(32) NOT NULL DEFAULT '', @@ -124,7 +124,7 @@ PRIMARY KEY(id) $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_sponsor_paytypes ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, pay_name VARCHAR(255) NOT NULL DEFAULT '', -pay_rate DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, pay_currency VARCHAR(255) NOT NULL DEFAULT '€', PRIMARY KEY(id) @@ -193,8 +193,8 @@ id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', alternate VARCHAR(255) NOT NULL DEFAULT '', -width INT(7) NOT NULL DEFAULT '468', -height INT(7) NOT NULL DEFAULT '60', +width INT(7) UNSIGNED NOT NULL DEFAULT 468, +height INT(7) UNSIGNED NOT NULL DEFAULT 60, views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(sponsorid), @@ -211,11 +211,11 @@ aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, campaign_name VARCHAR(255) NOT NULL DEFAULT '', campaign_start VARCHAR(10) NOT NULL DEFAULT 0, campaign_end VARCHAR(10) NOT NULL DEFAULT 0, -campaign_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +campaign_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, campaign_expired ENUM('Y','N') NOT NULL DEFAULT 'N', campaign_locked ENUM('Y','N') NOT NULL DEFAULT 'Y', campaign_ended VARCHAR(10) NOT NULL DEFAULT 0, -locked_reason tinyblob, +locked_reason TINYBLOB, locked_timestamp VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(aid), @@ -365,8 +365,8 @@ PRIMARY KEY(id) // // General configuration stuff // - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"; // Load CSS file $EXT_CSS = "Y"; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index d8a8920f89..8d8b5cc467 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -155,7 +155,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*14).""; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "In der Tabelle "._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)"; + $UPDATE_NOTES = "In der Tabelle "._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"; break; case "0.0.3": // SQL queries for v0.0.3 @@ -218,7 +218,7 @@ case "update": // Update an extension case "0.1.1": // SQL queries for v0.1.1 $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT '31536000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*365).""; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; @@ -296,14 +296,14 @@ PRIMARY KEY(id) break; case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points DOUBLE(22,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "5 Nachkommastellen implementiert"; @@ -654,7 +654,7 @@ PRIMARY KEY (id) break; case "0.5.2": // SQL queries for v0.5.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."; @@ -688,8 +688,8 @@ PRIMARY KEY (id) case "0.5.6": // SQL queries for v0.5.6 $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_stats_data` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`userid` BIGINT(20) NOT NULL DEFAULT 0, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown', `stats_data` VARCHAR(255) NOT NULL DEFAULT '', `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index d1db394b53..5f0d5e1f20 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -165,8 +165,8 @@ UNIQUE KEY `status_action` (`status`,`action`) $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) NOT NULL DEFAULT 100"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) NOT NULL DEFAULT ".$_CONFIG['one_day'].""; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day'].""; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"; @@ -207,16 +207,17 @@ case "remove": // Do stuff when removing extension case "activate": // Do stuff when admin activates this extension // SQL commands to run $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"; + $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='surfbar' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"; + $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_mod_reg` SET locked='Y' WHERE module='surfbar' LIMIT 1"; break; case "update": // Update an extension - switch ($EXT_VER) - { + switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.1 $SQLs[] = ""; diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 265c213588..9cca414e89 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -73,7 +73,7 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.1": // SQL queries for v0.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) NOT NULL DEFAULT 20"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun möglich."; diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index d457bc937a..5cc56aa28f 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, wernis_account VARCHAR(255) NOT NULL DEFAULT '', -wernis_amount DOUBLE(22,5) UNSIGNED NOT NULL DEFAULT 0.00000, +wernis_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, wernis_timestamp VARCHAR(10) NOT NULL DEFAULT 0, wernis_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', wernis_api_message TINYTEXT, @@ -111,8 +111,8 @@ case "update": // Update an extension case "0.0.1": // SQL queries for v0.0.1 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index 33acb28529..c95239cc84 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -51,16 +51,16 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_id` BIGINT(20) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) NOT NULL DEFAULT 200"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; // Admin menu $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"; @@ -69,10 +69,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Reload lock table $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_yoomedia_reload` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', -`y_id` BIGINT(20) NOT NULL DEFAULT 0, -`y_reload` SMALLINT(6) NOT NULL DEFAULT 0, +`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`) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 414cdc5273..2aa4d8b771 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -65,7 +65,7 @@ function ADD_MODULE_TITLE($mod) { // Still no luck or empty title? if (empty($name)) { // No name found - $name = LANG_UNKNOWN_MODULE." (".$mod.")"; + $name = sprintf("%s (%s)", LANG_UNKNOWN_MODULE, $mod); if (SQL_NUMROWS($result) == 0) { // Add module to database $dummy = CHECK_MODULE($mod); @@ -77,7 +77,7 @@ function ADD_MODULE_TITLE($mod) { } // Check validity of a given module name (no file extension) -function CHECK_MODULE($mod) { +function CHECK_MODULE ($mod) { // We need them now here... global $cacheArray, $_CONFIG, $cacheInstance; @@ -794,7 +794,7 @@ function SEND_MODE_MAILS($mod, $modes) // Load hash $result_main = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1", - array($GLOBALS['userid']), __FILE__, __LINE__); + array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load hash from database list($hashDB) = SQL_FETCHROW($result_main); @@ -807,7 +807,7 @@ function SEND_MODE_MAILS($mod, $modes) if (($hash == get_session('u_hash')) || ($_POST['pass1'] == $_POST['pass2'])) { // Load user's data $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND password='%s' LIMIT 1", - array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__); + array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load the data $DATA = SQL_FETCHROW($result); @@ -842,13 +842,13 @@ function SEND_MODE_MAILS($mod, $modes) DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode)); $content = MEMBER_UNKNOWN_MODE.": ".$mode."\n\n"; break; - } + } // END - switch } // END - if if (EXT_IS_ACTIVE("country")) { // Replace code with description $DATA[4] = COUNTRY_GENERATE_INFO($_POST['country_code']); - } + } // END - if // Load template $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, $GLOBALS['userid']); @@ -867,32 +867,32 @@ function SEND_MODE_MAILS($mod, $modes) $sub_mem = MEMBER_CHANGED_DATA; // Output success message - $content = "".MYDATA_MAIL_SENT.""; + $content = "".MYDATA_MAIL_SENT.""; break; default: DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod)); - $content = "".UNKNOWN_MODULE.""; + $content = "".UNKNOWN_MODULE.""; break; - } + } // END - switch } else { // Could not load profile data - $content = "".MEMBER_CANNOT_LOAD_PROFILE.""; + $content = "".MEMBER_CANNOT_LOAD_PROFILE.""; } } else { // Passwords mismatch - $content = "".MEMBER_PASSWORD_ERROR.""; + $content = "".MEMBER_PASSWORD_ERROR.""; } } else { // Could not load profile - $content = "".MEMBER_CANNOT_LOAD_PROFILE.""; + $content = "".MEMBER_CANNOT_LOAD_PROFILE.""; } // Send email to user if required if ((!empty($sub_mem)) && (!empty($msg))) { // Send member mail SEND_EMAIL($DATA[7], $sub_mem, $msg); - } + } // END - if // Send only if no other error has occured if (empty($content)) { @@ -904,22 +904,20 @@ function SEND_MODE_MAILS($mod, $modes) $content = CANNOT_SEND_ADMIN_MAILS; } else { // No mail to admin - $content = "".MYDATA_MAIL_SENT.""; + $content = "".MYDATA_MAIL_SENT.""; } - } + } // END - if // Load template LOAD_TEMPLATE("admin_settings_saved", false, $content); } // Update module counter -function COUNT_MODULE($mod) -{ - if ($mod != "css") - { +function COUNT_MODULE($mod) { + if ($mod != "css") { // Do count all other modules but not accesses on CSS file css.php! $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET clicks=clicks+1 WHERE module='%s' LIMIT 1", - array($mod), __FILE__, __LINE__); - } + array($mod), __FILE__, __LINE__); + } // END - if } // Get action value from mode (admin/guest/member) and what-value function GET_ACTION ($MODE, &$wht) diff --git a/install/tables.sql b/install/tables.sql index bbe4e75f4d..a0e57cd005 100644 --- a/install/tables.sql +++ b/install/tables.sql @@ -5,7 +5,7 @@ CREATE TABLE `mxchange_admin_menu` ( `what` VARCHAR(255) NULL DEFAULT NULL, `title` VARCHAR(50) NOT NULL DEFAULT '', `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - `descr` blob NOT NULL, + `descr` BLOB NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; @@ -121,7 +121,7 @@ CREATE TABLE `mxchange_pool` ( `payment_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, `data_type` ENUM('TEMP','SEND','NEW','ADMIN') NOT NULL DEFAULT 'TEMP', `timestamp` VARCHAR(10) NOT NULL DEFAULT 0, - `url` tinytext NOT NULL, + `url` TINYTEXT NOT NULL, `target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) @@ -194,7 +194,7 @@ CREATE TABLE `mxchange_user_data` ( `ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `gender` ENUM('M','F') NOT NULL DEFAULT 'M', - `used_points` DOUBLE(22,3) NOT NULL DEFAULT '0.000', + `used_points` FLOAT(22,3) NOT NULL DEFAULT '0.000', `emails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`userid`) ) TYPE=MyISAM; @@ -204,7 +204,7 @@ CREATE TABLE `mxchange_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, - `points` DOUBLE(22,3) NOT NULL DEFAULT '0.000', + `points` FLOAT(22,3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`id`) ) TYPE=MyISAM; @@ -213,8 +213,8 @@ ALTER TABLE `mxchange_config` ADD `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT ALTER TABLE `mxchange_config` ADD `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '14'; ALTER TABLE `mxchange_config` ADD `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y'; -ALTER TABLE `mxchange_pool` MODIFY `url` tinytext NOT NULL; -ALTER TABLE `mxchange_pool` CHANGE `url` `url` tinyblob NOT NULL; +ALTER TABLE `mxchange_pool` MODIFY `url` TINYTEXT NOT NULL; +ALTER TABLE `mxchange_pool` CHANGE `url` `url` TINYBLOB NOT NULL; ALTER TABLE `mxchange_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'; DROP TABLE IF EXISTS `mxchange_user_links`; @@ -233,7 +233,7 @@ CREATE TABLE `mxchange_user_stats` ( `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(200) NOT NULL DEFAULT '', - `url` tinyblob NOT NULL, + `url` TINYBLOB NOT NULL, `max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '', `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -253,7 +253,7 @@ ALTER TABLE `mxchange_user_data` ADD `last_update` VARCHAR(10) NOT NULL DEFAULT ALTER TABLE `mxchange_refbanner` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE `mxchange_config` ADD `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'; -ALTER TABLE `mxchange_config` ADD `mad_timestamp` VARCHAR(10) NOT NULL DEFAULT 0; +ALTER TABLE `mxchange_config` ADD `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE `mxchange_config` ADD `mad_count` BIGINT(20) UNSIGNED NOT NULL; ALTER TABLE `mxchange_config` ADD `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000'; ALTER TABLE `mxchange_config` ADD `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y'; @@ -318,7 +318,7 @@ CREATE TABLE `mxchange_extensions` ( DROP TABLE IF EXISTS `mxchange_jackpot`; CREATE TABLE `mxchange_jackpot` ( `ok` CHAR(2) NOT NULL DEFAULT 'ok', - `points` DOUBLE(23,3) NOT NULL DEFAULT '0.000', + `points` FLOAT(20,3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`ok`) ) TYPE=MyISAM; diff --git a/modules.php b/modules.php index da08bc735f..325eb83108 100644 --- a/modules.php +++ b/modules.php @@ -148,7 +148,7 @@ if ((!empty($_CONFIG['maintenance'])) && ($_CONFIG['maintenance'] == "Y") && (!I ADD_FATAL(MYSQL_ERRORS); } -if ($MOD_VALID) { +if (($MOD_VALID) && (defined('__MODULE'))) { ///////////////////////////////////////////// // Main including line DO NOT REMOVE/EDIT! // ///////////////////////////////////////////// diff --git a/templates/de/html/admin/admin_mods_list.tpl b/templates/de/html/admin/admin_mods_list.tpl index f1fa0e9611..c325599421 100644 --- a/templates/de/html/admin/admin_mods_list.tpl +++ b/templates/de/html/admin/admin_mods_list.tpl @@ -1,7 +1,5 @@ -
- + +
@@ -9,16 +7,18 @@ - + {!__MODS_ROWS!} - +
{--ID_SELECT--} {--MODS_NAME--}{--MODS_IS_LOCKED--} {--MODS_IS_HIDDEN--} {--MODS_IS_ADMIN--}{--MODS_IS_MEMBER--}{--MODS_IS_MEMBER--}
-
{--MODS_ADMIN_EDIT_NOTE--}
+
+ {--MODS_ADMIN_EDIT_NOTE--} +
diff --git a/templates/de/html/admin/admin_mods_list_row.tpl b/templates/de/html/admin/admin_mods_list_row.tpl index 1ea2fc05ef..1c379d8b7b 100644 --- a/templates/de/html/admin/admin_mods_list_row.tpl +++ b/templates/de/html/admin/admin_mods_list_row.tpl @@ -9,15 +9,15 @@  $content[title] -  $content[locked] + $content[locked] -  $content[hidden] + $content[hidden] -  $content[admin] + $content[admin] - -  $content[mem] + + $content[mem] diff --git a/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php b/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php index fef5dfb884..26ccb6e261 100644 --- a/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php +++ b/unsupported/affiliblatt/inc/extensions/ext-affiliblatt.php @@ -51,16 +51,16 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_id` BIGINT(20) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_sid` BIGINT(20) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_passwd` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_total` SMALLINT(6) NOT NULL DEFAULT 200"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `affliliblatt_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; // Admin menu $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_affliliblatt','AffiliBlatt Interface 2.0','Einstellungen zum AffiliBlatt Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"; @@ -69,10 +69,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Reload lock table $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_affliliblatt_reload`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_affliliblatt_reload` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', -`y_id` BIGINT(20) NOT NULL DEFAULT 0, -`y_reload` SMALLINT(6) NOT NULL DEFAULT 0, +`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`) diff --git a/unsupported/gollox/inc/extensions/ext-gollox.php b/unsupported/gollox/inc/extensions/ext-gollox.php index cf0d87bcbb..96eed4df0d 100644 --- a/unsupported/gollox/inc/extensions/ext-gollox.php +++ b/unsupported/gollox/inc/extensions/ext-gollox.php @@ -51,16 +51,16 @@ switch ($EXT_LOAD_MODE) { case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_id` BIGINT(20) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_sid` BIGINT(20) NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_passwd` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8).""; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 60"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_total` SMALLINT(6) NOT NULL DEFAULT 200"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `gollox_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"; // Admin menu $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_gollox','GolloX Interface 2.0','Einstellungen zum GolloX Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"; @@ -69,10 +69,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Reload lock table $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_gollox_reload`"; $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_gollox_reload` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', -`y_id` BIGINT(20) NOT NULL DEFAULT 0, -`y_reload` SMALLINT(6) NOT NULL DEFAULT 0, +`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`)