diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-01-12 10:26:32 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-01-12 10:26:32 +0000 |
| commit | 6894f54e4db1d9afb74f4e602cf7a30fbdf0b262 (patch) | |
| tree | 5ccf738312c616a86f81e2d4e5e7888050d3ca91 /roundcubemail | |
| parent | 65187199cf5defda23522a51fa99fb305fe0d813 (diff) | |
- Remove some empty lines from output of template conditions
git-svn-id: https://svn.roundcube.net/trunk@4404 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index e914d2e96..92eddc2d8 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/program/include/rcube_template.php @@ -526,7 +526,7 @@ class rcube_template extends rcube_html_page */ private function parse_conditions($input) { - $matches = preg_split('/<roundcube:(if|elseif|else|endif)\s+([^>]+)>/is', $input, 2, PREG_SPLIT_DELIM_CAPTURE); + $matches = preg_split('/<roundcube:(if|elseif|else|endif)\s+([^>]+)>\n?/is', $input, 2, PREG_SPLIT_DELIM_CAPTURE); if ($matches && count($matches) == 4) { if (preg_match('/^(else|endif)$/i', $matches[1])) { return $matches[0] . $this->parse_conditions($matches[3]); @@ -534,10 +534,10 @@ class rcube_template extends rcube_html_page $attrib = parse_attrib_string($matches[2]); if (isset($attrib['condition'])) { $condmet = $this->check_condition($attrib['condition']); - $submatches = preg_split('/<roundcube:(elseif|else|endif)\s+([^>]+)>/is', $matches[3], 2, PREG_SPLIT_DELIM_CAPTURE); + $submatches = preg_split('/<roundcube:(elseif|else|endif)\s+([^>]+)>\n?/is', $matches[3], 2, PREG_SPLIT_DELIM_CAPTURE); if ($condmet) { $result = $submatches[0]; - $result.= ($submatches[1] != 'endif' ? preg_replace('/.*<roundcube:endif\s+[^>]+>/Uis', '', $submatches[3], 1) : $submatches[3]); + $result.= ($submatches[1] != 'endif' ? preg_replace('/.*<roundcube:endif\s+[^>]+>\n?/Uis', '', $submatches[3], 1) : $submatches[3]); } else { $result = "<roundcube:$submatches[1] $submatches[2]>" . $submatches[3]; |
