From: Michael J. Rubinsky Date: Thu, 17 Jun 2010 20:00:57 +0000 (-0400) Subject: Fix reveresed logic for determining if a property is GHOSTED. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c1086b05893f73a9b8569c20b304634fa0765c36;p=horde.git Fix reveresed logic for determining if a property is GHOSTED. Completely removing a SUPPORTED field should now work again. --- 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;