From bc2da429e6d78668152427b7b5310268453553d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Nov 2009 03:50:03 +0000 Subject: [PATCH] debug_report_bug() does call app_die() again (internal TODO), nicer template for app_die(), TODOs.txt updated --- .gitattributes | 1 + DOCS/TODOs.txt | 45 +++++++++++++-------------- inc/functions.php | 7 ++--- inc/language/de.php | 2 ++ templates/de/html/app_die_message.tpl | 12 +++++++ 5 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 templates/de/html/app_die_message.tpl diff --git a/.gitattributes b/.gitattributes index b482900c07..54764a3b78 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1251,6 +1251,7 @@ templates/de/html/admin/admin_welcome.tpl -text templates/de/html/admin/admin_welcome_admins.tpl -text templates/de/html/admin/admin_yoomedia_error.tpl -text templates/de/html/agb.tpl -text +templates/de/html/app_die_message.tpl -text templates/de/html/beg/.htaccess -text templates/de/html/beg/beg_banner.tpl -text templates/de/html/beg/beg_done.tpl -text diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 7389c077a0..e477d96ca6 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -6,7 +6,7 @@ ./inc/classes/cachesystem.class.php:464: // @TODO Add support for more types which break in last else-block ./inc/config-functions.php:143: // @TODO Make this all better... :-/ ./inc/extensions/ext-html_mail.php:137: // @TODO Move these arrays into config -./inc/extensions/ext-network.php:71: // @TODO network_type_name is an internal name and needs documentation +./inc/extensions/ext-network.php:71: // @TODO network_type_handle is an internal name and needs documentation ./inc/extensions/ext-newsletter.php:215: // @TODO Move these into configuration ./inc/extensions/ext-rallye.php:330: // @TODO Move this code into rallye_functions.php ./inc/extensions/ext-rallye.php:93: // @TODO Fix config_rallye_prices to list_rallye_prices @@ -18,27 +18,26 @@ ./inc/extensions-functions.php:489: // @TODO Extension is loaded, what next? ./inc/filters.php:473: // @TODO This whole switch-block is very static ./inc/filters.php:538: case 'config': // @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again -./inc/functions.php:1033: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates -./inc/functions.php:241: // @TODO Remove this sanity-check if all is fine -./inc/functions.php:2431:// @TODO Please describe this function -./inc/functions.php:2449: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); -./inc/functions.php:244: // @TODO Try to rewrite all $DATA to $content -./inc/functions.php:2563: // @TODO Add a little more infos here -./inc/functions.php:2586: // @TODO This cannot be rewritten to app_die(), try to find a solution for this. -./inc/functions.php:2665: // @TODO Rewrite this old lost code to a template -./inc/functions.php:2754: // @TODO Are these convertions still required? -./inc/functions.php:2772:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:3650:// @TODO Lame description for this function -./inc/functions.php:3672: // @TODO Move this in a filter -./inc/functions.php:3790: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:456: // @TODO Do only use $content, not $DATA or raw variables -./inc/functions.php:526: // @TODO Extension 'msg' does not exist -./inc/functions.php:595:// @TODO Rewrite this to an extension 'smtp' -./inc/functions.php:998:// @TODO $simple is deprecated +./inc/functions.php:1002:// @TODO $simple is deprecated +./inc/functions.php:1037: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates +./inc/functions.php:2435:// @TODO Please describe this function +./inc/functions.php:2453: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); +./inc/functions.php:253: // @TODO Remove this sanity-check if all is fine +./inc/functions.php:2567: // @TODO Add a little more infos here +./inc/functions.php:256: // @TODO Try to rewrite all $DATA to $content +./inc/functions.php:2668: // @TODO Rewrite this old lost code to a template +./inc/functions.php:2757: // @TODO Are these convertions still required? +./inc/functions.php:2775:// @TODO Rewrite this function to use readFromFile() and writeToFile() +./inc/functions.php:3653:// @TODO Lame description for this function +./inc/functions.php:3675: // @TODO Move this in a filter +./inc/functions.php:3793: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:468: // @TODO Do only use $content, not $DATA or raw variables +./inc/functions.php:538: // @TODO Extension 'msg' does not exist +./inc/functions.php:607:// @TODO Rewrite this to an extension 'smtp' ./inc/install-functions.php:62: // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); -./inc/language/de.php:1146:// @TODO Rewrite these two constants -./inc/language/de.php:1162:// @TODO Rewrite these five constants -./inc/language/de.php:846:// @TODO Are these constants longer used? +./inc/language/de.php:1150:// @TODO Rewrite these two constants +./inc/language/de.php:1166:// @TODO Rewrite these five constants +./inc/language/de.php:848:// @TODO Are these constants longer used? ./inc/language-functions.php:228: // @TODO These are all valid languages, again hard-coded ./inc/language-functions.php:45:// @TODO Rewrite all language constants to this function. ./inc/language/holiday_de.php:49:// @TODO Rewrite these two constants to one @@ -174,7 +173,7 @@ ./inc/reset/reset_birthday.php:91: // @TODO 4 is hard-coded here, should we move it out in config? ./inc/wrapper-functions.php:127:// @TODO Implement $compress ./inc/wrapper-functions.php:134:// @TODO Implement $decompress -./inc/wrapper-functions.php:393:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:401:// @TODO Do some more sanity check here ./mailid.php:134: // @TODO Rewrite this to a filter ./mailid.php:214: // @TODO Rewrite this to a dynamic include or so ./mailid.php:94: // @TODO Rewrite this to a filter @@ -184,7 +183,7 @@ ./mailid_top.php:225: // @TODO Rewrite these blocks to filter ./mailid_top.php:260: // @TODO Try to rewrite the following unset() ./mailid_top.php:99: // @TODO Rewrite this to a filter -./view.php:72: // @TODO No banner found, output some default banner +./view.php:69: // @TODO No banner found, output some default banner ./templates/de/html/admin/admin_add_country.tpl:23: ./templates/de/html/admin/admin_admins_contct_form.tpl:3: ./templates/de/html/admin/admin_amenu_edit.tpl:4: diff --git a/inc/functions.php b/inc/functions.php index 95d143c2a3..8928e602fa 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2208,10 +2208,10 @@ function app_die ($F, $L, $message) { $message = sprintf(getMessage('MXCHANGE_HAS_DIED'), basename($F), $L, $message); // Better log this message away - logDebugMessage($F, $L, $message); + if ($F != 'debug_report_bug') logDebugMessage($F, $L, $message); // Load the message template - loadTemplate('admin_settings_saved', false, $message); + loadTemplate('app_die_message', false, $message); // Load footer loadIncludeOnce('inc/footer.php'); @@ -2587,8 +2587,7 @@ function debug_report_bug ($message = '', $sendEmail = true) { } // END - if // And abort here - // @TODO This cannot be rewritten to app_die(), try to find a solution for this. - die($debug); + app_die(__FUNCTION__, __LINE__, $debug); } // Generates a ***weak*** seed diff --git a/inc/language/de.php b/inc/language/de.php index 2f188169dc..a3ff6384cf 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -104,6 +104,7 @@ addMessages(array( 'ADMIN_NO_PASS2' => "Sie haben keine Passwortwiederholung eingegeben.", 'ADMIN_SHORT_PASS1' => "Das Passwort ist zu kurz! Mindestens 4 Zeichen.", 'ADMIN_SHORT_PASS2' => "Die Passwortwiederholung ist zu kurz! Mindestens 4 Zeichen.", + 'ADMIN_SHORT_PASS' => "Ihr Administratorpasswort ist zu kurz! Mindestens 4 Zeichen", 'ADMIN_PASS1_MISMATCH' => "Das Passwort stimmt nicht mit der Wiederholung überein.", 'ADMIN_PASS2_MISMATCH' => "Die Passwortwiederholung stimmt nicht mit dem Passwort überein.", 'ADMIN_LOGIN_ALREADY_REG' => "Das von Ihnen eingegebene Admin-Login existiert bereits.", @@ -1059,6 +1060,7 @@ addMessages(array( 'EMAIL_DELETE_COUNT' => "Buchungseinträge gelöscht", 'MXCHANGE_HAS_DIED' => "{?TITLE?} ist in Script/Funktion %s, Zeile %s mit folgender Meldung gestorben: %s", 'ADMIN_CONFIG_POINTS_TITLE' => "Einstellungen für {?POINTS?}", + 'APP_DIE_TITLE' => "Fehler im Script erkannt!", 'ADMIN_SEND_RESET_LINK_TITLE' => "1/4: Administratorkennwort zurücksetzen", 'ADMIN_VALIDATE_HASH_TITLE' => "2/4: Validierung Iher Logindaten", diff --git a/templates/de/html/app_die_message.tpl b/templates/de/html/app_die_message.tpl new file mode 100644 index 0000000000..de36f875d2 --- /dev/null +++ b/templates/de/html/app_die_message.tpl @@ -0,0 +1,12 @@ +
+ +
+
+ {--APP_DIE_TITLE--} +
+
+ $content +
+
+ +
-- 2.30.2