* Calendar - Fix merge from list loaded endlessly instead of generating document

This commit is contained in:
nathangray 2017-12-15 14:27:19 -07:00
parent 87b6bfdbfb
commit 632928887a
2 changed files with 9 additions and 3 deletions

View File

@ -39,11 +39,11 @@ class calendar_egw_record implements importexport_iface_egw_record
*/ */
public function __construct( $_identifier='' ){ public function __construct( $_identifier='' ){
$this->identifier = $_identifier; $this->identifier = $_identifier;
if(!is_object($this->bo)) { if(!is_object(self::$bo)) {
$this->bo = new calendar_bo(); self::$bo = new calendar_bo();
} }
if($this->identifier) { if($this->identifier) {
$this->record = $this->bo->read($this->identifier); $this->record = self::$bo->read($this->identifier);
} }
} }

View File

@ -241,6 +241,12 @@ class calendar_merge extends Api\Storage\Merge
{ {
$replacements = array(); $replacements = array();
if(!is_array($id) || !$id['start']) { if(!is_array($id) || !$id['start']) {
if(strpos($id, ':'))
{
$_id = $id;
$id = array();
list($id['id'], $id['recur_date']) = explode(':',$_id);
}
$event = $this->bo->read(is_array($id) ? $id['id'] : $id, is_array($id) ? $id['recur_date'] : null); $event = $this->bo->read(is_array($id) ? $id['id'] : $id, is_array($id) ? $id['recur_date'] : null);
} else { } else {
$event = $id; $event = $id;