| | |
| | | $submatches = preg_split('/<roundcube:(elseif|else|endif)\s+([^>]+)>/is', $matches[3], 2, PREG_SPLIT_DELIM_CAPTURE); |
| | | |
| | | if ($condmet) |
| | | $result = $submatches[0] . preg_replace('/.*<roundcube:endif\s+[^>]+>/is', '', $submatches[3]); |
| | | $result = $submatches[0] . ($submatches[1] != 'endif' ? preg_replace('/.*<roundcube:endif\s+[^>]+>/Uis', '', $submatches[3], 1) : $submatches[3]); |
| | | else |
| | | $result = "<roundcube:$submatches[1] $submatches[2]>" . $submatches[3]; |
| | | |
| | |
| | | |
| | | // make valid href to specific buttons |
| | | if (in_array($attrib['command'], $MAIN_TASKS)) |
| | | $attrib['href'] = Q(rcmail_self_url(null, null, $attrib['command'])); |
| | | $attrib['href'] = Q(rcmail_url(null, null, $attrib['command'])); |
| | | else if (in_array($attrib['command'], $a_static_commands)) |
| | | $attrib['href'] = Q(rcmail_self_url($attrib['command'])); |
| | | $attrib['href'] = Q(rcmail_url($attrib['command'])); |
| | | } |
| | | |
| | | // overwrite attributes |