diff --git a/calendar/inc/class.calendar_datasource.inc.php b/calendar/inc/class.calendar_datasource.inc.php index 40ddcd45be..1aee607115 100644 --- a/calendar/inc/class.calendar_datasource.inc.php +++ b/calendar/inc/class.calendar_datasource.inc.php @@ -92,10 +92,7 @@ class calendar_datasource extends datasource if (!is_array($this->pm_config)) { - $c =& CreateObject('phpgwapi.config','projectmanager'); - $c->read_repository(); - $this->pm_config = $c->config_data; - unset($c); + $this->pm_config = Api\Config::read('projectmanager'); if (!$this->pm_config['hours_per_workday']) $this->pm_config['hours_per_workday'] = 8; } $ds['pe_planned_time'] -= $nights * 60 * (24 - $this->pm_config['hours_per_workday']); diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index 41c5349845..a0a3d4426e 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -577,7 +577,7 @@ class calendar_merge extends Api\Storage\Merge $replacements = $this->contact_replacements(substr($participant,1),''); break; case 'r': - if (is_null(self::$resources)) self::$resources = CreateObject('resources.resources_bo'); + if (is_null(self::$resources)) self::$resources = new resources_bo(); if (($resource = self::$resources->read(substr($participant,1)))) { foreach($resource as $name => $value) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index b0a49092e8..a75c84388a 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -384,7 +384,7 @@ class calendar_uiforms extends calendar_ui { continue; } - + // email or rfc822 addresse (eg. "Ralf Becker ") $email = array(); if(preg_match('/^(.*<)?([a-z0-9_.-]+@[a-z0-9_.-]{5,})>?$/i',$participant,$email)) @@ -440,7 +440,7 @@ class calendar_uiforms extends calendar_ui { foreach($this->bo->enum_mailing_list($participant) as $contact) { - $event['participants'][$contact] = $event['participant_types']['c'][substr($contact,1)] = + $event['participants'][$contact] = $event['participant_types']['c'][substr($contact,1)] = calendar_so::combine_status($status,$content['participants']['quantity'],$content['participants']['role']); } continue; @@ -505,7 +505,7 @@ class calendar_uiforms extends calendar_ui { // Update main window $client_updated = $this->update_client($event['id'], $content['edit_single']); - + // refreshing the calendar-view with the changed participant-status if($event['recur_type'] != MCAL_RECUR_NONE) { @@ -788,7 +788,7 @@ class calendar_uiforms extends calendar_ui calendar_so::split_status($status,$q,$r); if ($uid[0] != 'c' && $uid[0] != 'e' && $uid != $this->bo->user && $status != 'U') { - $preferences = new Preferences($uid); + $preferences = new Api\Preferences($uid); $part_prefs = $preferences->read_repository(); switch ($part_prefs['calendar']['reset_stati']) { @@ -1050,7 +1050,7 @@ class calendar_uiforms extends calendar_ui } else { - Framework::refresh_opener($msg, 'calendar', + Framework::refresh_opener($msg, 'calendar', $event['id'] . ($content['edit_single'] ? ':' . (int)$content['edit_single'] : '' ), $button == 'save' && $client_updated ? ($content['id'] ? $update_type : 'add') : 'delete' ); @@ -2512,7 +2512,7 @@ class calendar_uiforms extends calendar_ui $etpl = new etemplate_new('calendar.export'); $etpl->exec('calendar.calendar_uiforms.export',$content); } - + /** * Edit category ACL (admin only) * @@ -2795,7 +2795,7 @@ class calendar_uiforms extends calendar_ui calendar_so::split_status($status,$q,$r); if ($uid[0] != 'c' && $uid[0] != 'e' && $uid != $this->bo->user && $status != 'U') { - $preferences = new Preferenes($uid); + $preferences = new Api\Preferenes($uid); $part_prefs = $preferences->read_repository(); switch ($part_prefs['calendar']['reset_stati']) { @@ -2869,7 +2869,7 @@ class calendar_uiforms extends calendar_ui { $d = new Api\DateTime($date, Api\DateTime::$user_timezone); } - + // If we have a recuring event for a particular day, make an exception if ($event['recur_type'] != MCAL_RECUR_NONE && $date) {