diff --git a/api/tests/Vfs/SharingBase.php b/api/tests/Vfs/SharingBase.php index b5013d7182..44094ce86e 100644 --- a/api/tests/Vfs/SharingBase.php +++ b/api/tests/Vfs/SharingBase.php @@ -465,11 +465,11 @@ class SharingBase extends LoggedInTest $_SERVER['HTTP_HOST'] = 'localhost'; $share = $this->createShare($path, $mode, $extra); $link = Vfs\Sharing::share2link($share); - echo __METHOD__ . " link: $link\n"; if(static::LOG_LEVEL) { - echo __METHOD__ . " share: " . array2string($share)."\n"; + echo __METHOD__ . " link: $link\n"; + echo __METHOD__ . " share: " . array2string($share) . "\n"; } // Setup for share to load diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index a359103607..821720f023 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -12,8 +12,8 @@ */ use EGroupware\Api; -use EGroupware\Api\Link; use EGroupware\Api\Acl; +use EGroupware\Api\Link; if (!defined('ACL_TYPE_IDENTIFER')) // used to mark ACL-values for the debug_message methode { @@ -417,12 +417,12 @@ class calendar_bo function enum_groups(&$event) { $added = 0; - foreach(array_keys($event['participants']) as $uid) + foreach (array_keys((array)$event['participants']) as $uid) { if (is_numeric($uid) && $GLOBALS['egw']->accounts->get_type($uid) == 'g' && - ($members = $GLOBALS['egw']->accounts->members($uid, true))) + ($members = $GLOBALS['egw']->accounts->members($uid, true))) { - foreach($members as $member) + foreach ($members as $member) { if (!isset($event['participants'][$member])) { diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 4d128be91c..60d14ad5cb 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -12,8 +12,8 @@ */ use EGroupware\Api; -use EGroupware\Api\Link; use EGroupware\Api\Acl; +use EGroupware\Api\Link; // types of messsages send by calendar_boupdate::send_update define('MSG_DELETED',0); @@ -547,9 +547,9 @@ class calendar_boupdate extends calendar_bo //echo "

calendar_boupdate::check4update() new participants = ".print_r($new_event['participants'],true).", old participants =".print_r($old_event['participants'],true)."

\n"; // Find modified and deleted participants ... - foreach($old_event['participants'] as $old_userid => $old_status) + foreach ((array)$old_event['participants'] as $old_userid => $old_status) { - if(isset($new_event['participants'][$old_userid])) + if (isset($new_event['participants'][$old_userid])) { $modified[$old_userid] = $new_event['participants'][$old_userid]; } diff --git a/calendar/inc/class.calendar_datasource.inc.php b/calendar/inc/class.calendar_datasource.inc.php index 09cf90aace..8aa0e35c39 100644 --- a/calendar/inc/class.calendar_datasource.inc.php +++ b/calendar/inc/class.calendar_datasource.inc.php @@ -11,8 +11,8 @@ */ use EGroupware\Api; -use EGroupware\Api\Link; use EGroupware\Api\Acl; +use EGroupware\Api\Link; include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php'); @@ -95,13 +95,16 @@ class calendar_datasource extends datasource if (!is_array($this->pm_config)) { $this->pm_config = Api\Config::read('projectmanager'); - if (!$this->pm_config['hours_per_workday']) $this->pm_config['hours_per_workday'] = 8; + 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']); } - foreach($data['participants'] as $uid => $status) + foreach ((array)$data['participants'] as $uid => $status) { - if ($status != 'R' && is_numeric($uid)) // only users for now + if ($status != 'R' && is_numeric($uid)) // only users for now { $ds['pe_resources'][] = $uid; } @@ -109,14 +112,14 @@ class calendar_datasource extends datasource // if we have multiple participants we have to multiply the time by the number of participants to get the total time $ds['pe_planned_time'] *= count($ds['pe_resources']); -/* - // ToDO: this does not change automatically after the event is over, - // maybe we need a flag for that in egw_pm_elements - if ($data['end']['raw'] <= time()+$GLOBALS['egw']->datetime->tz_offset) - { - $ds['pe_used_time'] = $ds['pe_planned_time']; - } -*/ + /* + // ToDO: this does not change automatically after the event is over, + // maybe we need a flag for that in egw_pm_elements + if ($data['end']['raw'] <= time()+$GLOBALS['egw']->datetime->tz_offset) + { + $ds['pe_used_time'] = $ds['pe_planned_time']; + } + */ if ($this->debug) { echo "datasource_calendar($data_id) data="; _debug_array($data);