From bff88dcb94a95d53ac37d8ac3c2b86f512b5869a Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 13 May 2011 13:31:09 -0400
Subject: [PATCH] - Apply fixes from trunk (up to r4756)
---
program/include/rcube_imap.php | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index e2ab550..32e7871 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3564,7 +3564,7 @@
return $this->conn->setMetadata($mailbox, $entries);
}
else if ($this->get_capability('ANNOTATEMORE') || $this->get_capability('ANNOTATEMORE2')) {
- foreach ($entries as $entry => $value) {
+ foreach ((array)$entries as $entry => $value) {
list($ent, $attr) = $this->md2annotate($entry);
$entries[$entry] = array($ent, $attr, $value);
}
@@ -3597,7 +3597,7 @@
return $this->conn->deleteMetadata($mailbox, $entries);
}
else if ($this->get_capability('ANNOTATEMORE') || $this->get_capability('ANNOTATEMORE2')) {
- foreach ($entries as $idx => $entry) {
+ foreach ((array)$entries as $idx => $entry) {
list($ent, $attr) = $this->md2annotate($entry);
$entries[$idx] = array($ent, $attr, NULL);
}
@@ -3626,7 +3626,7 @@
$mailbox = $this->mod_mailbox($mailbox);
if ($this->get_capability('METADATA') ||
- !strlen(($mailbox) && $this->get_capability('METADATA-SERVER'))
+ (!strlen($mailbox) && $this->get_capability('METADATA-SERVER'))
) {
return $this->conn->getMetadata($mailbox, $entries, $options);
}
@@ -3635,7 +3635,7 @@
$res = array();
// Convert entry names
- foreach ($entries as $entry) {
+ foreach ((array)$entries as $entry) {
list($ent, $attr) = $this->md2annotate($entry);
$queries[$attr][] = $ent;
}
@@ -3656,11 +3656,11 @@
* Converts the METADATA extension entry name into the correct
* entry-attrib names for older ANNOTATEMORE version.
*
- * @param string Entry name
+ * @param string $entry Entry name
*
* @return array Entry-attribute list, NULL if not supported (?)
*/
- private function md2annotate($name)
+ private function md2annotate($entry)
{
if (substr($entry, 0, 7) == '/shared') {
return array(substr($entry, 7), 'value.shared');
--
Gitblit v1.9.1