From c1086b05893f73a9b8569c20b304634fa0765c36 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 17 Jun 2010 16:00:57 -0400 Subject: [PATCH] Fix reveresed logic for determining if a property is GHOSTED. Completely removing a SUPPORTED field should now work again. --- framework/ActiveSync/lib/Horde/ActiveSync/Message/Base.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Base.php b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Base.php index fdbf43f27..eec73eff1 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Base.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Base.php @@ -159,9 +159,20 @@ class Horde_ActiveSync_Message_Base return $this->_supported; } + /** + * Determines if the property specified has been ghosted by the client. + * A ghosted property is 1) NOT listed in the supported list and 2) NOT + * present in the current message. If it's IN the supported list and NOT + * in the current message, then it IS ghosted and the server should keep + * the field's current value when performing any change action due to this + * message. + * + * @param string $property The property to check + * @return boolean + */ public function isGhosted($property) { - if (array_search($property, $this->_supported) !== false) { + if (array_search($property, $this->_supported) === false) { return false; } elseif (empty($this->_exists[$property])) { return true; -- 2.11.0