/** * Determines if the property specified has been ghosted by the client. * A ghosted property 1) IS 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) { $isGhosted = parent::isGhosted($property); if (!$isGhosted && $property == self::PICTURE && $this->_device->hasQuirk(Horde_ActiveSYnc_Device::QUIRK_NEEDS_SUPPORTED_PICTURE_TAG)) { return true; } return $isGhosted; }
/** * Determines if the property specified has been ghosted by the client. * A property is ghosted if it is NOT listed in the SUPPORTED list sent * by the client AND is NOT present in the request data. * * @param string $property The property to check * @param array $options An array of options: * - ignoreEmptyPictureTagCheck: boolean If true, will not check for the * QUIRK_INCORRECTLY_SENDS_EMPTY_PICTURE_TAG quirk. @since 2.32.0 * * @return boolean */ public function isGhosted($property, $options = array()) { // MS-ASCMD 2.2.3.168: // An empty SUPPORTED container indicates that ALL elements able to be // ghosted ARE ghosted. A *missing* SUPPORTED tag indicates that NO // fields are ghosted - any ghostable properties are always considered // NOT ghosted. Some clients like iOS 4.x screw this up by not sending // any SUPPORTED container and also not sending the picture field during // edits. if ($property == $this->_mapping[self::PICTURE][self::KEY_ATTRIBUTE]) { if (empty($options['ignoreEmptyPictureTagCheck']) && $this->_device->hasQuirk(Horde_ActiveSync_Device::QUIRK_INCORRECTLY_SENDS_EMPTY_PICTURE_TAG) && (!empty($this->_exists[$property]) && $this->{$property} == '' || empty($this->_exists[$property]))) { return true; } if (empty($this->_exists[$property]) && empty($this->_supported) && $this->_device->hasQuirk(Horde_ActiveSync_Device::QUIRK_NEEDS_SUPPORTED_PICTURE_TAG)) { return true; } } return parent::isGhosted($property); }
/** * Override parent class' method. In EAS 16.0, top level appointment * properties are ALWAYS ghosted if they are not explicitly sent. * * @param string $property The property to check * * @return boolean */ public function isGhosted($property) { if ($this->_version >= Horde_ActiveSync::VERSION_SIXTEEN && empty($this->_exists[$property])) { return true; } return parent::isGhosted($property); }