From 0b24c135d83ab952cf87cb37ac7121c4e151025b Mon Sep 17 00:00:00 2001 From: quix0r Date: Thu, 25 Dec 2008 20:02:30 +0000 Subject: [PATCH] Several bugfixes/improvements: (again) - While mails are deleted the removed (affected) rows are being displayed - Fixes bug in transfer configuration (Resolves #25) - Fixes bug in Wernis configuration (Resolves #23) - Fixes bug in de/activating extension 'wernis' (Resolved #22) - Added backtrace if headers are already sent (Maybe resolves #21) --- inc/databases.php | 2 +- inc/extensions/ext-wernis.php | 16 ++++++---- inc/functions.php | 12 ++++++++ inc/language/de.php | 1 + .../de/html/admin/admin_config_transfer.tpl | 7 ++--- .../de/html/admin/admin_del_email_bonus.tpl | 29 ++++++++++--------- .../de/html/admin/admin_del_email_notify.tpl | 23 ++++++++------- 7 files changed, 57 insertions(+), 33 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 012beba67e..1e26423784 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -115,7 +115,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "704"); +define('CURR_SVN_REVISION', "705"); // 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-wernis.php b/inc/extensions/ext-wernis.php index d8d32222ff..3d8855fdf2 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version of this extension -$EXT_VERSION = "0.0.2"; +$EXT_VERSION = "0.0.3"; // Auto-set extension version if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2"); +$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3"); switch ($EXT_LOAD_MODE) { @@ -70,7 +70,6 @@ PRIMARY KEY(id) $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''"; // User data $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"; @@ -97,13 +96,13 @@ case "remove": // Do stuff when removing extension case "activate": // Do stuff when admin activates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1"; + $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='wernis_portal' LIMIT 1"; $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1"; break; case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1"; + $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='wernis_portal' LIMIT 1"; $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1"; break; @@ -130,6 +129,13 @@ case "update": // Update an extension // Update notes (these will be set as task text!) $UPDATE_NOTES = "Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden."; break; + + case "0.0.3": // SQL queries for v0.0.3 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert."; + break; } break; diff --git a/inc/functions.php b/inc/functions.php index 591f12976b..d47a72123e 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -137,6 +137,18 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) { break; } } elseif ((_OB_CACHING == "on") && ($footer == 1)) { + // Headers already sent? + if (headers_sent()) { + // Log this error + DEBUG_LOG(__FUNCTION__, __LINE__, "Headers already sent! We need debug backtrace here."); + + // Output debug trace + print("Headers are already sent!
\n"); + print("Please report this error at bugs.mxchange.org:
");
+			debug_print_backtrace();
+			die("
Thank you for your help finding bugs."); + } // END - if + // Output cached HTML code $OUTPUT = ob_get_contents(); diff --git a/inc/language/de.php b/inc/language/de.php index cea0a96434..14c936e731 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1126,6 +1126,7 @@ define('EDIT_ENTRIES', "Einträge ändern"); define('_CATEGORY_NONE', "Keine Kategorie"); define('__UNUSED', "Im Aufbau"); define('ADMIN_DELETED_MAILS_COUNT', "Es wurden %s/ Einträge gelöscht."); +define('EMAIL_DELETE_COUNT', "Buchungseinträge gelöscht"); define('ADMIN_SEND_RESET_LINK_TITLE', "1/4: Administratorkennwort zurücksetzen"); define('ADMIN_VALIDATE_HASH_TITLE', "2/4: Validierung Iher Logindaten"); diff --git a/templates/de/html/admin/admin_config_transfer.tpl b/templates/de/html/admin/admin_config_transfer.tpl index 31c4dd67f1..04e6b5bb5e 100644 --- a/templates/de/html/admin/admin_config_transfer.tpl +++ b/templates/de/html/admin/admin_config_transfer.tpl @@ -1,5 +1,4 @@ -
+ @@ -59,8 +58,8 @@ diff --git a/templates/de/html/admin/admin_del_email_bonus.tpl b/templates/de/html/admin/admin_del_email_bonus.tpl index 37449f7cb3..9574866218 100644 --- a/templates/de/html/admin/admin_del_email_bonus.tpl +++ b/templates/de/html/admin/admin_del_email_bonus.tpl @@ -1,20 +1,23 @@ -
{--ADMIN_AUTOPURGE_TRANSFER--}  
+
- + - - - - + + + + + - - - - + + + + +
- {--ADMIN_EMAIL_DELETED--} + {--ADMIN_EMAIL_DELETED--} +
{--ID_SELECT--}{--EMAIL_SUBJECT--}{--EMAIL_URL--}{--EMAIL_TIMESTAMP--}{--ID_SELECT--}{--EMAIL_SUBJECT--}{--EMAIL_URL--}{--EMAIL_TIMESTAMP--}{--EMAIL_DELETE_COUNT--}
{!__ID!}{!__SUBJECT!}{--ADMIN_TEST_URL--}{!__ORDERED!}{!__ID!}{!__SUBJECT!} + {--ADMIN_TEST_URL--} + {!__ORDERED!}{!__CNT!}
diff --git a/templates/de/html/admin/admin_del_email_notify.tpl b/templates/de/html/admin/admin_del_email_notify.tpl index f43a274ba6..250295e295 100644 --- a/templates/de/html/admin/admin_del_email_notify.tpl +++ b/templates/de/html/admin/admin_del_email_notify.tpl @@ -1,19 +1,22 @@ - + - - - - + + + + + - - - + + - + +
- {--ADMIN_NOTIFICATION_DELETED_TITLE--} + {--ADMIN_NOTIFICATION_DELETED_TITLE--} +
{--ID_SELECT--}{--EMAIL_SUBJECT--}{--EMAIL_URL--}{--EMAIL_TIMESTAMP--}{--ID_SELECT--}{--EMAIL_SUBJECT--}{--EMAIL_URL--}{--EMAIL_TIMESTAMP--}{--EMAIL_DELETE_COUNT--}
{!__ID!}{!__SUBJECT!}{!__ID!}{!__SUBJECT!}{--ADMIN_TEST_URL--}{!__ORDERED!}{!__ORDERED!}{!__CNT!}
-- 2.39.5