Changeset 4404 in subversion


Ignore:
Timestamp:
Jan 12, 2011 5:26:32 AM (2 years ago)
Author:
alec
Message:
  • Remove some empty lines from output of template conditions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_template.php

    r4396 r4404  
    527527    private function parse_conditions($input) 
    528528    { 
    529         $matches = preg_split('/<roundcube:(if|elseif|else|endif)\s+([^>]+)>/is', $input, 2, PREG_SPLIT_DELIM_CAPTURE); 
     529        $matches = preg_split('/<roundcube:(if|elseif|else|endif)\s+([^>]+)>\n?/is', $input, 2, PREG_SPLIT_DELIM_CAPTURE); 
    530530        if ($matches && count($matches) == 4) { 
    531531            if (preg_match('/^(else|endif)$/i', $matches[1])) { 
     
    535535            if (isset($attrib['condition'])) { 
    536536                $condmet = $this->check_condition($attrib['condition']); 
    537                 $submatches = preg_split('/<roundcube:(elseif|else|endif)\s+([^>]+)>/is', $matches[3], 2, PREG_SPLIT_DELIM_CAPTURE); 
     537                $submatches = preg_split('/<roundcube:(elseif|else|endif)\s+([^>]+)>\n?/is', $matches[3], 2, PREG_SPLIT_DELIM_CAPTURE); 
    538538                if ($condmet) { 
    539539                    $result = $submatches[0]; 
    540                     $result.= ($submatches[1] != 'endif' ? preg_replace('/.*<roundcube:endif\s+[^>]+>/Uis', '', $submatches[3], 1) : $submatches[3]); 
     540                    $result.= ($submatches[1] != 'endif' ? preg_replace('/.*<roundcube:endif\s+[^>]+>\n?/Uis', '', $submatches[3], 1) : $submatches[3]); 
    541541                } 
    542542                else { 
Note: See TracChangeset for help on using the changeset viewer.