summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-05-17 17:01:22 +0000
committerthomascube <thomas@roundcube.net>2007-05-17 17:01:22 +0000
commit7198044efba3df34642570d57cc567b51af0d5dd (patch)
treeefa6f68555ba94748a1a50270f5d79fd46144eb9
parente3caaf59c20fd556364f838ae6082b3e2fba6d56 (diff)
Fixed conditional template tags; hide quota display if imap server does not support it
-rw-r--r--program/include/rcmail_template.inc2
-rw-r--r--program/steps/mail/func.inc2
-rw-r--r--skins/default/templates/mail.html2
3 files changed, 4 insertions, 2 deletions
diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc
index e2fa682e4..6e3fe52b8 100644
--- a/program/include/rcmail_template.inc
+++ b/program/include/rcmail_template.inc
@@ -339,7 +339,7 @@ class rcmail_template extends rcube_html_page
$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];
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 7416fb5d4..1848d301a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -63,7 +63,7 @@ if (strlen($_GET['_uid']))
// 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']);
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index d7f11bdfd..183a14ff7 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -77,7 +77,9 @@
<roundcube:button command="select-all" label="all" classAct="active" />&nbsp;
<roundcube:button command="select-all" prop="unread" label="unread" classAct="active" />&nbsp;
<roundcube:button command="select-none" label="none" classAct="active" /> &nbsp;&nbsp;&nbsp;
+<roundcube:if condition="env:quota" />
<roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="120" id="quotadisplay" />
+<roundcube:endif />
</div>
</body>