Fixed conditional template tags; hide quota display if imap server does not support it
| | |
| | | $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]; |
| | | |
| | |
| | | |
| | | // set current mailbox in client environment |
| | | $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name()); |
| | | //$OUTPUT->set_pagetitle(rcube_charset_convert($IMAP->get_mailbox_name(), 'UTF-7', 'UTF-8')); |
| | | $OUTPUT->set_env('quota', $IMAP->get_capability('quota')); |
| | | |
| | | if ($CONFIG['trash_mbox']) |
| | | $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); |
| | |
| | | <roundcube:button command="select-all" label="all" classAct="active" /> |
| | | <roundcube:button command="select-all" prop="unread" label="unread" classAct="active" /> |
| | | <roundcube:button command="select-none" label="none" classAct="active" /> |
| | | <roundcube:if condition="env:quota" /> |
| | | <roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="120" id="quotadisplay" /> |
| | | <roundcube:endif /> |
| | | </div> |
| | | |
| | | </body> |