Merge branch 'dev/kolab3' of ssh://git.kolabsys.com/git/roundcube into dev/kolab3
This commit is contained in:
commit
11dbdf8336
4 changed files with 34 additions and 3 deletions
|
@ -563,7 +563,6 @@ class kolab_driver extends calendar_driver
|
|||
return false;
|
||||
|
||||
$fromcalendar = $storage;
|
||||
$storage->storage->synchronize();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -75,7 +75,9 @@ abstract class kolab_format
|
|||
if (!$dateonly)
|
||||
$result->setTime($datetime->format('G'), $datetime->format('i'), $datetime->format('s'));
|
||||
|
||||
if ($tz)
|
||||
if ($tz && $tz->getName() == 'UTC')
|
||||
$result->setUTC(true);
|
||||
else if ($tz)
|
||||
$result->setTimezone($tz->getName());
|
||||
}
|
||||
|
||||
|
@ -101,6 +103,9 @@ abstract class kolab_format
|
|||
$tz = new DateTimeZone($tzs);
|
||||
$d->setTimezone($tz);
|
||||
}
|
||||
else if ($cdt->isUTC()) {
|
||||
$d->setTimezone(new DateTimeZone('UTC'));
|
||||
}
|
||||
}
|
||||
catch (Exception $e) { }
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ class kolab_format_event extends kolab_format
|
|||
}
|
||||
|
||||
if (preg_match('/^@(\d+)/', $offset, $d)) {
|
||||
$alarm->setStart(self::get_datetime($d[1]));
|
||||
$alarm->setStart(self::get_datetime($d[1], new DateTimeZone('UTC')));
|
||||
}
|
||||
else if (preg_match('/^([-+]?)(\d+)([SMHDW])/', $offset, $d)) {
|
||||
$days = $hours = $minutes = $seconds = 0;
|
||||
|
|
|
@ -486,6 +486,33 @@ class kolab_storage_folder
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Move a Kolab object message to another IMAP folder
|
||||
*
|
||||
* @param string Object UID
|
||||
* @param string IMAP folder to move object to
|
||||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
public function move($uid, $target_folder)
|
||||
{
|
||||
if ($msguid = $this->uid2msguid($uid)) {
|
||||
if ($success = $this->imap->move_message($msguid, $target_folder, $this->name)) {
|
||||
// TODO: update cache
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
raise_error(array(
|
||||
'code' => 600, 'type' => 'php',
|
||||
'file' => __FILE__, 'line' => __LINE__,
|
||||
'message' => "Failed to move message $msguid to $target_folder: " . $this->imap->get_error_str(),
|
||||
), true);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resolve an object UID into an IMAP message UID
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue