Merge branch 'master' of gitorious.org:owncloud/owncloud into ace-editor
This commit is contained in:
commit
25a6679c1e
|
@ -117,7 +117,7 @@ class Sabre_VObject_Reader {
|
|||
//$result = preg_match('/(?P<name>[A-Z0-9-]+)(?:;(?P<parameters>^(?<!:):))(.*)$/',$line,$matches);
|
||||
|
||||
|
||||
$token = '[A-Z0-9-\.]+';
|
||||
$token = '[A-Z0-9-\/\.]+';
|
||||
$parameters = "(?:;(?P<parameters>([^:^\"]|\"([^\"]*)\")*))?";
|
||||
$regex = "/^(?P<name>$token)$parameters:(?P<value>.*)$/i";
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ $start = DateTime::createFromFormat('U', $_GET['start']);
|
|||
$end = DateTime::createFromFormat('U', $_GET['end']);
|
||||
|
||||
$events = OC_Calendar_Object::allInPeriod($_GET['calendar_id'], $start, $end);
|
||||
$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
|
||||
$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
|
||||
$return = array();
|
||||
foreach($events as $event){
|
||||
$object = OC_Calendar_Object::parse($event['calendardata']);
|
||||
|
|
|
@ -29,7 +29,7 @@ if (!$end){
|
|||
}
|
||||
$start = new DateTime('@'.$start);
|
||||
$end = new DateTime('@'.$end);
|
||||
$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', 'Europe/London');
|
||||
$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
|
||||
$start->setTimezone(new DateTimeZone($timezone));
|
||||
$end->setTimezone(new DateTimeZone($timezone));
|
||||
|
||||
|
|
|
@ -43,10 +43,12 @@ class OC_Calendar_Object{
|
|||
public static function allInPeriod($id, $start, $end){
|
||||
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ?'
|
||||
.' AND ((startdate >= ? AND startdate <= ? AND repeating = 0)'
|
||||
.' OR (enddate >= ? AND enddate <= ? AND repeating = 0)'
|
||||
.' OR (startdate <= ? AND repeating = 1))' );
|
||||
$start = self::getUTCforMDB($start);
|
||||
$end = self::getUTCforMDB($end);
|
||||
$result = $stmt->execute(array($id,
|
||||
$start, $end,
|
||||
$start, $end,
|
||||
$end));
|
||||
|
||||
|
@ -528,7 +530,7 @@ class OC_Calendar_Object{
|
|||
$dtstart->setDateTime($start, Sabre_VObject_Element_DateTime::DATE);
|
||||
$dtend->setDateTime($end, Sabre_VObject_Element_DateTime::DATE);
|
||||
}else{
|
||||
$timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
|
||||
$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
|
||||
$timezone = new DateTimeZone($timezone);
|
||||
$start = new DateTime($from.' '.$fromtime, $timezone);
|
||||
$end = new DateTime($to.' '.$totime, $timezone);
|
||||
|
|
Loading…
Reference in New Issue