Passed
Branch master (95796a)
by Andreas
38:22
created
lib/org/openpsa/documents/handler/directory/edit.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $this->_load_schemadb();
53 53
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
54
-        $this->_controller->schemadb =& $this->_schemadb;
54
+        $this->_controller->schemadb = & $this->_schemadb;
55 55
         $this->_controller->set_storage($this->_request_data['directory'], $this->_schema);
56
-        if (! $this->_controller->initialize())
56
+        if (!$this->_controller->initialize())
57 57
         {
58 58
             throw new midcom_error("Failed to initialize a DM2 controller instance for task {$this->_directory->id}.");
59 59
         }
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->_load_edit_controller();
72 72
         midcom::get()->head->set_pagetitle(sprintf($this->_l10n_midcom->get('edit %s'), $this->_l10n->get('directory')));
73 73
 
74
-        $workflow = new midcom\workflow\datamanager2(array
75
-        (
74
+        $workflow = new midcom\workflow\datamanager2(array(
76 75
             'controller' => $this->_controller,
77 76
             'save_callback' => array($this, 'save_callback')
78 77
         ));
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/directory/navigation.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
                 {
56 56
                     $tree_array[$root_topic->id] = array('topic' => $root_topic);
57 57
                 }
58
-                $tree_array[$root_topic->id][$topic->id] = array
59
-                (
58
+                $tree_array[$root_topic->id][$topic->id] = array(
60 59
                     "topic" => $topic
61 60
                 );
62 61
                 $this->_tree_array_build($topic_array, $topic, $tree_array[$root_topic->id]);
@@ -98,8 +97,7 @@  discard block
 block discarded – undo
98 97
      */
99 98
     public function _show_navigation($handler_id, array &$data)
100 99
     {
101
-        $tree_array = array
102
-        (
100
+        $tree_array = array(
103 101
             $this->_request_data['root_topic']->id => $this->_request_data['root_topic']
104 102
         );
105 103
         $this->_tree_array_build($this->_request_data['topic_array'], $this->_request_data['root_topic'], $tree_array);
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/directory/create.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $generator = midcom::get()->serviceloader->load('midcom_core_service_urlgenerator');
48 48
         $topic->name = $generator->from_string($_POST['extra']);
49 49
 
50
-        if (! $topic->create())
50
+        if (!$topic->create())
51 51
         {
52 52
             debug_print_r('We operated on this object:', $topic);
53 53
             throw new midcom_error("Failed to create a new topic, cannot continue. Error: " . midcom_connection::get_error_string());
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $this->_schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_directory'));
67 67
         $this->_controller = midcom_helper_datamanager2_controller::create('create');
68
-        $this->_controller->schemadb =& $this->_schemadb;
68
+        $this->_controller->schemadb = & $this->_schemadb;
69 69
         $this->_controller->schemaname = $this->_schema;
70
-        $this->_controller->callback_object =& $this;
71
-        if (! $this->_controller->initialize())
70
+        $this->_controller->callback_object = & $this;
71
+        if (!$this->_controller->initialize())
72 72
         {
73 73
             throw new midcom_error("Failed to initialize a DM2 create controller.");
74 74
         }
@@ -87,8 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         midcom::get()->head->set_pagetitle($this->_l10n->get('new directory'));
89 89
 
90
-        $workflow = $this->get_workflow('datamanager2', array
91
-        (
90
+        $workflow = $this->get_workflow('datamanager2', array(
92 91
             'controller' => $this->_controller,
93 92
             'save_callback' => array($this, 'save_callback')
94 93
         ));
@@ -100,6 +99,6 @@  discard block
 block discarded – undo
100 99
         $indexer = new org_openpsa_documents_midcom_indexer($this->_topic);
101 100
         $indexer->index($controller->datamanager);
102 101
 
103
-        return $this->_request_data["directory"]->name. "/";
102
+        return $this->_request_data["directory"]->name . "/";
104 103
     }
105 104
 }
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/finder.php 1 patch
Spacing   +11 added lines, -19 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
         org_openpsa_widgets_contact::add_head_elements();
31 31
 
32 32
         $head = midcom::get()->head;
33
-        $head->add_jsfile(MIDCOM_JQUERY_UI_URL. '/ui/draggable.min.js');
34
-        $head->add_jsfile(MIDCOM_JQUERY_UI_URL. '/ui/droppable.min.js');
35
-        $head->add_jsfile(MIDCOM_JQUERY_UI_URL. '/ui/selectable.min.js');
33
+        $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/draggable.min.js');
34
+        $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/droppable.min.js');
35
+        $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/selectable.min.js');
36 36
         $head->add_jsfile(MIDCOM_STATIC_URL . $prefix . 'js/elfinder.min.js');
37 37
 
38 38
         $lang = midcom::get()->i18n->get_current_language();
@@ -64,26 +64,22 @@  discard block
 block discarded – undo
64 64
         $buttons = array();
65 65
         if ($this->_request_data['directory']->can_do('midgard:create'))
66 66
         {
67
-            $buttons[] = $workflow->get_button("document/create/", array
68
-            (
67
+            $buttons[] = $workflow->get_button("document/create/", array(
69 68
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('new document'),
70 69
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-text.png',
71 70
             ));
72
-            $buttons[] = $workflow->get_button("create/", array
73
-            (
71
+            $buttons[] = $workflow->get_button("create/", array(
74 72
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('new directory'),
75 73
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-dir.png',
76 74
             ));
77 75
         }
78 76
         if ($this->_request_data['directory']->can_do('midgard:update'))
79 77
         {
80
-            $buttons[] = $workflow->get_button("edit/", array
81
-            (
78
+            $buttons[] = $workflow->get_button("edit/", array(
82 79
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('edit directory'),
83 80
                 MIDCOM_TOOLBAR_ACCESSKEY => 'e',
84 81
             ));
85
-            $buttons[] = array
86
-            (
82
+            $buttons[] = array(
87 83
                 MIDCOM_TOOLBAR_URL => "__ais/folder/move/{$this->_request_data['directory']->guid}/",
88 84
                 MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('move', 'midcom.admin.folder'),
89 85
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/save-as.png',
@@ -92,8 +88,7 @@  discard block
 block discarded – undo
92 88
         if ($this->_request_data['directory']->can_do('midgard:delete'))
93 89
         {
94 90
             $workflow = $this->get_workflow('delete', array('object' => $this->_request_data['directory'], 'recursive' => true));
95
-            $buttons[] = $workflow->get_button("__ais/folder/delete/", array
96
-            (
91
+            $buttons[] = $workflow->get_button("__ais/folder/delete/", array(
97 92
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('delete directory'),
98 93
                 MIDCOM_TOOLBAR_ACCESSKEY => 'd',
99 94
             ));
@@ -119,12 +114,9 @@  discard block
 block discarded – undo
119 114
      */
120 115
     public function _handler_connector($handler_id, array $args, array &$data)
121 116
     {
122
-        $options = array
123
-        (
124
-            'roots' => array
125
-            (
126
-                array
127
-                (
117
+        $options = array(
118
+            'roots' => array(
119
+                array(
128 120
                     'driver' => 'Openpsa',
129 121
                     'path' => $this->_topic->guid
130 122
                 )
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/grid/provider.php 2 patches
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
     private function _convert_to_localdata()
252 252
     {
253
-        return "var " . $this->_grid->get_identifier() . '_entries = ' .  json_encode($this->get_rows()) . ";\n";
253
+        return "var " . $this->_grid->get_identifier() . '_entries = ' . json_encode($this->get_rows()) . ";\n";
254 254
     }
255 255
 
256 256
     private function _render_json()
@@ -261,8 +261,7 @@  discard block
 block discarded – undo
261 261
             $this->_total_rows = count($rows);
262 262
         }
263 263
 
264
-        $response = array
265
-        (
264
+        $response = array(
266 265
             'total' => ceil($this->_total_rows / $this->_results_per_page),
267 266
             'page' => ($this->_offset / $this->_results_per_page) + 1,
268 267
             'records' => $this->_total_rows,
@@ -289,7 +288,7 @@  discard block
 block discarded – undo
289 288
             $this->_sort_field = $query['sidx'];
290 289
             $this->_sort_direction = strtoupper($query['sord']);
291 290
         }
292
-        if (   !empty($query['_search'])
291
+        if (!empty($query['_search'])
293 292
             && $query['_search'] === 'true')
294 293
         {
295 294
             foreach ($query as $field => $value)
@@ -318,7 +317,7 @@  discard block
 block discarded – undo
318 317
 
319 318
         $this->_total_rows = $qb->count();
320 319
 
321
-        if (   $this->_datatype == 'json'
320
+        if ($this->_datatype == 'json'
322 321
             && !empty($this->_results_per_page))
323 322
         {
324 323
             $this->_query->set_limit($this->_results_per_page);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -96,12 +96,10 @@  discard block
 block discarded – undo
96 96
         if (is_a($source, 'org_openpsa_widgets_grid_provider_client'))
97 97
         {
98 98
             $this->_client = $source;
99
-        }
100
-        else if (is_array($source))
99
+        } else if (is_array($source))
101 100
         {
102 101
             $this->set_rows($source);
103
-        }
104
-        else
102
+        } else
105 103
         {
106 104
             throw new midcom_error('Unknown source type');
107 105
         }
@@ -332,12 +330,10 @@  discard block
 block discarded – undo
332 330
         if ($qb instanceof midcom_core_querybuilder)
333 331
         {
334 332
             $items = $qb->execute();
335
-        }
336
-        else if ($qb instanceof midcom_core_collector)
333
+        } else if ($qb instanceof midcom_core_collector)
337 334
         {
338 335
             $items = $qb->get_objects();
339
-        }
340
-        else
336
+        } else
341 337
         {
342 338
             throw new midcom_error('Unsupported query class ' . get_class($qb));
343 339
         }
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/grid/main.php 2 patches
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         {
107 107
             $lang = $language;
108 108
         }
109
-        $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'i18n/grid.locale-'. $lang . '.min.js');
109
+        $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'i18n/grid.locale-' . $lang . '.min.js');
110 110
 
111 111
         $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'jquery.jqgrid.min.js');
112 112
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     public function set_option($key, $value, $autoquote_string = true)
163 163
     {
164 164
         $this->_raw_options[$key] = $value;
165
-        if (   $autoquote_string
165
+        if ($autoquote_string
166 166
             && is_string($value))
167 167
         {
168 168
             $value = '"' . str_replace('"', '\\"', $value) . '"';
@@ -206,8 +206,7 @@  discard block
 block discarded – undo
206 206
         {
207 207
             throw new midcom_error('Invalid column name ' . $name);
208 208
         }
209
-        $this->_columns[$name] = array
210
-        (
209
+        $this->_columns[$name] = array(
211 210
             'label' => $label,
212 211
             'options' => $options,
213 212
             'separate_index' => $separate_index
@@ -229,7 +228,7 @@  discard block
 block discarded – undo
229 228
      */
230 229
     public function remove_column($name)
231 230
     {
232
-        if (   empty($name)
231
+        if (empty($name)
233 232
             || !array_key_exists($name, $this->_columns))
234 233
         {
235 234
             throw new midcom_error('Invalid column name ' . $name);
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -166,16 +166,13 @@  discard block
 block discarded – undo
166 166
             && is_string($value))
167 167
         {
168 168
             $value = '"' . str_replace('"', '\\"', $value) . '"';
169
-        }
170
-        else if ($value === true)
169
+        } else if ($value === true)
171 170
         {
172 171
             $value = 'true';
173
-        }
174
-        else if ($value === false)
172
+        } else if ($value === false)
175 173
         {
176 174
             $value = 'false';
177
-        }
178
-        else if (is_array($value))
175
+        } else if (is_array($value))
179 176
         {
180 177
             $value = json_encode($value);
181 178
         }
@@ -253,8 +250,7 @@  discard block
 block discarded – undo
253 250
         if (null == $value)
254 251
         {
255 252
             $this->_footer_data = $data;
256
-        }
257
-        else
253
+        } else
258 254
         {
259 255
             $this->_footer_data[$data] = $value;
260 256
         }
@@ -282,8 +278,7 @@  discard block
 block discarded – undo
282 278
             if (null !== $this->_provider)
283 279
             {
284 280
                 $this->_provider->set_rows($entries);
285
-            }
286
-            else
281
+            } else
287 282
             {
288 283
                 $this->_provider = new org_openpsa_widgets_grid_provider($entries, $this->get_option('datatype'));
289 284
                 $this->_provider->set_grid($this);
@@ -358,8 +353,7 @@  discard block
 block discarded – undo
358 353
             if ($column['separate_index'])
359 354
             {
360 355
                 $string .= 'index: "index_' . $name . '"';
361
-            }
362
-            else
356
+            } else
363 357
             {
364 358
                 $string .= 'index: "' . $name . '"';
365 359
             }
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/contact.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -415,7 +415,7 @@
 block discarded – undo
415 415
             $group_label = $group->get_label();
416 416
             if ($link_contacts)
417 417
             {
418
-                 $group_label = "<a href=\"" . self::$_contacts_url . "group/{$group->guid}/\">" . $group_label . '</a>';
418
+                    $group_label = "<a href=\"" . self::$_contacts_url . "group/{$group->guid}/\">" . $group_label . '</a>';
419 419
             }
420 420
 
421 421
             echo "<span class=\"organization-name\">{$group_label}</span>";
Please login to merge, or discard this patch.
Spacing   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * Contact information of the person being displayed
26 26
      */
27
-    var $contact_details = array
28
-    (
27
+    var $contact_details = array(
29 28
         'guid' => '',
30 29
         'id' => '',
31 30
         'firstname' => '',
@@ -145,7 +144,7 @@  discard block
 block discarded – undo
145 144
      */
146 145
     function read_object($person)
147 146
     {
148
-        if (   !is_object($person)
147
+        if (!is_object($person)
149 148
             || !midcom::get()->dbfactory->is_a($person, 'midcom_db_person'))
150 149
         {
151 150
             // Given $person is not one
@@ -159,7 +158,7 @@  discard block
 block discarded – undo
159 158
         {
160 159
             $this->contact_details['lastname'] = $this->_l10n->get('no person');
161 160
         }
162
-        else if (   $person->firstname == ''
161
+        else if ($person->firstname == ''
163 162
                  && $person->lastname == '')
164 163
         {
165 164
             $this->contact_details['lastname'] = "Person #{$person->id}";
@@ -195,13 +194,13 @@  discard block
 block discarded – undo
195 194
             $this->contact_details['homepage'] = $person->homepage;
196 195
         }
197 196
 
198
-        if (   $this->_config->get('jabber_enable_presence')
197
+        if ($this->_config->get('jabber_enable_presence')
199 198
             && $person->parameter('org.openpsa.jabber', 'jid'))
200 199
         {
201 200
             $this->contact_details['jid'] = $person->parameter('org.openpsa.jabber', 'jid');
202 201
         }
203 202
 
204
-        if (   $this->_config->get('skype_enable_presence')
203
+        if ($this->_config->get('skype_enable_presence')
205 204
             && $person->parameter('org.openpsa.skype', 'name'))
206 205
         {
207 206
             $this->contact_details['skype'] = $person->parameter('org.openpsa.skype', 'name');
@@ -220,7 +219,7 @@  discard block
 block discarded – undo
220 219
         {
221 220
             $url = $this->link;
222 221
         }
223
-        else if (   $this->link_contacts
222
+        else if ($this->link_contacts
224 223
                  && !empty($this->contact_details['guid']))
225 224
         {
226 225
             if (!self::$_contacts_url)
@@ -289,11 +288,11 @@  discard block
 block discarded – undo
289 288
 
290 289
         // Show picture
291 290
         // TODO: Implement photo also in local way
292
-        if (   $this->_config->get('gravatar_enable')
291
+        if ($this->_config->get('gravatar_enable')
293 292
             && !empty($this->contact_details['email']))
294 293
         {
295 294
             $size = $this->_config->get('gravatar_size');
296
-            $gravatar_url = "http://www.gravatar.com/avatar.php?gravatar_id=" . md5($this->contact_details['email']) . "&size=".$size;
295
+            $gravatar_url = "http://www.gravatar.com/avatar.php?gravatar_id=" . md5($this->contact_details['email']) . "&size=" . $size;
297 296
             echo "<img src=\"{$gravatar_url}\" class=\"photo\" style=\"float: right; margin-left: 4px;\" />\n";
298 297
         }
299 298
 
@@ -382,7 +381,7 @@  discard block
 block discarded – undo
382 381
 
383 382
     private function _show_groups()
384 383
     {
385
-        if (   !$this->show_groups
384
+        if (!$this->show_groups
386 385
             || empty($this->contact_details['id']))
387 386
         {
388 387
             return;
@@ -451,13 +450,13 @@  discard block
 block discarded – undo
451 450
 
452 451
             if (sizeof($cards_to_show) == 0)
453 452
             {
454
-                if (   $property != 'street'
453
+                if ($property != 'street'
455 454
                     && $customer->$property)
456 455
                 {
457 456
                     $inherited_cards_only = false;
458 457
                     $cards_to_show[] = $cardname;
459 458
                 }
460
-                else if (   !$default_shown
459
+                else if (!$default_shown
461 460
                          && $customer->street)
462 461
                 {
463 462
                     $default_shown = true;
@@ -466,9 +465,9 @@  discard block
 block discarded – undo
466 465
             }
467 466
             else
468 467
             {
469
-                if (    $customer->$property
470
-                    || (   $customer->street
471
-                        && (   !$inherited_cards_only
468
+                if ($customer->$property
469
+                    || ($customer->street
470
+                        && (!$inherited_cards_only
472 471
                             && !$default_shown)))
473 472
                 {
474 473
                     $inherited_cards_only = false;
@@ -494,8 +493,8 @@  discard block
 block discarded – undo
494 493
         foreach ($cards_to_show as $cardname)
495 494
         {
496 495
             echo '<div class="vcard">';
497
-            if (   $multiple_addresses
498
-                || (   $cardname != 'visiting'
496
+            if ($multiple_addresses
497
+                || ($cardname != 'visiting'
499 498
                     && !$inherited_cards_only))
500 499
             {
501 500
                 echo '<div style="text-align:center"><em>' . midcom::get()->i18n->get_string($cardname . ' address', 'org.openpsa.contacts') . "</em></div>\n";
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -120,13 +120,11 @@  discard block
 block discarded – undo
120 120
             if (class_exists('org_openpsa_contacts_person_dba'))
121 121
             {
122 122
                 $person = org_openpsa_contacts_person_dba::get_cached($src);
123
-            }
124
-            else
123
+            } else
125 124
             {
126 125
                 $person = new midcom_db_person($src);
127 126
             }
128
-        }
129
-        catch (midcom_error $e)
127
+        } catch (midcom_error $e)
130 128
         {
131 129
             $widget = new self();
132 130
             $cache[$src] = $widget;
@@ -158,13 +156,11 @@  discard block
 block discarded – undo
158 156
         if ($person->guid == "")
159 157
         {
160 158
             $this->contact_details['lastname'] = $this->_l10n->get('no person');
161
-        }
162
-        else if (   $person->firstname == ''
159
+        } else if (   $person->firstname == ''
163 160
                  && $person->lastname == '')
164 161
         {
165 162
             $this->contact_details['lastname'] = "Person #{$person->id}";
166
-        }
167
-        else
163
+        } else
168 164
         {
169 165
             $this->contact_details['firstname'] = $person->firstname;
170 166
             $this->contact_details['lastname'] = $person->lastname;
@@ -219,15 +215,13 @@  discard block
 block discarded – undo
219 215
         if ($this->link)
220 216
         {
221 217
             $url = $this->link;
222
-        }
223
-        else if (   $this->link_contacts
218
+        } else if (   $this->link_contacts
224 219
                  && !empty($this->contact_details['guid']))
225 220
         {
226 221
             if (!self::$_contacts_url)
227 222
             {
228 223
                 $this->link_contacts = false;
229
-            }
230
-            else
224
+            } else
231 225
             {
232 226
                 $url = self::$_contacts_url . 'person/' . $this->contact_details['guid'] . '/';
233 227
             }
@@ -372,8 +366,7 @@  discard block
 block discarded – undo
372 366
             if ($dialurl)
373 367
             {
374 368
                 echo "<li class=\"tel $type\"><a title=\"Dial {$this->contact_details[$field]}\" href=\"#\" onclick=\"javascript:window.open('$dialurl{$this->contact_details[$field]}','dialwin','width=300,height=200')\">{$this->contact_details[$field]}</a></li>\n";
375
-            }
376
-            else
369
+            } else
377 370
             {
378 371
                 echo "<li class=\"tel $type\">{$this->contact_details[$field]}</li>\n";
379 372
             }
@@ -398,8 +391,7 @@  discard block
 block discarded – undo
398 391
             try
399 392
             {
400 393
                 $group = org_openpsa_contacts_group_dba::get_cached($data['gid']);
401
-            }
402
-            catch (midcom_error $e)
394
+            } catch (midcom_error $e)
403 395
             {
404 396
                 $e->log();
405 397
                 continue;
@@ -456,15 +448,13 @@  discard block
 block discarded – undo
456 448
                 {
457 449
                     $inherited_cards_only = false;
458 450
                     $cards_to_show[] = $cardname;
459
-                }
460
-                else if (   !$default_shown
451
+                } else if (   !$default_shown
461 452
                          && $customer->street)
462 453
                 {
463 454
                     $default_shown = true;
464 455
                     $cards_to_show[] = $cardname;
465 456
                 }
466
-            }
467
-            else
457
+            } else
468 458
             {
469 459
                 if (    $customer->$property
470 460
                     || (   $customer->street
@@ -531,8 +521,7 @@  discard block
 block discarded – undo
531 521
             {
532 522
                 echo "<p>{$customer->$property_street}<br />\n";
533 523
                 echo "{$customer->$property_postcode} {$customer->$property_city}</p>\n";
534
-            }
535
-            else if ($customer->street)
524
+            } else if ($customer->street)
536 525
             {
537 526
                 echo "<p>{$customer->street}<br />\n";
538 527
                 echo "{$customer->postcode} {$customer->city}</p>\n";
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/ui.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,13 +112,13 @@
 block discarded – undo
112 112
             //pass the urls & titles for the tabs
113 113
             $tabdata[] = array
114 114
             (
115
-               'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/html/',
116
-               'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
115
+                'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/html/',
116
+                'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
117 117
             );
118 118
             $tabdata[] = array
119 119
             (
120
-               'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
121
-               'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
120
+                'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
121
+                'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
122 122
             );
123 123
         }
124 124
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,12 +40,11 @@  discard block
 block discarded – undo
40 40
             $config = array_merge($defaults, $config);
41 41
 
42 42
             $node_url = $siteconfig->get_node_full_url($component);
43
-            if (   $node_url
44
-                && (   !$user_id
43
+            if ($node_url
44
+                && (!$user_id
45 45
                     || midcom::get()->auth->acl->can_do_byguid('midgard:read', $siteconfig->get_node_guid($component), 'midcom_db_topic', $user_id)))
46 46
             {
47
-                $providers[] = array
48
-                (
47
+                $providers[] = array(
49 48
                     'placeholder' => midcom::get()->i18n->get_string('search title', $component),
50 49
                     'url' => $node_url . $config['route'],
51 50
                     'identifier' => $component,
@@ -110,13 +109,11 @@  discard block
 block discarded – undo
110 109
         if (null !== $guid)
111 110
         {
112 111
             //pass the urls & titles for the tabs
113
-            $tabdata[] = array
114
-            (
112
+            $tabdata[] = array(
115 113
                'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/html/',
116 114
                'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
117 115
             );
118
-            $tabdata[] = array
119
-            (
116
+            $tabdata[] = array(
120 117
                'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
121 118
                'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
122 119
             );
@@ -126,7 +123,7 @@  discard block
 block discarded – undo
126 123
         echo "\n<ul>\n";
127 124
         foreach ($tabdata as $key => $tab)
128 125
         {
129
-            echo "<li><a id='key_" . $key ."' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
126
+            echo "<li><a id='key_" . $key . "' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
130 127
         }
131 128
         echo "\n</ul>\n";
132 129
         echo "</div>\n";
Please login to merge, or discard this patch.
lib/org/openpsa/helpers/list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
                     $cache[$array_name][$key] = $label;
155 155
 
156 156
                     //TODO: get the vgroup object based on the key or something, this check fails always.
157
-                    if (   $show_members
157
+                    if ($show_members
158 158
                         && is_object($vgroup))
159 159
                     {
160 160
                         $vgroup_members = $vgroup->list_members();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
         try
73 73
         {
74 74
             $company = new org_openpsa_contacts_group_dba($company_id);
75
-        }
76
-        catch (midcom_error $e)
75
+        } catch (midcom_error $e)
77 76
         {
78 77
             return;
79 78
         }
@@ -145,8 +144,7 @@  discard block
 block discarded – undo
145 144
                     if (is_object($vgroup))
146 145
                     {
147 146
                         $label = $vgroup->name;
148
-                    }
149
-                    else
147
+                    } else
150 148
                     {
151 149
                         $label = $vgroup;
152 150
                     }
Please login to merge, or discard this patch.