From 1b858d863d345dc7bcc4bed0c169091b084b3a0c Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 14 May 2006 17:09:29 +0000 Subject: [PATCH] updating error_box() function calls. second argument was modified. using squirrelmail template code for closing html tags. added some comments in footer.tpl in order to detect generated footer git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11135 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/addressbook.php | 4 ++-- functions/display_messages.php | 22 ++++++++++++++----- functions/folder_manip.php | 5 +++-- functions/imap_general.php | 14 ++++++------ plugins/bug_report/bug_report.php | 4 ++-- plugins/bug_report/show_system_specs.php | 4 ++-- plugins/calendar/calendar_data.php | 2 +- plugins/change_password/backend/ldap.php | 9 ++++---- plugins/change_password/backend/merak.php | 6 ++--- plugins/change_password/backend/peardb.php | 10 ++++----- plugins/change_password/backend/template.php | 6 ++--- plugins/change_password/backend/vmailmgrd.php | 14 ++++++------ plugins/info/options.php | 5 +++-- plugins/listcommands/mailout.php | 4 +++- plugins/sent_subfolders/setup.php | 2 +- plugins/spamcop/spamcop.php | 5 +++-- plugins/squirrelspell/modules/check_me.mod | 18 +++++++-------- plugins/squirrelspell/sqspell_interface.php | 5 +++-- plugins/squirrelspell/sqspell_options.php | 5 +++-- plugins/translate/functions.php | 2 +- src/delete_message.php | 2 +- src/help.php | 12 +++++----- src/login.php | 10 +++++---- src/printer_friendly_main.php | 2 +- templates/default/footer.tpl | 1 + 25 files changed, 98 insertions(+), 75 deletions(-) diff --git a/functions/addressbook.php b/functions/addressbook.php index 0e20957a..e4872446 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -27,7 +27,7 @@ include_once(SM_PATH . 'templates/util_global.php'); * @return object address book object. */ function addressbook_init($showerr = true, $onlylocal = false) { - global $data_dir, $username, $color, $ldap_server, $address_book_global_filename; + global $data_dir, $username, $ldap_server, $address_book_global_filename; global $addrbook_dsn, $addrbook_table; global $abook_global_file, $abook_global_file_writeable, $abook_global_file_listing; global $addrbook_global_dsn, $addrbook_global_table, $addrbook_global_writeable, $addrbook_global_listing; @@ -158,7 +158,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { * display address book init errors. */ if ($abook_init_error!='' && $showerr) { - error_box($abook_init_error,$color); + error_box($abook_init_error); } /* Return the initialized object */ diff --git a/functions/display_messages.php b/functions/display_messages.php index f0c79f25..f5300b38 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -109,11 +109,19 @@ function logout_error( $errString, $errTitle = '' ) { * Displays error message * * Since 1.4.1 function checks if page header is already displayed. + * * Since 1.4.3 and 1.5.1 function contains error_box hook. * Use plain_error_message() and make sure that page header is created, * if you want compatibility with 1.4.0 and older. + * + * In 1.5.2 second function argument is changed. Older functions used it + * for $color array, new function uses it for optional link data. Function + * will ignore color array and use standard colors instead. * @param string $string Error message to be displayed - * @param mixed $link Optional array containing link details to be displayed + * @param array $link Optional array containing link details to be displayed. + * Array uses three keys. 'URL' key is required and should contain link URL. + * 'TEXT' key is optional and should contain link name. 'FRAME' key is + * optional and should contain link target attribute. * @since 1.3.2 */ function error_box($string, $link=NULL) { @@ -134,10 +142,14 @@ function error_box($string, $link=NULL) { // Double check the link for everything we need if (!is_null($link)) { - if (!isset($link['FRAME'])) - $link['FRAME'] = ''; - if (!isset($link['TEXT'])) - $link['TEXT'] = $link['URL']; + // safety check for older code + if (isset($link['URL'])) { + if (!isset($link['FRAME'])) $link['FRAME'] = ''; + if (!isset($link['TEXT'])) $link['TEXT'] = $link['URL']; + } else { + // somebody used older error_box() code + $link=null; + } } /** ERROR is pre-translated to avoid multiple translation calls. **/ diff --git a/functions/folder_manip.php b/functions/folder_manip.php index 3211c888..22ef6e13 100644 --- a/functions/folder_manip.php +++ b/functions/folder_manip.php @@ -25,15 +25,16 @@ function folders_checkname($imapConnection, $folder_name, $delimiter) if (substr_count($folder_name, '"') || substr_count($folder_name, "\\") || substr_count($folder_name, $delimiter) || ($folder_name == '')) { - global $color; + global $color, $oTemplate; error_box(_("Illegal folder name.") . "
\n" . sprintf(_("The name may not contain any of the following: %s"), '" \\ '.$delimiter.'') . "
\n" . _("Please select a different name."). '
'. - _("Click here to go back") . '.', $color); + _("Click here to go back") . '.'); sqimap_logout($imapConnection); + $oTemplate->display('footer.tpl'); exit; } } diff --git a/functions/imap_general.php b/functions/imap_general.php index 80d40d12..01d51f34 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -66,7 +66,7 @@ function sqimap_run_command_list ($imap_stream, $query, $handle_errors, &$respon $string = "\n" . _("ERROR: No available IMAP stream.") . "\n"; - error_box($string,$color); + error_box($string); return false; } } @@ -116,7 +116,7 @@ function sqimap_run_command ($imap_stream, $query, $handle_errors, &$response, $string = "\n" . _("ERROR: No available IMAP stream.") . "\n"; - error_box($string,$color); + error_box($string); return false; } } @@ -314,7 +314,7 @@ function sqimap_fread($imap_stream,$iSize,$filter=false, */ function sqimap_read_data_list($imap_stream, $tag, $handle_errors, &$response, &$message, $query = '') { - global $color, $squirrelmail_language; + global $color, $oTemplate, $squirrelmail_language; set_up_language($squirrelmail_language); $string = "\n" . _("ERROR: Bad function call.") . @@ -326,8 +326,8 @@ function sqimap_read_data_list($imap_stream, $tag, $handle_errors, 'sqimap_run_command or sqimap_run_command_list instead

'. 'The following query was issued:
'. htmlspecialchars($query) . '
' . "

\n"; - error_box($string,$color); - echo ''; + error_box($string); + $oTemplate->display('footer.tpl'); exit; } @@ -359,7 +359,7 @@ function sqimap_error_box($title, $query = '', $message_title = '', $message = ' $string .= "
\n"; if ($link != '') $string .= $link; - error_box($string,$color); + error_box($string); } /** @@ -878,7 +878,7 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $ $string .= htmlspecialchars($line) . "
\n"; } } - error_box($string,$color); + error_box($string); exit; } else { /* diff --git a/plugins/bug_report/bug_report.php b/plugins/bug_report/bug_report.php index 5f95e243..f24cfccc 100644 --- a/plugins/bug_report/bug_report.php +++ b/plugins/bug_report/bug_report.php @@ -28,8 +28,8 @@ displayPageHeader($color, 'None'); /** is bug_report plugin disabled or called by wrong user */ if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) { - error_box(_("Plugin is disabled."),$color); - echo "\n\n"; + error_box(_("Plugin is disabled.")); + $oTemplate->display('footer.tpl'); exit(); } diff --git a/plugins/bug_report/show_system_specs.php b/plugins/bug_report/show_system_specs.php index 6d79a4fd..293e13b9 100644 --- a/plugins/bug_report/show_system_specs.php +++ b/plugins/bug_report/show_system_specs.php @@ -19,8 +19,8 @@ include_once(SM_PATH.'plugins/bug_report/functions.php'); /** is bug_report plugin disabled or called by wrong user */ if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) { - error_box(_("Plugin is disabled."),$color); - echo "\n\n"; + error_box(_("Plugin is disabled.")); + $oTemplate->display('footer.tpl'); exit(); } ?> diff --git a/plugins/calendar/calendar_data.php b/plugins/calendar/calendar_data.php index 3d6fe0af..bb32daa3 100644 --- a/plugins/calendar/calendar_data.php +++ b/plugins/calendar/calendar_data.php @@ -116,7 +116,7 @@ function writecalendardata() { $calstr = "$calfoo[key]|$calbar[key]|$calfoobar[length]|$calfoobar[priority]|$calfoobar[title]|$calfoobar[message]|$calfoobar[reminder]\n"; if(sq_fwrite($fp, $calstr, 4096) === FALSE) { - error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"), $color); + error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp")); } } diff --git a/plugins/change_password/backend/ldap.php b/plugins/change_password/backend/ldap.php index 34697600..42f128ff 100644 --- a/plugins/change_password/backend/ldap.php +++ b/plugins/change_password/backend/ldap.php @@ -158,27 +158,26 @@ $squirrelmail_plugin_hooks['change_password_init']['ldap'] = * Makes sure that required functions and configuration options are set. */ function cpw_ldap_init() { - global $color; - global $cpw_ldap_basedn; + global $oTemplate, $cpw_ldap_basedn; // set initial value for error tracker $cpw_ldap_initerr=false; // check for ldap support in php if (! function_exists('ldap_connect')) { - error_box(_("Current configuration requires LDAP support in PHP."),$color); + error_box(_("Current configuration requires LDAP support in PHP.")); $cpw_ldap_initerr=true; } // chech required configuration settings. if ($cpw_ldap_basedn=='') { - error_box(_("Plugin is not configured correctly."),$color); + error_box(_("Plugin is not configured correctly.")); $cpw_ldap_initerr=true; } // if error var is positive, close html and stop execution if ($cpw_ldap_initerr) { - echo ''; + $oTemplate->display('footer.tpl'); exit; } } diff --git a/plugins/change_password/backend/merak.php b/plugins/change_password/backend/merak.php index ea845f9d..2a945886 100644 --- a/plugins/change_password/backend/merak.php +++ b/plugins/change_password/backend/merak.php @@ -41,13 +41,13 @@ $squirrelmail_plugin_hooks['change_password_init']['merak'] = * Check if php install has all required extensions. */ function cpw_merak_init() { - global $color; + global $oTemplate; if (!function_exists('curl_init')) { // user_error('Curl module NOT available!', E_USER_ERROR); - error_box(_("PHP Curl extension is NOT available! Unable to change password!"),$color); + error_box(_("PHP Curl extension is NOT available! Unable to change password!")); // close html and stop script execution - echo "\n"; + $oTemplate->display('footer.tpl'); exit(); } } diff --git a/plugins/change_password/backend/peardb.php b/plugins/change_password/backend/peardb.php index e3d10413..acec1493 100644 --- a/plugins/change_password/backend/peardb.php +++ b/plugins/change_password/backend/peardb.php @@ -106,19 +106,19 @@ $squirrelmail_plugin_hooks['change_password_init']['peardb'] = * Checks if configuration is correct */ function cpw_peardb_init() { - global $color, $cpw_peardb_detect, $cpw_peardb_dsn, $cpw_peardb_table; + global $oTemplate, $cpw_peardb_detect, $cpw_peardb_dsn, $cpw_peardb_table; if (! $cpw_peardb_detect) { - error_box(_("Plugin is unable to use PHP Pear DB libraries. PHP Pear includes must be available in your PHP include_path setting."),$color); - echo "\n"; + error_box(_("Plugin is unable to use PHP Pear DB libraries. PHP Pear includes must be available in your PHP include_path setting.")); + $oTemplate->display('footer.tpl'); exit(); } // Test required settings if ((is_string($cpw_peardb_dsn) && trim($cpw_peardb_dsn)=='') || trim($cpw_peardb_table)=='' ) { - error_box(_("Required change password backend configuration options are missing."),$color); - echo "\n"; + error_box(_("Required change password backend configuration options are missing.")); + $oTemplate->display('footer.tpl'); exit(); } } diff --git a/plugins/change_password/backend/template.php b/plugins/change_password/backend/template.php index e7b0a8b4..16bd3279 100644 --- a/plugins/change_password/backend/template.php +++ b/plugins/change_password/backend/template.php @@ -39,12 +39,12 @@ $squirrelmail_plugin_hooks['change_password_init']['template'] = */ function cpw_template_init() { - global $color; + global $oTemplate; // plugin is not configured. Handle error gracefully. - error_box(_("No valid backend defined."),$color); + error_box(_("No valid backend defined.")); // close html and stop script execution - echo "\n"; + $oTemplate->display('footer.tpl'); exit(); } diff --git a/plugins/change_password/backend/vmailmgrd.php b/plugins/change_password/backend/vmailmgrd.php index e8f70a62..1a5fb9ff 100644 --- a/plugins/change_password/backend/vmailmgrd.php +++ b/plugins/change_password/backend/vmailmgrd.php @@ -104,13 +104,13 @@ $squirrelmail_plugin_hooks['change_password_init']['vmailmgrd'] = * is displayed to the user. */ function cpw_vmailmgrd_init(){ - global $vmail_inc_path, $color, $username; + global $vmail_inc_path, $username, $oTemplate; if ($vmail_inc_path=='' || ! file_exists($vmail_inc_path)) { // $vmail_inc_path is not set or file does not exist - error_box(_("Incorrent path to vmail.inc file."),$color); + error_box(_("Incorrent path to vmail.inc file.")); // close html and stop script execution - echo "\n"; + $oTemplate->display('footer.tpl'); exit(); } @@ -118,17 +118,17 @@ function cpw_vmailmgrd_init(){ if (! function_exists('vchpass')) { // included vmail.inc does not have required functions. - error_box(_("Invalid or corrupted vmail.inc file."),$color); + error_box(_("Invalid or corrupted vmail.inc file.")); // close html and stop script execution - echo "\n"; + $oTemplate->display('footer.tpl'); exit(); } if (! preg_match("/(.*)\@(.*)/", $username)) { // username does not match vmailmgr syntax - error_box(_("Invalid user."),$color); + error_box(_("Invalid user.")); // close html and stop script execution - echo "\n"; + $oTemplate->display('footer.tpl'); exit(); } } diff --git a/plugins/info/options.php b/plugins/info/options.php index 1046b86b..85677c19 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -35,8 +35,9 @@ $mailbox = 'INBOX'; * prevent use of plugin if it is not enabled */ if (! is_plugin_enabled('info')) { - error_box(_("Plugin is disabled."),$color); - echo ''; + error_box(_("Plugin is disabled.")); + // display footer (closes html) and stop script execution + $oTemplate->display('footer.tpl'); exit; } diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index c319fc10..dd9e5de1 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -41,7 +41,9 @@ switch ( $action ) { $out_string = _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below."); break; default: - error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action)), $color); + error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action))); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); exit; } diff --git a/plugins/sent_subfolders/setup.php b/plugins/sent_subfolders/setup.php index 42070e33..4f9f38ea 100644 --- a/plugins/sent_subfolders/setup.php +++ b/plugins/sent_subfolders/setup.php @@ -254,7 +254,7 @@ function sent_subfolders_update_sentfolder() { if (sqimap_mailbox_is_noselect($ic,$sent_subfolder,$boxes) || ($level==2 && sqimap_mailbox_is_noinferiors($ic,$year_folder,$boxes)) || sqimap_mailbox_is_noinferiors($ic,$sent_subfolders_base,$boxes)) { - error_box(_("Sent Subfolders plugin is misconfigured."),$color); + error_box(_("Sent Subfolders plugin is misconfigured.")); } else { if ($level==2) { /* Auto-create the year folder, if it does not yet exist. */ diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index a0730344..96ede3aa 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -57,8 +57,9 @@ if ($js_web) { /** is spamcop plugin disabled */ if (! is_plugin_enabled('spamcop')) { - error_box(_("Plugin is disabled."),$color); - echo "\n\n"; + error_box(_("Plugin is disabled.")); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); exit(); } diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index 7f0273bd..1fb75b5d 100644 --- a/plugins/squirrelspell/modules/check_me.mod +++ b/plugins/squirrelspell/modules/check_me.mod @@ -100,21 +100,21 @@ if( check_php_version ( 4, 3 ) ) { if ( ! is_resource ( $spell_proc ) ) { // TODO: replace error_box() with sqspell_makeWindow() error_box ( sprintf(_("Could not run the spellchecker command (%s)."), - htmlspecialchars($sqspell_command) ) , $color ); - // close html tags and abort script. - echo ""; + htmlspecialchars($sqspell_command) ) ); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); exit(); } if ( ! @fwrite($pipes[0], $sqspell_new_text) ) { // TODO: replace error_box() with sqspell_makeWindow() - error_box ( _("Error while writing to pipe.") , $color ); + error_box ( _("Error while writing to pipe.") ); // close all three $pipes here. for($i=0; $i<=2; $i++) { // disable all fclose error messages @fclose($pipes[$i]); } // close html tags and abort script. - echo ""; + $oTemplate->display('footer.tpl'); exit(); } fclose($pipes[0]); @@ -140,19 +140,19 @@ if( check_php_version ( 4, 3 ) ) { if ( ! is_resource ($fp) ) { // TODO: replace error_box() with sqspell_makeWindow() error_box ( sprintf(_("Could not open temporary file '%s'."), - htmlspecialchars($floc) ) , $color ); + htmlspecialchars($floc) ) ); // failed to open temp file. abort script. - echo ""; + $oTemplate->display('footer.tpl'); exit(); } if ( ! @fwrite($fp, $sqspell_new_text) ) { // TODO: replace error_box() with sqspell_makeWindow() error_box ( sprintf(_("Error while writing to temporary file '%s'."), - htmlspecialchars($floc) ) , $color ); + htmlspecialchars($floc) ) ); // close file descriptor fclose($fp); // failed writing to temp file. abort script. - echo ""; + $oTemplate->display('footer.tpl'); exit(); } fclose($fp); diff --git a/plugins/squirrelspell/sqspell_interface.php b/plugins/squirrelspell/sqspell_interface.php index 4d3cf5e2..417e8c60 100644 --- a/plugins/squirrelspell/sqspell_interface.php +++ b/plugins/squirrelspell/sqspell_interface.php @@ -46,7 +46,8 @@ sqspell_ckMOD($MOD); if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) { require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); } else { - error_box(_("Invalid SquirrelSpell module."),$color); - echo ''; + error_box(_("Invalid SquirrelSpell module.")); + // display sm footer (closes html tags) + $oTemplate->display('footer.tpl'); } ?> \ No newline at end of file diff --git a/plugins/squirrelspell/sqspell_options.php b/plugins/squirrelspell/sqspell_options.php index a477575b..7db23a00 100644 --- a/plugins/squirrelspell/sqspell_options.php +++ b/plugins/squirrelspell/sqspell_options.php @@ -43,7 +43,8 @@ sqspell_ckMOD($MOD); if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) { require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); } else { - error_box(_("Invalid SquirrelSpell module."),$color); - echo ''; + error_box(_("Invalid SquirrelSpell module.")); + // display footer (closes html tags) + $oTemplate->display('footer.tpl'); } ?> \ No newline at end of file diff --git a/plugins/translate/functions.php b/plugins/translate/functions.php index 8acae0c1..4dfcdabf 100644 --- a/plugins/translate/functions.php +++ b/plugins/translate/functions.php @@ -85,7 +85,7 @@ function translate_read_form_function() { $translate_server_option='translate_' . $translate_server . '_enabled'; if ($translate_server=='gpltrans' && $translate_gpltrans_url=='' || ! $$translate_server_option || ! function_exists('translate_form_' . $translate_server)) { - error_box(_("Selected translation engine is disabled. Please update your translation preferences."),$color); + error_box(_("Selected translation engine is disabled. Please update your translation preferences.")); return; } $translate_dir = 'to'; diff --git a/src/delete_message.php b/src/delete_message.php index 5c6cd38e..a46f96e4 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -15,6 +15,6 @@ * Include the SquirrelMail initialization file. */ include('../include/init.php'); -error_box('delete_message.php script is obsolete since 1.5.1.',$color); +error_box('delete_message.php script is obsolete since 1.5.1.'); $oTemplate->display('footer.tpl'); ?> \ No newline at end of file diff --git a/src/help.php b/src/help.php index f9d07b51..4f75306f 100644 --- a/src/help.php +++ b/src/help.php @@ -111,12 +111,14 @@ if (!isset($squirrelmail_language)) { if (file_exists("../help/$squirrelmail_language")) { $user_language = $squirrelmail_language; } else if (file_exists('../help/en_US')) { - error_box(_("Help is not available in the selected language. It will be displayed in English instead."), $color); + error_box(_("Help is not available in the selected language. It will be displayed in English instead.")); echo '
'; $user_language = 'en_US'; } else { - error_box( _("Help is not available. Please contact your system administrator for assistance."), $color ); - exit; + error_box( _("Help is not available. Please contact your system administrator for assistance.")); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); + exit(); } @@ -195,7 +197,7 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) { } elseif (file_exists("../help/en_US/" . $helpdir[$chapter-1])) { // If the selected language can't be found, try English. $doc = file("../help/en_US/" . $helpdir[$chapter-1]); - error_box(_("This chapter in not available in the selected language. It will be displayed in English instead."), $color); + error_box(_("This chapter in not available in the selected language. It will be displayed in English instead.")); echo '
'; } else { // If English can't be found, the chapter went MIA. @@ -245,7 +247,7 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) { echo '
' . _("Top") . '
'; } else { // If the help file went MIA, display an error message. - error_box(sprintf(_("For some reason, chapter %s is not available."), $chapter), $color); + error_box(sprintf(_("For some reason, chapter %s is not available."), $chapter)); } } diff --git a/src/login.php b/src/login.php index 69d1e170..02e81c69 100644 --- a/src/login.php +++ b/src/login.php @@ -67,7 +67,9 @@ if($imap_auth_mech == 'login') { $string .= _("Also, the use of TLS may allow SquirrelMail to login.").'
'; } $string .= _("Please contact your system administrator and report this error."); - error_box($string,$color); + error_box($string); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); exit; } } @@ -131,10 +133,10 @@ if (isset($org_logo) && $org_logo) { } $logo_str = '
'."\n"; + ' />
'."\n"; } $sm_attribute_str = ''; diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index fa6de8f4..45050fab 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -20,7 +20,7 @@ if ( ! sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_GET)) $passed_ent_id = 0; if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || ! sqgetGlobalVar('passed_id',$passed_id,SQ_GET)) { - error_box(_("Invalid URL"),$color); + error_box(_("Invalid URL")); } else { $passed_id= (int) $passed_id; $view_unsafe_images = (bool) $_GET['view_unsafe_images']; diff --git a/templates/default/footer.tpl b/templates/default/footer.tpl index 8de1394d..e330ad4e 100644 --- a/templates/default/footer.tpl +++ b/templates/default/footer.tpl @@ -18,5 +18,6 @@ extract($t); $this->display('error_message.tpl'); ?> + \ No newline at end of file -- 2.25.1