More filters created, TODOs.txt updated, config_mediadata fixed
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 03:23:49 +0000 (03:23 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 03:23:49 +0000 (03:23 +0000)
16 files changed:
DOCS/TODOs.txt
inc/extensions/ext-other.php
inc/extensions/ext-uberwach.php
inc/filter-functions.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/libs/other_functions.php
inc/libs/uberwach_functions.php
inc/modules/guest/what-login.php
inc/mysql-connect.php
inc/mysql-manager.php
install.php
mailid_top.php
templates/de/html/admin/admin_config_mediadata.tpl
templates/de/html/page_footer.tpl

index 779093bcdf526831734ec069408b4cf32115ec06..96ecd6353ac97951ee9de198a812e04e0ca19916 100644 (file)
@@ -15,7 +15,6 @@
 ./inc/extensions/ext-yoomedia.php:55:// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y');
 ./inc/extensions-functions.php:370:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions-functions.php:481:            // @TODO Extension is loaded, what next?
-./inc/footer.php:47:   // @TODO Rewrite these all into filters
 ./inc/functions.php:1346:      // @TODO Remove this if() block if all is working fine
 ./inc/functions.php:222:       // @TODO Remove this sanity-check if all is fine
 ./inc/functions.php:225:       // @TODO Try to rewrite all $DATA to $content
 ./inc/modules/member/what-unconfirmed.php:132: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/order.php:75:            // @TODO Unused: 2,4
 ./inc/monthly/monthly_bonus.php:70:    // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1599:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1807:                  // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:2123:          // @TODO This can be somehow rewritten
+./inc/mysql-manager.php:1592:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1800:                  // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:2116:          // @TODO This can be somehow rewritten
 ./inc/mysql-manager.php:220:                   // @TODO Nothing helped???
 ./inc/mysql-manager.php:255:                   // @TODO Rewrite this to a filter
 ./inc/mysql-manager.php:576:   // @TODO Try to rewrite this to one or more functions
 ./mailid.php:135:                                      // @TODO Rewrite this to a filter
 ./mailid.php:215:      // @TODO Rewrite this to a dynamic include or so
 ./mailid.php:94:               // @TODO Rewrite this to a filter
-./mailid_top.php:135:                                  // @TODO Rewrite this to a filter
-./mailid_top.php:182:                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:189:                                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:225:                                                                  // @TODO Rewrite these blocks to filter
-./mailid_top.php:260:                                                                          // @TODO Try to rewrite the following unset()
-./mailid_top.php:92:           // @TODO Rewrite this to a filter
+./mailid_top.php:139:                                  // @TODO Rewrite this to a filter
+./mailid_top.php:186:                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:193:                                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:229:                                                                  // @TODO Rewrite these blocks to filter
+./mailid_top.php:264:                                                                          // @TODO Try to rewrite the following unset()
+./mailid_top.php:96:           // @TODO Rewrite this to a filter
 ./view.php:72:         // @TODO No banner found, output some default banner
 ### ### DEPRECATION FOLLOWS: ### ###
 ./inc/functions.php:249:               // @DEPRECATED Try to rewrite the if() condition
index fd0c94b00a548c0fcc5abb33aa2ad96e4685a436..5d0472bdad2c67a94978c99419b9794d564a932f 100644 (file)
@@ -42,10 +42,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.2.3');
+setThisExtensionVersion('0.2.4');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -59,6 +59,9 @@ switch (getExtensionMode()) {
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
+
+               // Unregister filter
+               unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -210,6 +213,14 @@ switch (getExtensionMode()) {
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Fehlende Konfiguration hinzugef&uuml;gt.");
                                break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Register filter
+                               registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgef&uuml;hrten SQL-Anweisungen hinzugef&uuml;gt.");
+                               break;
                }
                break;
 
index 4d25dc9836fc8725558fe2dea63943b0eff19ef7..ed1ea89b501e449d779eaec00dd080eb53ffe730 100644 (file)
@@ -42,10 +42,10 @@ if (!defined('__SECURITY')) {
 }
 
 // Version number
-setThisExtensionVersion('0.0');
+setThisExtensionVersion('0.0.1');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0'));
+setExtensionVersionHistory(array('0.0', '0.0.1'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -53,7 +53,8 @@ switch (getExtensionMode()) {
                break;
 
        case 'remove': // Do stuff when removing extension
-               // SQL commands to run
+               // Unregister filter
+               unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -67,10 +68,10 @@ switch (getExtensionMode()) {
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.0.1': // SQL queries for v0.0.1
-                               addExtensionSql('');
+                               registerFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes('');
+                               setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugef&uuml;gt");
                                break;
                } // END - switch
                break;
index d76cad43ed1d8bc42b7c02d03ebe2e276f5311fb..7c88b79ca9e814abb561b2946335c165349e1ada 100644 (file)
@@ -127,6 +127,7 @@ ORDER BY
        registerFilter('init', 'TRIGGER_SENDING_POOL');
        registerFilter('init', 'DETERMINE_USERNAME');
        registerFilter('init', 'DETERMINE_WHAT_ACTION');
+       registerFilter('init', 'COUNT_MODULE');
        registerFilter('init', 'UPDATE_LOGIN_DATA');
        registerFilter('init', 'ACTIVATE_EXCHANGE');
 
@@ -174,6 +175,14 @@ ORDER BY
 
        // Exclude some users
        registerFilter('exclude_users', 'HTML_INCLUDE_USERS');
+
+       // Handling of fatal errors
+       registerFilter('handle_fatal_errors', 'HANDLE_FATAL_ERRORS');
+
+       // Page footer filters
+       registerFilter('page_footer', 'HANDLE_FATAL_ERRORS');
+       registerFilter('page_footer', 'DISPLAY_COPYRIGHT');
+       registerFilter('page_footer', 'DISPLAY_PARSING_TIME');
 }
 
 // "Registers" a new filter function
index 5b007f3d2132d9721e619a87cf183e076d3acee6..a91dee3e0faae187ef5c8dc4fd714e0d8e3e1a13 100644 (file)
@@ -696,5 +696,122 @@ function FILTER_INIT_RANDOM_NUMBER () {
        setConfigEntry('CACHE_BUSTER', getConfig('RAND_NUMBER'));
 }
 
+// Update module counter
+function FILTER_COUNT_MODULE () {
+       // Do count all other modules but not accesses on CSS file css.php!
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1",
+               array(getModule()), __FUNCTION__, __LINE__);
+}
+
+// Handles fatal errors
+function FILTER_HANDLE_FATAL_ERRORS () {
+       // Do we have errors to handle and right output mode?
+       if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) {
+               // Abort executing here
+               return false;
+       } // END - if
+
+       // Set content type
+       setContentType('text/html');
+
+       // Load config here
+       loadIncludeOnce('inc/load_config.php');
+
+       // Set unset variable
+       if (empty($check)) $check = '';
+
+       // Default is none
+       $content = '';
+
+       // Installation phase or regular mode?
+       if ((isInstallationPhase())) {
+               // While we are installing ouput other header than while it is installed... :-)
+               $OUT = '';
+               foreach (getFatalArray() as $key => $value) {
+                       // Prepare content for the template
+                       $content = array(
+                               'key'   => ($key + 1),
+                               'value' => $value
+                       );
+
+                       // Load row template
+                       $OUT .= loadTemplate('install_fatal_row', true, $content);
+               }
+
+               // Load main template
+               $content = loadTemplate('install_fatal_table', true, $OUT);
+       } elseif (isInstalled()) {
+               // Display all runtime fatal errors
+               $OUT = '';
+               foreach (getFatalArray() as $key => $value) {
+                       // Prepare content for the template
+                       $content = array(
+                               'key'   => ($key + 1),
+                               'value' => $value
+                       );
+
+                       // Load row template
+                       $OUT .= loadTemplate('runtime_fatal_row', true, $content);
+               }
+
+               // Load main template
+               $content = loadTemplate('runtime_fatal_table', true, $OUT);
+       }
+
+       // Message to regular users (non-admin)
+       $CORR = getMessage('FATAL_REPORT_ERRORS');
+
+       // PHP warnings fixed
+       if ($check == 'done') {
+               if (isAdmin()) $CORR = getMessage('FATAL_CORRECT_ERRORS');
+       } // END - if
+
+       // Remember all in array
+       $content = array(
+               'rows' => $content,
+               'corr' => $CORR
+       );
+
+       // Load footer
+       loadIncludeOnce('inc/header.php');
+
+       // Load main template
+       loadTemplate('fatal_errors', false, $content);
+
+       // Delete all to prevent double-display
+       initFatalMessages();
+
+       // Load footer
+       loadIncludeOnce('inc/footer.php');
+
+       // Abort here
+       shutdown();
+}
+
+// Filter for displaying copyright line
+function FILTER_DISPLAY_COPYRIGHT () {
+       // Shall we display the copyright notice?
+       if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) {
+               // Backlink enabled?
+               if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
+                       // Copyright with backlink, thanks! :-)
+                       loadTemplate('copyright_backlink');
+               } else {
+                       // No backlink in Copyright note
+                       loadTemplate('copyright');
+               }
+       } // END - if
+}
+
+// Filter for displaying parsing time
+function FILTER_DISPLAY_PARSING_TIME () {
+       // Shall we display the parsing time and number of queries?
+       // 1234                            5                      54    4         5              5       4    4                       5       543    3                   4432    2             33     2    2                              21
+       if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == 0) && ($GLOBALS['header_sent'] == 2)) {
+               // Then display it here
+               displayParsingTime();
+       } // END - if
+}
+
 // [EOF]
 ?>
index d4f6a4d1d7ac95be0f5017e865ee50462a16b9ed..9907b0608f15455f6c038a7e75775fd6e81dd978 100644 (file)
@@ -44,46 +44,11 @@ if (!defined('__SECURITY')) {
 // Footer disabled or already sent?
 // 1234      5                       54    45                              5    5                              543    3                              321
 if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (getOutputMode() != 1))) {
-       // @TODO Rewrite these all into filters
-       // Handle fatal errors
-       handleFatalErrors();
-
-       // Shall we display the copyright notice?
-       if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) {
-               // Backlink enabled?
-               if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
-                       // Copyright with backlink, thanks! :-)
-                       loadTemplate('copyright_backlink');
-               } else {
-                       // No backlink in Copyright note
-                       loadTemplate('copyright');
-               }
-       } // END - if
-
-       // Shall we display the parsing time and number of queries?
-       // 1234                            5                      54    4         5              5       4    4                       5       543    3                   4432    2             33     2    2                              21
-       if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == 0) && ($GLOBALS['header_sent'] == 2)) {
-               // Then display it here
-               displayParsingTime();
-       } // END - if
-
-       // Shall we display SQL queries?
-       if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
-               // Then display it here
-               displayDebugSqls();
-       } // END - if
-
-       // Shall we include the uberwach snippet?
-       if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
-               // Then display it here
-               loadUberwachSnippet();
-       } // END - if
+       // Run the filter, sweet huh?
+       runFilterChain('page_footer');
 
        // Load page footer
        loadTemplate('page_footer');
-
-       // And the last closing HTML tag
-       outputHtml('</html>');
 } // END - if
 
 // Footer has been reached
index c7064dccf77d16a91138714a7e402e26674855cd..e50b598ef3d220c6d14fcbba8174b886635ce4cc 100644 (file)
@@ -3521,91 +3521,6 @@ function getMessageFromIndexedArray ($message, $pos, $array) {
        return $ret;
 }
 
-// Handles fatal errors
-function handleFatalErrors () {
-       // Do we have errors to handle and right output mode?
-       if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) {
-               // Abort executing here
-               return false;
-       } // END - if
-
-       // Set content type
-       setContentType('text/html');
-
-       // Load config here
-       loadIncludeOnce('inc/load_config.php');
-
-       // Set unset variable
-       if (empty($check)) $check = '';
-
-       // Default is none
-       $content = '';
-
-       // Installation phase or regular mode?
-       if ((isInstallationPhase())) {
-               // While we are installing ouput other header than while it is installed... :-)
-               $OUT = '';
-               foreach (getFatalArray() as $key => $value) {
-                       // Prepare content for the template
-                       $content = array(
-                               'key'   => ($key + 1),
-                               'value' => $value
-                       );
-
-                       // Load row template
-                       $OUT .= loadTemplate('install_fatal_row', true, $content);
-               }
-
-               // Load main template
-               $content = loadTemplate('install_fatal_table', true, $OUT);
-       } elseif (isInstalled()) {
-               // Display all runtime fatal errors
-               $OUT = '';
-               foreach (getFatalArray() as $key => $value) {
-                       // Prepare content for the template
-                       $content = array(
-                               'key'   => ($key + 1),
-                               'value' => $value
-                       );
-
-                       // Load row template
-                       $OUT .= loadTemplate('runtime_fatal_row', true, $content);
-               }
-
-               // Load main template
-               $content = loadTemplate('runtime_fatal_table', true, $OUT);
-       }
-
-       // Message to regular users (non-admin)
-       $CORR = getMessage('FATAL_REPORT_ERRORS');
-
-       // PHP warnings fixed
-       if ($check == 'done') {
-               if (isAdmin()) $CORR = getMessage('FATAL_CORRECT_ERRORS');
-       } // END - if
-
-       // Remember all in array
-       $content = array(
-               'rows' => $content,
-               'corr' => $CORR
-       );
-
-       // Load footer
-       loadIncludeOnce('inc/header.php');
-
-       // Load main template
-       loadTemplate('fatal_errors', false, $content);
-
-       // Delete all to prevent double-display
-       initFatalMessages();
-
-       // Load footer
-       loadIncludeOnce('inc/footer.php');
-
-       // Abort here
-       shutdown();
-}
-
 // Print code with line numbers
 function linenumberCode ($code)    {
        if (!is_array($code)) $codeE = explode("\n", $code); else $codeE = $code;
index 4cc7b7cf03d4c07f0fda3c540288e59dc7a969c1..cc518c0718ea8905b26dc581e5c53728b03a0ac8 100644 (file)
@@ -65,5 +65,14 @@ function displayDebugSqls () {
        loadTemplate('admin_other_sqls', false, $OUT);
 }
 
+// Filter for debugging SQLs
+function FILTER_DISPLAY_DEBUG_SQL () {
+       // Shall we display SQL queries?
+       if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
+               // Then display it here
+               displayDebugSqls();
+       } // END - if
+}
+
 // [EOF]
 ?>
index 8539e5c8b97dde51b42819a95d87bbe6ef9b5b26..8f2a8e789ad594c8c94ea68cf19261a21a53ea65 100644 (file)
@@ -39,7 +39,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Loads the snippet for the uberwach action
 function loadUberwachSnippet () {
@@ -47,5 +47,14 @@ function loadUberwachSnippet () {
        loadTemplate('uberwach_snippet');
 }
 
-//
+// Filter for displaying uberwach snippet
+function FILTER_DISPLAY_UBERWACH_SNIPPET () {
+       // Shall we include the uberwach snippet?
+       if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
+               // Then display it here
+               loadUberwachSnippet();
+       } // END - if
+}
+
+// [EOF]
 ?>
index 03c05a6a87a71b96848ed9833448b5962d120ce2..b8bc4b148bec3b39d90ddf3945674250ef30ff7a 100644 (file)
@@ -133,7 +133,7 @@ if (!empty($URL)) {
        // URL was constructed
        if (getTotalFatalErrors() > 0) {
                // Handle fatal errors
-               handleFatalErrors();
+               runFilterChain('handle_fatal_errors');
        } else {
                // Load URL
                redirectToUrl($URL);
index e0914d2dd293524b5298152799fe49863cecdae6..d29d479a65eca35f0e4805e32c009356c8f1c965 100644 (file)
@@ -115,9 +115,6 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
                                // Check module for permissions
                                $checkModule = checkModulePermissions();
 
-                               // Cound module here
-                               countModuleHit(getModule());
-
                                // Admin module should be accessable by guests to login
                                if ((getModule() == 'admin') && ($checkModule == 'admin_only')) {
                                        // This is fine and can be ignored
@@ -183,7 +180,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
 }
 
 // Handle fatal errors
-handleFatalErrors();
+runFilterChain('handle_fatal_errors');
 
 // [EOF]
 ?>
index a82071dc9d05a7a52f2593a2304b43b6cff7dfc2..e377a6b3c1550698ac9d9675ec90394226879dc4 100644 (file)
@@ -939,13 +939,6 @@ function sendModeMails ($mod, $modes) {
        loadTemplate('admin_settings_saved', false, $content);
 }
 
-// Update module counter
-function countModuleHit($mod) {
-       // Do count all other modules but not accesses on CSS file css.php!
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1",
-               array($mod), __FUNCTION__, __LINE__);
-}
-
 // Get action value from mode (admin/guest/member) and what-value
 function getModeAction ($mode, $what) {
        // Init status
index 79e5d2f6d09df37b213d53e398ea6bf85d7511fe..2add71b7be8ef390ad86003930615233dbfe8436 100644 (file)
@@ -88,13 +88,13 @@ if ((isInstalled()) && (getRequestElement('page' != 'finished'))) {
 loadIncludeOnce('inc/header.php');
 
 // Handle fatal errors
-handleFatalErrors();
+runFilterChain('handle_fatal_errors');
 
 // Here start's our installtion stuff
 loadIncludeOnce('inc/install-inc.php');
 
 // Handle fatal errors again
-handleFatalErrors();
+runFilterChain('handle_fatal_errors');
 
 // Load main installation table
 loadTemplate('install_main', false, $GLOBALS['install_content']);
index dc8fb61b854b723f8ee4b934059afe78e553a123..c5fab11c92e0ccf609f5005824d052a2f8abe86b 100644 (file)
@@ -55,20 +55,21 @@ setContentType('text/html');
 // Is the extension active
 redirectOnUninstalledExtension('mailid');
 
-// Secure all data
+// Init variables
 $url_userid = 0;
 $url_bid = 0;
 $url_mid = 0;
 $code = 0;
 $mode = '';
 
+// Secure all data
 if (isGetRequestElementSet('userid'))  $url_userid = bigintval(getRequestElement('userid'));
 if (isGetRequestElementSet('mailid'))  $url_mid    = bigintval(getRequestElement('mailid'));
 if (isGetRequestElementSet('bonusid')) $url_bid    = bigintval(getRequestElement('bonusid'));
 if (isGetRequestElementSet('code'))    $code       = bigintval(getRequestElement('code'));
 if (isGetRequestElementSet('mode'))    $mode       = getRequestElement('mode');
 
-// 01        1        12            2    2            21    1                   22     10
+// 01           1        12            2    2            21    1                   22     10
 if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
        // No image? Then output header
        if ($mode != 'img') loadIncludeOnce('inc/header.php');
@@ -89,6 +90,9 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                list($lid, $ltype) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
+               // Init result here with invalid to avoid possible missing variable
+               $result_mailid = false;
+
                // @TODO Rewrite this to a filter
                switch ($ltype) {
                        case 'NORMAL':
index 0d30c410a1fd032a7378b0847d2421df66b20c7a..df6714ad9e353c428fd63dee54032571b36f2845 100644 (file)
@@ -13,7 +13,7 @@
                <td width="10" class="seperator">&nbsp;</td>
                <td align="right" width="275">{--ADMIN_MEDIADATA_MT_START--}:</td>
                <td width="10" class="seperator">&nbsp;</td>
-               <td align="center" width="275">{?__MT_START?}</td>
+               <td align="center" width="275">$content[mt_start]</td>
                <td width="10" class="seperator">&nbsp;</td>
        </tr>
        <tr>
@@ -24,7 +24,7 @@
                <td align="right" width="275">{--ADMIN_MEDIADATA_MT_STAGE--}:</td>
                <td width="10" class="seperator">&nbsp;</td>
                <td align="center" width="275"><input type="text" name="mt_stage"
-                       class="admin_normal" value="{?__MT_STAGE?}" size="6" maxlength="20" />
+                       class="admin_normal" value="{?mt_stage?}" size="6" maxlength="20" />
                </td>
                <td width="10" class="seperator">&nbsp;</td>
        </tr>
index dfc2e8ac889aff1f48708d85f39be1ee241f1472..9943ff0f851844f5daaccd7e1adca02a193936dc 100644 (file)
@@ -1,2 +1,3 @@
 </div>
 </body>
+</html>