From 9949043d020a96e3c7485f65314d8b42acfc3fa8 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 22 Dec 2010 19:17:47 +0000 Subject: - Improve handling of whitespace characters after closing PHP tag in localization and config files git-svn-id: https://svn.roundcube.net/trunk@4363 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_plugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program/include/rcube_plugin.php') diff --git a/roundcubemail/program/include/rcube_plugin.php b/roundcubemail/program/include/rcube_plugin.php index c7ec01943..1c3a8f602 100644 --- a/roundcubemail/program/include/rcube_plugin.php +++ b/roundcubemail/program/include/rcube_plugin.php @@ -129,12 +129,17 @@ abstract class rcube_plugin $lang = $_SESSION['language']; $locdir = slashify(realpath(slashify($this->home) . $dir)); $texts = array(); - + + // use buffering to handle empty lines/spaces after closing PHP tag + ob_start(); + foreach (array('en_US', $lang) as $lng) { @include($locdir . $lng . '.inc'); $texts = (array)$labels + (array)$messages + (array)$texts; } + ob_end_clean(); + // prepend domain to text keys and add to the application texts repository if (!empty($texts)) { $add = array(); -- cgit v1.2.3