Several bugfixes/improvements: (again)
authorRoland Häder <roland@mxchange.org>
Thu, 25 Dec 2008 20:02:30 +0000 (20:02 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 25 Dec 2008 20:02:30 +0000 (20:02 +0000)
- 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
inc/extensions/ext-wernis.php
inc/functions.php
inc/language/de.php
templates/de/html/admin/admin_config_transfer.tpl
templates/de/html/admin/admin_del_email_bonus.tpl
templates/de/html/admin/admin_del_email_notify.tpl

index 012beba..1e26423 100644 (file)
@@ -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);
index d8d3222..3d8855f 100644 (file)
@@ -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&auml;ndert.";
+               break;
        }
        break;
 
index 591f129..d47a721 100644 (file)
@@ -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("<stron>Headers are already sent!</strong><br />\n");
+                       print("Please report this error at <a href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a>:<pre>");
+                       debug_print_backtrace();
+                       die("</pre>Thank you for your help finding bugs.");
+               } // END - if
+
                // Output cached HTML code
                $OUTPUT = ob_get_contents();
 
index cea0a96..14c936e 100644 (file)
@@ -1126,6 +1126,7 @@ define('EDIT_ENTRIES', "Eintr&auml;ge &auml;ndern");
 define('_CATEGORY_NONE', "Keine Kategorie");
 define('__UNUSED', "Im Aufbau");
 define('ADMIN_DELETED_MAILS_COUNT', "Es wurden <u>%s/<u> Eintr&auml;ge gel&ouml;scht.");
+define('EMAIL_DELETE_COUNT', "Buchungseintr&auml;ge gel&ouml;scht");
 
 define('ADMIN_SEND_RESET_LINK_TITLE', "1/4: Administratorkennwort zur&uuml;cksetzen");
 define('ADMIN_VALIDATE_HASH_TITLE', "2/4: Validierung Iher Logindaten");
index 31c4dd6..04e6b5b 100644 (file)
@@ -1,5 +1,4 @@
-<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_transfer"
-       method="POST">
+<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_transfer" method="POST">
 <TABLE border="0" cellspacing="0" cellpadding="0" width="580"
        class="admin_table dashed">
        <TR>
@@ -59,8 +58,8 @@
                <TD align="right" width="250">{--ADMIN_AUTOPURGE_TRANSFER--}</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD><SELECT name="ap_transfer" size="1" class="admin_select">
-                       <OPTION value="Y"{!__YES_IN!} />{--YES--}</OPTION>
-                       <OPTION value="N"{!__NO_IN!} />{--NO--}</OPTION>
+                       <OPTION value="Y"{!__YES_AP!} />{--YES--}</OPTION>
+                       <OPTION value="N"{!__NO_AP!} />{--NO--}</OPTION>
                </SELECT></TD>
        </TR>
        <TR>
index 37449f7..9574866 100644 (file)
@@ -1,20 +1,23 @@
-<TABLE border="0" cellspacing="0" cellpadding="0"
-       class="admin_table dashed" width="99%">
+<TABLE border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="99%">
        <TR>
-               <TD class="admin_header" colspan="8" align="center" height="35">
-               <STRONG class="admin_misc">{--ADMIN_EMAIL_DELETED--}</STRONG></TD>
+               <TD class="admin_header bottom2" colspan="5" align="center" height="35">
+                       <STRONG class="admin_misc">{--ADMIN_EMAIL_DELETED--}</STRONG>
+               </TD>
        </TR>
        <TR>
-               <TD class="top2 right2" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_SUBJECT--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_URL--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_TIMESTAMP--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_SUBJECT--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_URL--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_TIMESTAMP--}</STRONG></TD>
+               <TD class="bottom2" align="center"><STRONG>{--EMAIL_DELETE_COUNT--}</STRONG></TD>
        </TR>
        <TR>
-               <TD class="top2 right2 admin_misc" align="center">{!__ID!}</TD>
-               <TD class="top2 right2 admin_misc" align="center">{!__SUBJECT!}</TD>
-               <TD class="top2 right2 admin_misc" align="center"><A
-                       href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</A></TD>
-               <TD class="top2 right2 admin_misc" align="center">{!__ORDERED!}</TD>
+               <TD class="right2 admin_misc" align="center">{!__ID!}</TD>
+               <TD class="right2 admin_misc" align="center">{!__SUBJECT!}</TD>
+               <TD class="right2 admin_misc" align="center">
+                       <A href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</A>
+               </TD>
+               <TD class="right2 admin_misc" align="center">{!__ORDERED!}</TD>
+               <TD class="admin_misc" align="center">{!__CNT!}</TD>
        </TR>
 </TABLE>
index f43a274..250295e 100644 (file)
@@ -1,19 +1,22 @@
 <TABLE border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="99%">
        <TR>
-               <TD class="admin_header" colspan="8" align="center" height="35">
-               <STRONG class="admin_misc">{--ADMIN_NOTIFICATION_DELETED_TITLE--}</STRONG></TD>
+               <TD class="admin_header bottom2" colspan="5" align="center" height="35">
+                       <STRONG class="admin_misc">{--ADMIN_NOTIFICATION_DELETED_TITLE--}</STRONG>
+               </TD>
        </TR>
        <TR>
-               <TD class="top2 right2" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_SUBJECT--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_URL--}</STRONG></TD>
-               <TD class="top2 right2" align="center"><STRONG>{--EMAIL_TIMESTAMP--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_SUBJECT--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_URL--}</STRONG></TD>
+               <TD class="bottom2 right2" align="center"><STRONG>{--EMAIL_TIMESTAMP--}</STRONG></TD>
+               <TD class="bottom2" align="center"><STRONG>{--EMAIL_DELETE_COUNT--}</STRONG></TD>
        </TR>
        <TR>
-               <TD class="top2 right2 admin_misc" align="center">{!__ID!}</TD>
-               <TD class="top2 right2 admin_misc" align="center">{!__SUBJECT!}</TD>
-               <TD class="top2 right2 admin_misc" align="center"><A
+               <TD class="right2 admin_misc" align="center">{!__ID!}</TD>
+               <TD class="right2 admin_misc" align="center">{!__SUBJECT!}</TD>
+               <TD class="right2 admin_misc" align="center"><A
                        href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</A></TD>
-               <TD class="top2 right2 admin_misc" align="center">{!__ORDERED!}</TD>
+               <TD class="right2 admin_misc" align="center">{!__ORDERED!}</TD>
+               <TD class="admin_misc" align="center">{!__CNT!}</TD>
        </TR>
 </TABLE>