From 8f6e76d2772a1d5e72cb37287b1270c1496066be Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 19 Jan 2007 09:11:16 +0000 Subject: [PATCH] Remove HTML from org_logo on logout error page git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12146 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/display_messages.php | 21 +++++++++++---------- templates/default/error_logout.tpl | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/functions/display_messages.php b/functions/display_messages.php index 263c85ed..47a55f99 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -77,22 +77,23 @@ function logout_error( $errString, $errTitle = '' ) { /* If they don't have a logo, don't bother.. */ $logo_str = ''; if (isset($org_logo) && $org_logo) { - /* Display width and height like good little people */ - $width_and_height = ''; + if (isset($org_logo_width) && is_numeric($org_logo_width) && $org_logo_width>0) { - $width_and_height = " width=\"$org_logo_width\""; + $width = $org_logo_width; + } else { + $width = ''; } if (isset($org_logo_height) && is_numeric($org_logo_height) && $org_logo_height>0) { - $width_and_height .= " height=\"$org_logo_height\""; + $height = $org_logo_height; + } else { + $height = ''; } - - $logo_str = '
'."\n"; + + $logo_str = create_image($org_logo, sprintf(_("%s Logo"), $org_name), + $width, $height, '', 'sqm_loginImage'); + } $sm_attribute_str = ''; diff --git a/templates/default/error_logout.tpl b/templates/default/error_logout.tpl index 2f2f558e..a81057fb 100644 --- a/templates/default/error_logout.tpl +++ b/templates/default/error_logout.tpl @@ -32,7 +32,7 @@ extract ($t); '; echo nl2br($sm_attribute_str) . (empty($sm_attribute_str) ? '' : '

'); ?> -- 2.25.1