Skip to content

Commit

Permalink
No need to replace a body part with the exact same body part.
Browse files Browse the repository at this point in the history
No idea why this was done. Traced back to commit 0d2544c. Started
polling the IMAP server for both the original part and the bodypart.
Previous commit was 6c6db9e, when support for modifying objects
was first introduced (even then, hard to say if this was ultimately
happening since the actions are so spread out among different, deep,
class structures.

Anyway, this seems to work, and fixes an issue that was causing
the data to be decoded into some kind of binary data instead of
the XML data is really is.
  • Loading branch information
mrubinsk committed Jun 5, 2015
1 parent 4912c64 commit cc36df0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions framework/Kolab_Storage/lib/Horde/Kolab/Storage/Object.php
Expand Up @@ -429,16 +429,7 @@ public function save(Horde_Kolab_Storage_Object_Writer $data)
);
}

// Replace Kolab part.
$original = $body->getPart($mime_id);
$original->setContents(
$this->_getDriver()->fetchBodypart(
$this->_getFolder(),
$this->getBackendId(),
$mime_id
)
);
$this->_content = $original->getContents(array('stream' => true));
$this->_content = $body->getPart($mime_id)->getContents(array('stream' => true));
$body->alterPart($mime_id, $this->createFreshKolabPart($data->save($this)));
$body->buildMimeIds();

Expand Down

0 comments on commit cc36df0

Please sign in to comment.