Passed
Branch master (95796a)
by Andreas
38:22
created
lib/org/openpsa/products/handler/group/create.php 2 patches
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * DM2 creation callback, binds to the current content topic.
68 68
      */
69
-    public function & dm2_create_callback (&$controller)
69
+    public function & dm2_create_callback(&$controller)
70 70
     {
71 71
         $this->_group = new org_openpsa_products_product_group_dba();
72 72
         $this->_group->up = $this->_request_data['up'];
73 73
 
74
-        if (! $this->_group->create())
74
+        if (!$this->_group->create())
75 75
         {
76 76
             debug_print_r('We operated on this object:', $this->_group);
77 77
             throw new midcom_error('Failed to create a new product group. Last Midgard error was: ' . midcom_connection::get_error_string());
@@ -111,8 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         midcom::get()->head->set_pagetitle(sprintf($this->_l10n_midcom->get('create %s'), $this->_l10n->get($this->_schemadb[$this->_schema]->description)));
113 113
 
114
-        $workflow = $this->get_workflow('datamanager2', array
115
-        (
114
+        $workflow = $this->get_workflow('datamanager2', array(
116 115
             'controller' => $data['controller'],
117 116
             'save_callback' => array($this, 'save_callback')
118 117
         ));
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
lib/org/openpsa/products/midcom/interfaces.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public function _on_reindex($topic, $config, &$indexer)
71 71
     {
72
-        if (   !$config->get('index_products')
72
+        if (!$config->get('index_products')
73 73
             && !$config->get('index_groups'))
74 74
         {
75 75
             debug_add("No indexing to groups and products, skipping", MIDCOM_LOG_WARN);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/viewer.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
                 $create_url .= $task . "/";
30 30
             }
31 31
 
32
-            $this->_view_toolbar->add_item($workflow->get_button($create_url, array
33
-            (
32
+            $this->_view_toolbar->add_item($workflow->get_button($create_url, array(
34 33
                 MIDCOM_TOOLBAR_LABEL => sprintf($this->_l10n_midcom->get('create %s'), $this->_l10n->get($schemadb[$name]->description)),
35 34
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_new-event.png',
36 35
             )));
@@ -43,12 +42,12 @@  discard block
 block discarded – undo
43 42
     public function _on_handle($handler, array $args)
44 43
     {
45 44
         $task = false;
46
-        if (   $handler == 'list_hours_task'
45
+        if ($handler == 'list_hours_task'
47 46
             || $handler == 'list_hours_task_all')
48 47
         {
49 48
             $task = $args[0];
50 49
         }
51
-        if (   strpos($handler, 'index') !== false
50
+        if (strpos($handler, 'index') !== false
52 51
             || strpos($handler, 'list') !== false)
53 52
         {
54 53
             $this->_populate_view_toolbar($task);
@@ -68,7 +67,7 @@  discard block
 block discarded – undo
68 67
         $person_filter->set_label($this->_l10n->get("choose user"));
69 68
         $qf->add_filter($person_filter);
70 69
 
71
-        if (   $this->_request_data['handler_id'] != 'index_timestamp'
70
+        if ($this->_request_data['handler_id'] != 'index_timestamp'
72 71
             && $this->_request_data['handler_id'] != 'index')
73 72
         {
74 73
             $date_filter = new org_openpsa_core_filter_timeframe('date');
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/handler/hours/list.php 2 patches
Spacing   +11 added lines, -21 removed lines patch added patch discarded remove patch
@@ -67,10 +67,8 @@  discard block
 block discarded – undo
67 67
 
68 68
                 if ($projects_url)
69 69
                 {
70
-                    $this->_view_toolbar->add_item
71
-                    (
72
-                        array
73
-                        (
70
+                    $this->_view_toolbar->add_item(
71
+                        array(
74 72
                             MIDCOM_TOOLBAR_URL => $projects_url . "task/{$task->guid}/",
75 73
                             MIDCOM_TOOLBAR_LABEL => sprintf($this->_l10n->get('show task %s'), $task->title),
76 74
                             MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/jump-to.png',
@@ -105,20 +103,16 @@  discard block
 block discarded – undo
105 103
      */
106 104
     private function _load_hour_data(array $hours)
107 105
     {
108
-        $reports = array
109
-        (
110
-            'invoiceable' => array
111
-            (
106
+        $reports = array(
107
+            'invoiceable' => array(
112 108
                 'hours' => 0,
113 109
                 'reports' => array(),
114 110
             ),
115
-            'uninvoiceable' => array
116
-            (
111
+            'uninvoiceable' => array(
117 112
                 'hours' => 0,
118 113
                 'reports' => array(),
119 114
             ),
120
-            'invoiced' => array
121
-            (
115
+            'invoiced' => array(
122 116
                 'hours' => 0,
123 117
                 'reports' => array(),
124 118
             ),
@@ -132,8 +126,7 @@  discard block
 block discarded – undo
132 126
                 {
133 127
                     $reporter = new midcom_db_person($report->person);
134 128
                     $reporter_card = new org_openpsa_widgets_contact($reporter);
135
-                    $this->reporters[$report->person] = array
136
-                    (
129
+                    $this->reporters[$report->person] = array(
137 130
                         'card' => $reporter_card->show_inline(),
138 131
                         'rname' => $reporter->rname
139 132
                     );
@@ -192,7 +185,7 @@  discard block
 block discarded – undo
192 185
                     $data['action_options']['mark_uninvoiceable'] = array('label' => $this->_l10n->get('mark_uninvoiceable'));
193 186
                     break;
194 187
                 case 'uninvoiceable':
195
-                    $data['action_options']['mark_invoiceable'] =  array('label' => $this->_l10n->get('mark_invoiceable'));
188
+                    $data['action_options']['mark_invoiceable'] = array('label' => $this->_l10n->get('mark_invoiceable'));
196 189
                     break;
197 190
             }
198 191
             $data['reports'] = $reports;
@@ -210,16 +203,13 @@  discard block
 block discarded – undo
210 203
         $task_conf = midcom_helper_datamanager2_widget_autocomplete::get_widget_config('task');
211 204
         $invoice_conf = midcom_helper_datamanager2_widget_autocomplete::get_widget_config('invoice');
212 205
 
213
-        return array
214
-        (
206
+        return array(
215 207
             'none' => array('label' => midcom::get()->i18n->get_string("choose action", "midcom.admin.user")),
216
-            'change_task' => array
217
-            (
208
+            'change_task' => array(
218 209
                 'label' => $this->_l10n->get('change_task'),
219 210
                 'widget_config' => $task_conf
220 211
             ),
221
-            'change_invoice' => array
222
-            (
212
+            'change_invoice' => array(
223 213
                 'label' => $this->_l10n->get('change_invoice'),
224 214
                 'widget_config' => $invoice_conf
225 215
             )
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,8 +172,7 @@
 block discarded – undo
172 172
                         }
173 173
                         $this->_jobs[] = $job;
174 174
                     }
175
-                }
176
-                catch (midcom_error $e)
175
+                } catch (midcom_error $e)
177 176
                 {
178 177
                     $e->log(MIDCOM_LOG_ERROR);
179 178
                     debug_print_r('Got this job declaration:', $job);
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/handler/hours/admin.php 2 patches
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
         $defaults['date'] = time();
55 55
 
56 56
         $controller = midcom_helper_datamanager2_controller::create('create');
57
-        $controller->schemadb =& $this->_schemadb;
57
+        $controller->schemadb = & $this->_schemadb;
58 58
         $controller->schemaname = $this->_schema;
59 59
         $controller->defaults = $defaults;
60
-        $controller->callback_object =& $this;
61
-        if (! $controller->initialize())
60
+        $controller->callback_object = & $this;
61
+        if (!$controller->initialize())
62 62
         {
63 63
             throw new midcom_error("Failed to initialize a DM2 create controller.");
64 64
         }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * DM2 creation callback
70 70
      */
71
-    public function & dm2_create_callback (&$controller)
71
+    public function & dm2_create_callback(&$controller)
72 72
     {
73 73
         $this->_hour_report = new org_openpsa_projects_hour_report_dba();
74 74
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         {
81 81
             $this->_hour_report->task = $this->_request_data['task'];
82 82
         }
83
-        if (! $this->_hour_report->create())
83
+        if (!$this->_hour_report->create())
84 84
         {
85 85
             debug_print_r('We operated on this object:', $this->_hour_report);
86 86
             throw new midcom_error("Failed to create a new hour_report under hour_report group #{$this->_request_data['task']}. Error: " . midcom_connection::get_error_string());
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
 
139 139
         $this->_load_schemadb();
140 140
         $data['controller'] = midcom_helper_datamanager2_controller::create('simple');
141
-        $data['controller']->schemadb =& $this->_schemadb;
141
+        $data['controller']->schemadb = & $this->_schemadb;
142 142
         $data['controller']->set_storage($this->_hour_report);
143
-        if (! $data['controller']->initialize())
143
+        if (!$data['controller']->initialize())
144 144
         {
145 145
             throw new midcom_error("Failed to initialize a DM2 controller instance for hour_report {$this->_hour_report->id}.");
146 146
         }
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
         $workflow = $this->get_workflow('datamanager2', array('controller' => $data['controller']));
151 151
         if ($this->_hour_report->can_do('midgard:delete'))
152 152
         {
153
-            $delete = $this->get_workflow('delete', array
154
-            (
153
+            $delete = $this->get_workflow('delete', array(
155 154
                 'object' => $this->_hour_report,
156 155
                 'label' => $this->_l10n->get('hour report')
157 156
             ));
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@  discard block
 block discarded – undo
75 75
         if ($task = $controller->formmanager->get_value('task'))
76 76
         {
77 77
             $this->_hour_report->task = $task;
78
-        }
79
-        else if ($this->_request_data['task'])
78
+        } else if ($this->_request_data['task'])
80 79
         {
81 80
             $this->_hour_report->task = $this->_request_data['task'];
82 81
         }
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
             $task = new org_openpsa_projects_task_dba($args[1]);
112 111
             $task->require_do('midgard:create');
113 112
             $data['task'] = $task->id;
114
-        }
115
-        else
113
+        } else
116 114
         {
117 115
             midcom::get()->auth->require_valid_user();
118 116
             $data['task'] = 0;
@@ -176,8 +174,7 @@  discard block
 block discarded – undo
176 174
         {
177 175
             $task = org_openpsa_projects_task_dba::get_cached($hour_report->task);
178 176
             $options['success_url'] = 'hours/task/' . $task->guid . '/';
179
-        }
180
-        catch (midcom_error $e)
177
+        } catch (midcom_error $e)
181 178
         {
182 179
             $e->log();
183 180
         }
@@ -198,8 +195,7 @@  discard block
 block discarded – undo
198 195
         if (isset($_POST['relocate_url']))
199 196
         {
200 197
             $relocate = $_POST['relocate_url'];
201
-        }
202
-        else
198
+        } else
203 199
         {
204 200
             debug_print_r('no relocate url was passed ', $_POST);
205 201
         }
@@ -235,8 +231,7 @@  discard block
 block discarded – undo
235 231
                 }
236 232
                 $hour_report->update();
237 233
             }
238
-        }
239
-        else
234
+        } else
240 235
         {
241 236
             debug_print_r('No reports passed to action handler', $_POST);
242 237
         }
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/handler/index.php 2 patches
Spacing   +8 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param array &$data The local request data.
24 24
      * @return boolean True if the request can be handled, false otherwise.
25 25
      */
26
-    public function _can_handle_index ($handler_id, array $args, array &$data)
26
+    public function _can_handle_index($handler_id, array $args, array &$data)
27 27
     {
28 28
         if (isset($args[0]))
29 29
         {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param array $args the arguments given to the handler
66 66
      * @param array &$data The local request data.
67 67
      */
68
-    public function _handler_index ($handler_id, array $args, array &$data)
68
+    public function _handler_index($handler_id, array $args, array &$data)
69 69
     {
70 70
         midcom::get()->auth->require_valid_user();
71 71
 
@@ -92,22 +92,18 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $week_start = strftime('%Y-%m-%d', $this->_request_data['week_start']);
94 94
         $week_end = strftime('%Y-%m-%d', $this->_request_data['week_end']);
95
-        $buttons = array
96
-        (
97
-            array
98
-            (
95
+        $buttons = array(
96
+            array(
99 97
                 MIDCOM_TOOLBAR_URL => 'hours/?date[from]=' . $week_start . '&date[to]=' . $week_end,
100 98
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('list view'),
101 99
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/view.png',
102 100
             ),
103
-            array
104
-            (
101
+            array(
105 102
                 MIDCOM_TOOLBAR_URL => $previous_week . "/",
106 103
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('previous week'),
107 104
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/back.png',
108 105
             ),
109
-            array
110
-            (
106
+            array(
111 107
                 MIDCOM_TOOLBAR_URL => $next_week . "/",
112 108
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('next week'),
113 109
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/next.png',
@@ -139,7 +135,7 @@  discard block
 block discarded – undo
139 135
             }
140 136
 
141 137
             $date_identifier = date('Y-m-d', $row['date']);
142
-            $row_identifier = $task->id . '-' .  $row['person'];
138
+            $row_identifier = $task->id . '-' . $row['person'];
143 139
 
144 140
             if (!isset($reports[$row_identifier]))
145 141
             {
@@ -155,8 +151,7 @@  discard block
 block discarded – undo
155 151
                     $person_name = '';
156 152
                 }
157 153
 
158
-                $reports[$row_identifier] = array
159
-                (
154
+                $reports[$row_identifier] = array(
160 155
                     'task' => $this->_get_list_link($task->get_label(), null, $task->guid),
161 156
                     'index_task' => $task->get_label(),
162 157
                     'person' => $person_label,
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@  discard block
 block discarded – undo
28 28
         if (isset($args[0]))
29 29
         {
30 30
             $requested_time = $args[0];
31
-        }
32
-        else
31
+        } else
33 32
         {
34 33
             $requested_time = date('Y-m-d');
35 34
         }
36 35
         try
37 36
         {
38 37
             $date = new DateTime($requested_time);
39
-        }
40
-        catch (Exception $e)
38
+        } catch (Exception $e)
41 39
         {
42 40
             return false;
43 41
         }
@@ -131,8 +129,7 @@  discard block
 block discarded – undo
131 129
             try
132 130
             {
133 131
                 $task = org_openpsa_projects_task_dba::get_cached($row['task']);
134
-            }
135
-            catch (midcom_error $e)
132
+            } catch (midcom_error $e)
136 133
             {
137 134
                 // Task couldn't be loaded, probably because of ACL
138 135
                 continue;
@@ -148,8 +145,7 @@  discard block
 block discarded – undo
148 145
                     $person_object = org_openpsa_contacts_person_dba::get_cached($row['person']);
149 146
                     $person_label = $this->_get_list_link($person_object->name, null, null, $row['person']);
150 147
                     $person_name = $person_object->name;
151
-                }
152
-                catch (midcom_error $e)
148
+                } catch (midcom_error $e)
153 149
                 {
154 150
                     $person_label = $this->_l10n->get('no person');
155 151
                     $person_name = '';
@@ -168,8 +164,7 @@  discard block
 block discarded – undo
168 164
                 $reports[$row_identifier]['index_' . $date_identifier] = $row['hours'];
169 165
                 $number = $formatter->number($reports[$row_identifier]['index_' . $date_identifier]);
170 166
                 $reports[$row_identifier][$date_identifier] = '<a href="' . $prefix . 'hours/edit/' . $guid . '/" ' . $workflow->render_attributes() . '>' . $number . '</a>';
171
-            }
172
-            else
167
+            } else
173 168
             {
174 169
                 $reports[$row_identifier]['index_' . $date_identifier] += $row['hours'];
175 170
                 $reports[$row_identifier][$date_identifier] = $this->_get_list_link($formatter->number($reports[$row_identifier]['index_' . $date_identifier]), $date_identifier, $task->guid, $row['person']);
@@ -192,8 +187,7 @@  discard block
 block discarded – undo
192 187
         if ($date !== null)
193 188
         {
194 189
             $filters['date'] = array('from' => $date, 'to' => $date);
195
-        }
196
-        else
190
+        } else
197 191
         {
198 192
             $start = strftime('%Y-%m-%d', $this->_request_data['week_start']);
199 193
             $end = strftime('%Y-%m-%d', $this->_request_data['week_end']);
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/viewer.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,12 +20,11 @@  discard block
 block discarded – undo
20 20
      */
21 21
     private function _populate_node_toolbar()
22 22
     {
23
-        if (   $this->_topic->can_do('midgard:update')
23
+        if ($this->_topic->can_do('midgard:update')
24 24
             && $this->_topic->can_do('midcom:component_config'))
25 25
         {
26 26
             $workflow = $this->get_workflow('datamanager2');
27
-            $this->_node_toolbar->add_item($workflow->get_button('config/', array
28
-            (
27
+            $this->_node_toolbar->add_item($workflow->get_button('config/', array(
29 28
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),
30 29
                 MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),
31 30
                 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png',
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
      */
49 48
     public function load_schemas()
50 49
     {
51
-        $schemadbs = array
52
-        (
50
+        $schemadbs = array(
53 51
             'person' => midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_person')),
54 52
             'campaign_member' => midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_campaign_member')),
55 53
             'organization' => midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_organization')),
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/sender.php 2 patches
Spacing   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -203,8 +203,7 @@  discard block
 block discarded – undo
203 203
     public function register_send_job($batch, $url_base, $time = null)
204 204
     {
205 205
         $time = $time ?: time() + 60;
206
-        $args = array
207
-        (
206
+        $args = array(
208 207
             'batch' => $batch,
209 208
             'url_base' => $url_base,
210 209
         );
@@ -248,8 +247,7 @@  discard block
 block discarded – undo
248 247
             $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::FAILURE;
249 248
             if (!$this->test_mode)
250 249
             {
251
-                $params[] = array
252
-                (
250
+                $params[] = array(
253 251
                     'domain' => 'org.openpsa.directmarketing',
254 252
                     'name' => 'send_error_message',
255 253
                     'value' => $e->getMessage(),
@@ -290,7 +288,7 @@  discard block
 block discarded – undo
290 288
             $token .= $tokenchars[mt_rand(0, strlen($tokenchars) - 1)];
291 289
         }
292 290
         //If token is not free or (very, very unlikely) matches our dummy token, recurse.
293
-        if (   $token === 'dummy'
291
+        if ($token === 'dummy'
294 292
             || !org_openpsa_directmarketing_campaign_messagereceipt_dba::token_is_free($token))
295 293
         {
296 294
             return $this->_create_token();
@@ -318,7 +316,7 @@  discard block
 block discarded – undo
318 316
             return false;
319 317
         }
320 318
         $type = $this->_backend->get_type();
321
-        if (   $person->get_parameter('org.openpsa.directmarketing', "send_all_denied")
319
+        if ($person->get_parameter('org.openpsa.directmarketing', "send_all_denied")
322 320
             || $person->get_parameter('org.openpsa.directmarketing', "send_{$type}_denied"))
323 321
         {
324 322
             debug_add("Sending {$type} messages to person {$person->rname} is denied, unsubscribing member (member #{$member->id})");
@@ -368,7 +366,7 @@  discard block
 block discarded – undo
368 366
         debug_add("Recursion level is {$level}, limit is {$this->_chunk_max_recurse}");
369 367
         /* Make sure we still have results left, if not just recurse...
370 368
          (basically this is to avoid returning an empty array when everything is otherwise ok) */
371
-        if (   count($results) == 0
369
+        if (count($results) == 0
372 370
             && ($level < $this->_chunk_max_recurse))
373 371
         {
374 372
             debug_add('All our results got filtered, recursing for another round');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -170,8 +170,7 @@  discard block
 block discarded – undo
170 170
         if ($results === false)
171 171
         {
172 172
             $status = true; //All should be ok
173
-        }
174
-        else if ($status = $this->process_results($results, $subject, $content, $from))
173
+        } else if ($status = $this->process_results($results, $subject, $content, $from))
175 174
         {
176 175
             //register next batch
177 176
             return $this->register_send_job($batch + 1, $url_base);
@@ -242,8 +241,7 @@  discard block
 block discarded – undo
242 241
             $this->_backend->send($person, $member, $token, $subject, $content, $from);
243 242
             self::$_messages_sent++;
244 243
             $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::SENT;
245
-        }
246
-        catch (midcom_error $e)
244
+        } catch (midcom_error $e)
247 245
         {
248 246
             $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::FAILURE;
249 247
             if (!$this->test_mode)
@@ -309,8 +307,7 @@  discard block
 block discarded – undo
309 307
         try
310 308
         {
311 309
             $person = org_openpsa_contacts_person_dba::get_cached($member->person);
312
-        }
313
-        catch (midcom_error $e)
310
+        } catch (midcom_error $e)
314 311
         {
315 312
             debug_add("Person #{$member->person} deleted or missing, removing member (member #{$member->id})");
316 313
             $member->orgOpenpsaObtype = org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED;
@@ -474,8 +471,7 @@  discard block
 block discarded – undo
474 471
         {
475 472
             debug_add('TEST mode, adding constraints');
476 473
             $qb->add_constraint('orgOpenpsaObtype', '=', org_openpsa_directmarketing_campaign_member_dba::TESTER);
477
-        }
478
-        else
474
+        } else
479 475
         {
480 476
             debug_add('REAL mode, adding constraints');
481 477
             //Fail safe way, exclude those we know we do not want, in case some wanted members have incorrect type...
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/campaign/message.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function _on_loaded()
37 37
     {
38 38
         $this->title = trim($this->title);
39
-        if (   $this->id
39
+        if ($this->id
40 40
             && empty($this->title))
41 41
         {
42 42
             $this->title = 'untitled';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
         if ($this->sendCompleted)
64 64
         {
65 65
             $class .= ' ' . $class . '-completed';
66
-        }
67
-        else if ($this->sendStarted)
66
+        } else if ($this->sendStarted)
68 67
         {
69 68
             $class .= ' ' . $class . '-started';
70 69
         }
Please login to merge, or discard this patch.