@@ -99,8 +99,7 @@ |
||
99 | 99 | // Attendee must have email address of valid format, these must also be unique. |
100 | 100 | $person->email = preg_replace('/[^0-9_\x61-\x7a]/i', '_', strtolower($person->name)) . '[email protected]'; |
101 | 101 | } |
102 | - $parameters = array |
|
103 | - ( |
|
102 | + $parameters = array( |
|
104 | 103 | 'ROLE' => 'REQ-PARTICIPANT', |
105 | 104 | 'CUTYPE' => 'INDIVIDUAL', |
106 | 105 | 'PARTSTAT' => 'ACCEPTED', |
@@ -81,8 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | throw new midcom_error(midcom_connection::get_error_string()); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $nodes = $object_qb->execute(); |
88 | 87 | $node = $nodes[0]; |
@@ -49,30 +49,25 @@ discard block |
||
49 | 49 | $buttons = array(); |
50 | 50 | if ($this->_root_event->can_do('midgard:create')) |
51 | 51 | { |
52 | - $buttons[] = $workflow->get_button('#', array |
|
53 | - ( |
|
52 | + $buttons[] = $workflow->get_button('#', array( |
|
54 | 53 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('create event'), |
55 | 54 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_new-event.png', |
56 | - MIDCOM_TOOLBAR_OPTIONS => array |
|
57 | - ( |
|
55 | + MIDCOM_TOOLBAR_OPTIONS => array( |
|
58 | 56 | 'id' => 'openpsa_calendar_add_event', |
59 | 57 | ) |
60 | 58 | )); |
61 | 59 | } |
62 | - $buttons[] = array |
|
63 | - ( |
|
60 | + $buttons[] = array( |
|
64 | 61 | MIDCOM_TOOLBAR_URL => "filters/?org_openpsa_calendar_returnurl=" . midcom_connection::get_url('uri'), |
65 | 62 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('choose calendars'), |
66 | 63 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/preferences-desktop.png', |
67 | 64 | ); |
68 | 65 | |
69 | - $buttons[] = array |
|
70 | - ( |
|
66 | + $buttons[] = array( |
|
71 | 67 | MIDCOM_TOOLBAR_URL => '#', |
72 | 68 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('go to'), |
73 | 69 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_jump-to.png', |
74 | - MIDCOM_TOOLBAR_OPTIONS => array |
|
75 | - ( |
|
70 | + MIDCOM_TOOLBAR_OPTIONS => array( |
|
76 | 71 | 'rel' => 'directlink', |
77 | 72 | 'id' => 'date-navigation', |
78 | 73 | ) |
@@ -164,8 +159,7 @@ discard block |
||
164 | 159 | { |
165 | 160 | if ($holiday = $util->getHoliday($country, $from, $region)) |
166 | 161 | { |
167 | - $events[] = array |
|
168 | - ( |
|
162 | + $events[] = array( |
|
169 | 163 | 'title' => $holiday->getName(), |
170 | 164 | 'start' => $from->format('Y-m-d'), |
171 | 165 | 'className' => array(), |
@@ -220,8 +214,7 @@ discard block |
||
220 | 214 | $label = $user->name; |
221 | 215 | } |
222 | 216 | |
223 | - $events[$event->guid] = array |
|
224 | - ( |
|
217 | + $events[$event->guid] = array( |
|
225 | 218 | 'id' => $event->guid, |
226 | 219 | 'title' => $label, |
227 | 220 | 'location' => $event->location, |
@@ -275,10 +268,8 @@ discard block |
||
275 | 268 | // Add toolbar items |
276 | 269 | if ($this->_request_data['view'] == 'default') |
277 | 270 | { |
278 | - $buttons = array |
|
279 | - ( |
|
280 | - array |
|
281 | - ( |
|
271 | + $buttons = array( |
|
272 | + array( |
|
282 | 273 | MIDCOM_TOOLBAR_URL => 'event/edit/' . $this->_request_data['event']->guid . '/', |
283 | 274 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('edit'), |
284 | 275 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/edit.png', |
@@ -291,13 +282,11 @@ discard block |
||
291 | 282 | $workflow = $this->get_workflow('delete', array('object' => $data['event'])); |
292 | 283 | $buttons[] = $workflow->get_button("event/delete/{$data['event']->guid}/"); |
293 | 284 | } |
294 | - $buttons[] = array |
|
295 | - ( |
|
285 | + $buttons[] = array( |
|
296 | 286 | MIDCOM_TOOLBAR_URL => 'javascript:window.print()', |
297 | 287 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('print'), |
298 | 288 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/printer.png', |
299 | - MIDCOM_TOOLBAR_OPTIONS => array |
|
300 | - ( |
|
289 | + MIDCOM_TOOLBAR_OPTIONS => array( |
|
301 | 290 | 'rel' => 'directlink', |
302 | 291 | ) |
303 | 292 | ); |
@@ -308,10 +297,8 @@ discard block |
||
308 | 297 | { |
309 | 298 | $user = midcom::get()->auth->user->get_storage(); |
310 | 299 | $date = $this->_l10n->get_formatter()->date(); |
311 | - $relatedto_button_settings = array |
|
312 | - ( |
|
313 | - 'wikinote' => array |
|
314 | - ( |
|
300 | + $relatedto_button_settings = array( |
|
301 | + 'wikinote' => array( |
|
315 | 302 | 'component' => 'net.nemein.wiki', |
316 | 303 | 'node' => false, |
317 | 304 | 'wikiword' => str_replace('/', '-', sprintf($this->_l10n->get($this->_config->get('wiki_title_skeleton')), $data['event']->title, $date, $user->name)), |
@@ -333,7 +320,7 @@ discard block |
||
333 | 320 | |
334 | 321 | if (!$this->_request_data['event']->can_do('org.openpsa.calendar:read')) |
335 | 322 | { |
336 | - $stat = $this->_datamanager->set_schema('private') |
|
323 | + $stat = $this->_datamanager->set_schema('private') |
|
337 | 324 | && $this->_datamanager->set_storage($this->_request_data['event']); |
338 | 325 | } |
339 | 326 | else |
@@ -141,8 +141,7 @@ discard block |
||
141 | 141 | if ($mimetype[0] === 'text') |
142 | 142 | { |
143 | 143 | $this->process_mime_plaintext(); |
144 | - } |
|
145 | - else |
|
144 | + } else |
|
146 | 145 | { |
147 | 146 | $this->process_mime_binary(); |
148 | 147 | } |
@@ -153,8 +152,7 @@ discard block |
||
153 | 152 | { |
154 | 153 | $this->title = "{$this->attachment->title} ({$this->attachment->name})"; |
155 | 154 | $this->content .= "\n{$this->attachment->title}\n{$this->attachment->name}"; |
156 | - } |
|
157 | - else |
|
155 | + } else |
|
158 | 156 | { |
159 | 157 | $this->title = $this->attachment->name; |
160 | 158 | $this->content .= "\n{$this->attachment->name}"; |
@@ -163,8 +161,7 @@ discard block |
||
163 | 161 | if (strlen($this->content) > 200) |
164 | 162 | { |
165 | 163 | $this->abstract = substr($this->content, 0, 200) . ' ...'; |
166 | - } |
|
167 | - else |
|
164 | + } else |
|
168 | 165 | { |
169 | 166 | $this->abstract = $this->content; |
170 | 167 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | /** |
66 | 66 | * DM2 creation callback, binds to the current content topic. |
67 | 67 | */ |
68 | - public function & dm2_create_callback (&$controller) |
|
68 | + public function & dm2_create_callback(&$controller) |
|
69 | 69 | { |
70 | 70 | $this->_event = new org_openpsa_calendar_event_dba(); |
71 | 71 | $this->_event->up = $this->_root_event->id; |
@@ -44,8 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $person = $person->get_storage(); |
46 | 46 | $defaults['participants'][$person->id] = $person; |
47 | - } |
|
48 | - else if ($group = midcom::get()->auth->get_group($this->resource)) |
|
47 | + } else if ($group = midcom::get()->auth->get_group($this->resource)) |
|
49 | 48 | { |
50 | 49 | foreach ($group->list_members() as $member) |
51 | 50 | { |
@@ -98,8 +97,7 @@ discard block |
||
98 | 97 | if (!empty($_GET['end'])) |
99 | 98 | { |
100 | 99 | $this->_requested_end = strtotime($_GET['end']); |
101 | - } |
|
102 | - else |
|
100 | + } else |
|
103 | 101 | { |
104 | 102 | $this->_requested_end = $this->_requested_start + 3600; |
105 | 103 | } |
@@ -120,8 +118,7 @@ discard block |
||
120 | 118 | $indexer = new org_openpsa_calendar_midcom_indexer($this->_topic); |
121 | 119 | $indexer->index($data['controller']->datamanager); |
122 | 120 | midcom::get()->head->add_jsonload('openpsa_calendar_widget.refresh_parent();'); |
123 | - } |
|
124 | - else if (!empty($conflictmanager->busy_members)) |
|
121 | + } else if (!empty($conflictmanager->busy_members)) |
|
125 | 122 | { |
126 | 123 | midcom::get()->uimessages->add($this->_l10n->get('event conflict'), $conflictmanager->get_message($this->_l10n->get_formatter()), 'warning'); |
127 | 124 | } |
@@ -65,8 +65,7 @@ discard block |
||
65 | 65 | $indexer = new org_openpsa_calendar_midcom_indexer($this->_topic); |
66 | 66 | $indexer->index($data['controller']->datamanager); |
67 | 67 | midcom::get()->head->add_jsonload('openpsa_calendar_widget.refresh_parent();'); |
68 | - } |
|
69 | - else if (!empty($conflictmanager->busy_members)) |
|
68 | + } else if (!empty($conflictmanager->busy_members)) |
|
70 | 69 | { |
71 | 70 | midcom::get()->uimessages->add($this->_l10n->get('event conflict'), $conflictmanager->get_message($this->_l10n->get_formatter()), 'warning'); |
72 | 71 | } |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | if (empty($_POST['end'])) |
94 | 93 | { |
95 | 94 | $end = $event->end + ($start - $event->start); |
96 | - } |
|
97 | - else |
|
95 | + } else |
|
98 | 96 | { |
99 | 97 | $end = strtotime($_POST['end']); |
100 | 98 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | // TODO: Shared tasks need a separate check (different member object) |
139 | 139 | |
140 | - if ( !empty($this->busy_members) |
|
140 | + if (!empty($this->busy_members) |
|
141 | 141 | || !empty($this->busy_resources)) |
142 | 142 | { |
143 | 143 | //Unresolved conflicts (note return value is for conflicts not lack of them) |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | { |
152 | 152 | //These events have been robbed of (some of) their resources |
153 | 153 | $creator = midcom_db_person::get_cached($event->metadata->creator); |
154 | - if ( ( count($event->participants) == 0 |
|
155 | - || ( count($event->participants) == 1 |
|
154 | + if ((count($event->participants) == 0 |
|
155 | + || (count($event->participants) == 1 |
|
156 | 156 | && array_key_exists($creator->id, $event->participants))) |
157 | 157 | && count($event->resources) == 0) |
158 | 158 | { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | |
221 | 221 | if (array_key_exists($member->event, $modified_events)) |
222 | 222 | { |
223 | - $event =& $modified_events[$member->event]; |
|
223 | + $event = & $modified_events[$member->event]; |
|
224 | 224 | $set_as_modified = false; |
225 | 225 | } |
226 | 226 | else |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | debug_add("overlap found in event {$event->title} (#{$event->id})"); |
241 | 241 | |
242 | - if ( $event->tentative |
|
242 | + if ($event->tentative |
|
243 | 243 | && $rob_tentative) |
244 | 244 | { |
245 | 245 | debug_add('event is tentative, robbing resources'); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | } |
296 | 296 | debug_add("overlap found in event {$event->title} (#{$event->id})"); |
297 | 297 | |
298 | - if ( $event->tentative |
|
298 | + if ($event->tentative |
|
299 | 299 | && $rob_tentative) |
300 | 300 | { |
301 | 301 | debug_add('event is tentative, robbing resources'); |
@@ -161,8 +161,7 @@ discard block |
||
161 | 161 | debug_add("event {$event->title} (#{$event->id}) has been robbed of all of its resources, calling delete"); |
162 | 162 | //TODO: take notifications and repeats into account |
163 | 163 | $event->delete(); |
164 | - } |
|
165 | - else |
|
164 | + } else |
|
166 | 165 | { |
167 | 166 | //Otherwise just commit the changes |
168 | 167 | //TODO: take notifications and repeats into account |
@@ -222,15 +221,13 @@ discard block |
||
222 | 221 | { |
223 | 222 | $event =& $modified_events[$member->event]; |
224 | 223 | $set_as_modified = false; |
225 | - } |
|
226 | - else |
|
224 | + } else |
|
227 | 225 | { |
228 | 226 | try |
229 | 227 | { |
230 | 228 | $event = new org_openpsa_calendar_event_dba($member->event); |
231 | 229 | $set_as_modified = true; |
232 | - } |
|
233 | - catch (midcom_error $e) |
|
230 | + } catch (midcom_error $e) |
|
234 | 231 | { |
235 | 232 | debug_add("event_resource #{$member->id} links ot bogus event #{$member->event}, skipping and removing", MIDCOM_LOG_WARN); |
236 | 233 | $member->delete(); |
@@ -252,8 +249,7 @@ discard block |
||
252 | 249 | { |
253 | 250 | $modified_events[$event->id] = $event; |
254 | 251 | } |
255 | - } |
|
256 | - else |
|
252 | + } else |
|
257 | 253 | { |
258 | 254 | debug_add('event is normal, flagging busy'); |
259 | 255 | //Non tentative event, flag busy resources |
@@ -286,8 +282,7 @@ discard block |
||
286 | 282 | try |
287 | 283 | { |
288 | 284 | $event = new org_openpsa_calendar_event_dba($member->eid); |
289 | - } |
|
290 | - catch (midcom_error $e) |
|
285 | + } catch (midcom_error $e) |
|
291 | 286 | { |
292 | 287 | debug_add("eventmember #{$member->id} links to bogus event #{$member->eid}, skipping and removing", MIDCOM_LOG_WARN); |
293 | 288 | $member->delete(); |
@@ -305,8 +300,7 @@ discard block |
||
305 | 300 | //participants |
306 | 301 | $event->participants = array_diff_key($event->participants, $this->_event->participants); |
307 | 302 | $modified_events[$event->id] = $event; |
308 | - } |
|
309 | - else |
|
303 | + } else |
|
310 | 304 | { |
311 | 305 | debug_add('event is normal, flagging busy'); |
312 | 306 | //Non tentative event, flag busy resources |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $root_event = self::find_root_event(); |
104 | 104 | |
105 | 105 | $qb = org_openpsa_calendar_event_dba::new_query_builder(); |
106 | - $qb->add_constraint('up', '=', $root_event->id); |
|
106 | + $qb->add_constraint('up', '=', $root_event->id); |
|
107 | 107 | $schemadb = midcom_helper_datamanager2_schema::load_database($config->get('schemadb')); |
108 | 108 | |
109 | 109 | $indexer = new org_openpsa_calendar_midcom_indexer($topic, $indexer); |
@@ -123,8 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | $workflow = new midcom\workflow\datamanager2; |
126 | - return $workflow->get_button("new/" . $url, array |
|
127 | - ( |
|
126 | + return $workflow->get_button("new/" . $url, array( |
|
128 | 127 | MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('create event', 'org.openpsa.calendar'), |
129 | 128 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_new-event.png', |
130 | 129 | )); |
@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | $relatedto_arr = $session->get('relatedto2get_array'); |
25 | 25 | $session->remove('relatedto2get_array'); |
26 | - } |
|
27 | - else |
|
26 | + } else |
|
28 | 27 | { |
29 | 28 | $relatedto_arr = org_openpsa_relatedto_plugin::get2relatedto(); |
30 | 29 | } |
@@ -35,8 +34,7 @@ discard block |
||
35 | 34 | if (!$rel->id) |
36 | 35 | { |
37 | 36 | $rel->create(); |
38 | - } |
|
39 | - else |
|
37 | + } else |
|
40 | 38 | { |
41 | 39 | //In theory we should not ever hit this, but better to be sure. |
42 | 40 | $rel->update(); |
@@ -42,16 +42,13 @@ |
||
42 | 42 | $head->enable_jquery(); |
43 | 43 | $head->add_jsfile(MIDCOM_STATIC_URL . '/' . $this->_component . '/galleria/galleria-1.3.5.min.js'); |
44 | 44 | } |
45 | - $buttons = array |
|
46 | - ( |
|
47 | - array |
|
48 | - ( |
|
45 | + $buttons = array( |
|
46 | + array( |
|
49 | 47 | MIDCOM_TOOLBAR_URL => "edit/", |
50 | 48 | MIDCOM_TOOLBAR_LABEL => sprintf($this->_l10n_midcom->get('edit %s'), $this->_l10n->get('slideshow')), |
51 | 49 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/configuration.png', |
52 | 50 | ), |
53 | - array |
|
54 | - ( |
|
51 | + array( |
|
55 | 52 | MIDCOM_TOOLBAR_URL => "recreate_folder_thumbnails/", |
56 | 53 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('recreate subfolder thumbnails'), |
57 | 54 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_refresh.png', |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $local_filename = midcom_db_attachment::safe_filename($uploaded_file['name']); |
48 | 48 | $local_file = $this->_get_file($local_filename, true); |
49 | - } |
|
50 | - else |
|
49 | + } else |
|
51 | 50 | { |
52 | 51 | $local_file = $this->_file; |
53 | 52 | } |
@@ -89,8 +88,7 @@ discard block |
||
89 | 88 | // We're creating a new file |
90 | 89 | $local_filename = midcom_db_attachment::safe_filename($_POST['midgard_admin_asgard_filename']); |
91 | 90 | $local_file = $this->_get_file($local_filename, true); |
92 | - } |
|
93 | - else |
|
91 | + } else |
|
94 | 92 | { |
95 | 93 | $local_file = $this->_file; |
96 | 94 | } |
@@ -281,10 +281,10 @@ |
||
281 | 281 | break; |
282 | 282 | case 'delete': |
283 | 283 | if (empty($_POST['guids'])) |
284 | - { |
|
285 | - throw new midcom_error('Invalid request'); |
|
286 | - } |
|
287 | - break; |
|
284 | + { |
|
285 | + throw new midcom_error('Invalid request'); |
|
286 | + } |
|
287 | + break; |
|
288 | 288 | default: |
289 | 289 | throw new midcom_error('Invalid request'); |
290 | 290 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $failed = 0; |
67 | 67 | foreach ($images as $image) |
68 | 68 | { |
69 | - if ( !$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter')) |
|
69 | + if (!$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter')) |
|
70 | 70 | || !$image->generate_image('image', $this->_config->get('image_filter'))) |
71 | 71 | { |
72 | 72 | $failed++; |
@@ -102,8 +102,7 @@ discard block |
||
102 | 102 | $data['images'] = $qb->execute(); |
103 | 103 | |
104 | 104 | $head = midcom::get()->head; |
105 | - $head->enable_jquery_ui(array |
|
106 | - ( |
|
105 | + $head->enable_jquery_ui(array( |
|
107 | 106 | 'mouse', 'draggable', 'droppable', 'sortable', |
108 | 107 | 'progressbar', 'button', 'position', 'dialog', |
109 | 108 | 'effect', 'effect-pulsate' |
@@ -113,16 +112,13 @@ discard block |
||
113 | 112 | $head->add_jsfile(MIDCOM_STATIC_URL . '/' . $this->_component . '/edit.js'); |
114 | 113 | $head->add_stylesheet(MIDCOM_STATIC_URL . '/' . $this->_component . '/edit.css'); |
115 | 114 | |
116 | - $buttons = array |
|
117 | - ( |
|
118 | - array |
|
119 | - ( |
|
115 | + $buttons = array( |
|
116 | + array( |
|
120 | 117 | MIDCOM_TOOLBAR_URL => "", |
121 | 118 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('view'), |
122 | 119 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/view.png', |
123 | 120 | ), |
124 | - array |
|
125 | - ( |
|
121 | + array( |
|
126 | 122 | MIDCOM_TOOLBAR_URL => "recreate/", |
127 | 123 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('recreate derived images'), |
128 | 124 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_refresh.png', |
@@ -272,7 +268,7 @@ discard block |
||
272 | 268 | } |
273 | 269 | //Fall-through |
274 | 270 | case 'create': |
275 | - if ( !isset($_POST['title']) |
|
271 | + if (!isset($_POST['title']) |
|
276 | 272 | || !isset($_POST['description']) |
277 | 273 | || !isset($_POST['position'])) |
278 | 274 | { |
@@ -297,7 +293,7 @@ discard block |
||
297 | 293 | $attachment->title = $_POST['title']; |
298 | 294 | $attachment->mimetype = $file['type']; |
299 | 295 | $attachment->parentguid = $image->guid; |
300 | - if ( !$attachment->create() |
|
296 | + if (!$attachment->create() |
|
301 | 297 | || !$attachment->copy_from_file($file['tmp_name'])) |
302 | 298 | { |
303 | 299 | throw new midcom_error('Failed to create attachment: ' . midcom_connection::get_error_string()); |
@@ -40,8 +40,7 @@ discard block |
||
40 | 40 | $data['mode'] = 'customer'; |
41 | 41 | $data['list_title'] = sprintf($this->_l10n->get('salesprojects with %s'), $data['customer']->get_label()); |
42 | 42 | $this->add_breadcrumb("", $data['list_title']); |
43 | - } |
|
44 | - else |
|
43 | + } else |
|
45 | 44 | { |
46 | 45 | $data['mode'] = $this->get_list_mode($args); |
47 | 46 | $qb = $this->_add_state_constraint($data['mode'], $qb); |
@@ -134,8 +133,7 @@ discard block |
||
134 | 133 | { |
135 | 134 | $this->_request_data['customer'] = new org_openpsa_contacts_group_dba($guid); |
136 | 135 | $qb->add_constraint('customer', '=', $this->_request_data['customer']->id); |
137 | - } |
|
138 | - catch (midcom_error $e) |
|
136 | + } catch (midcom_error $e) |
|
139 | 137 | { |
140 | 138 | $this->_request_data['customer'] = new org_openpsa_contacts_person_dba($guid); |
141 | 139 | $qb->add_constraint('customerContact', '=', $this->_request_data['customer']->id); |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | if ($contact = $this->get_contact()) |
59 | 59 | { |
60 | 60 | $label .= $contact->get_label() . ')'; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $label .= $this->linkGuid . ')'; |
65 | 64 | } |
@@ -76,14 +75,12 @@ discard block |
||
76 | 75 | try |
77 | 76 | { |
78 | 77 | return new org_openpsa_contacts_person_dba($this->linkGuid); |
79 | - } |
|
80 | - catch (midcom_error $e) |
|
78 | + } catch (midcom_error $e) |
|
81 | 79 | { |
82 | 80 | try |
83 | 81 | { |
84 | 82 | return new org_openpsa_contacts_group_dba($this->linkGuid); |
85 | - } |
|
86 | - catch (midcom_error $e) |
|
83 | + } catch (midcom_error $e) |
|
87 | 84 | { |
88 | 85 | debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR); |
89 | 86 | return false; |