Completed
Push — master ( 309357...7ad46f )
by Andreas
18:00
created
lib/org/openpsa/invoices/invoice/pdf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $filename = $generator->from_string($this->invoice->get_label()) . '.pdf';
88 88
 
89 89
         // tmp filename
90
-        $tmp_file = midcom::get()->config->get('midcom_tempdir') . "/". $filename;
90
+        $tmp_file = midcom::get()->config->get('midcom_tempdir') . "/" . $filename;
91 91
 
92 92
         // render pdf to tmp filename
93 93
         $pdf_builder->render($tmp_file);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $attachment->update();
101 101
         } else {
102 102
             $attachment = $this->invoice->create_attachment($filename, $this->invoice->get_label(), "application/pdf");
103
-            if (   !$attachment
103
+            if (!$attachment
104 104
                 || !$this->invoice->set_parameter("midcom.helper.datamanager2.type.blobs", "guids_pdf_file", $attachment->guid . ":" . $attachment->guid)) {
105 105
                 throw new midcom_error("Failed to create invoice attachment for pdf");
106 106
             }
Please login to merge, or discard this patch.
lib/org/openpsa/relatedto/handler/journal/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 }
122 122
 
123 123
                 $reflector = midcom_helper_reflector::get($linked_object);
124
-                $link_html = "<a href='" . midcom::get()->permalinks->create_permalink($linked_object->guid) . "'>" . $reflector->get_object_label($linked_object) ."</a>";
124
+                $link_html = "<a href='" . midcom::get()->permalinks->create_permalink($linked_object->guid) . "'>" . $reflector->get_object_label($linked_object) . "</a>";
125 125
                 $data['linked_objects'][$entry->linkGuid] = $link_html;
126 126
                 $data['linked_raw_objects'][$entry->linkGuid] = $reflector->get_object_label($linked_object);
127 127
             }
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
         //check if there is a page & rows - parameter passed - if add them to qb
152 152
         if (array_key_exists('page', $_POST) && array_key_exists('rows', $_POST)) {
153 153
             $this->_request_data['page'] = $_POST['page'];
154
-            $this->qb->set_limit((int)$_POST['rows']);
155
-            $offset = ((int)$_POST['page'] - 1) * (int)$_POST['rows'];
154
+            $this->qb->set_limit((int) $_POST['rows']);
155
+            $offset = ((int) $_POST['page'] - 1) * (int) $_POST['rows'];
156 156
             $this->qb->set_offset($offset);
157 157
         }
158 158
     }
Please login to merge, or discard this patch.
lib/org/openpsa/notifications/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
         // If user has preference for this message, we use that
95 95
         $personal_preferences = $recipient->list_parameters('org.openpsa.notifications');
96
-        if (   count($personal_preferences) > 0
96
+        if (count($personal_preferences) > 0
97 97
             && array_key_exists("{$component}:{$action}", $personal_preferences)) {
98 98
             return $personal_preferences[$action];
99 99
         }
Please login to merge, or discard this patch.
lib/midcom/core/collector.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $counter = 0;
135 135
 
136 136
         foreach ($result as $object_guid => $empty_copy) {
137
-            if (    $this->_user_id
137
+            if ($this->_user_id
138 138
                 && !midcom::get()->auth->acl->can_do_byguid('midgard:read', $object_guid, $classname, $this->_user_id)) {
139 139
                 debug_add("Failed to load result, read privilege on {$object_guid} not granted for the current user.", MIDCOM_LOG_INFO);
140 140
                 continue;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                 if ($counter <= $this->_offset) {
146 146
                     continue;
147 147
                 }
148
-                if (   $this->_limit
148
+                if ($this->_limit
149 149
                     && $counter > ($this->_offset + $this->_limit)) {
150 150
                     break;
151 151
                 }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
     public function get_subkey($key, $property)
225 225
     {
226
-        if (   $this->_user_id
226
+        if ($this->_user_id
227 227
             && !midcom::get()->auth->acl->can_do_byguid('midgard:read', $key, $this->_real_class, $this->_user_id)) {
228 228
             midcom_connection::set_error(MGD_ERR_ACCESS_DENIED);
229 229
             return false;
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
     public function get($key)
235 235
     {
236
-        if (   $this->_user_id
236
+        if ($this->_user_id
237 237
             && !midcom::get()->auth->acl->can_do_byguid('midgard:read', $key, $this->_real_class, $this->_user_id)) {
238 238
             midcom_connection::set_error(MGD_ERR_ACCESS_DENIED);
239 239
             return false;
Please login to merge, or discard this patch.
lib/midcom/helper/nav/backend.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
         $lastgoodnode = null;
258 258
 
259
-        while (   $parent_id
259
+        while ($parent_id
260 260
                && !isset(self::$_nodes[$parent_id])) {
261 261
             try {
262 262
                 self::$_nodes[$parent_id] = $this->_loadNodeData($parent_id);
@@ -273,14 +273,14 @@  discard block
 block discarded – undo
273 273
 
274 274
             $parent_id = $this->_get_parent_id($topic_id);
275 275
 
276
-            if (   $up
276
+            if ($up
277 277
                 && $up_id = array_pop($up_ids)
278 278
                 && $up_id != $parent_id) {
279 279
                 $parent_id = $up_id;
280 280
             }
281 281
         }
282 282
 
283
-        if (   !is_null($lastgoodnode)
283
+        if (!is_null($lastgoodnode)
284 284
             && (empty($this->_lastgoodnode) || $this->_lastgoodnode < 0)) {
285 285
             $this->_lastgoodnode = $lastgoodnode;
286 286
         }
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     {
317 317
         $node = new midcom_helper_nav_node($this, $topic_id, $up);
318 318
 
319
-        if (    !$node->is_object_visible()
319
+        if (!$node->is_object_visible()
320 320
              || !$node->is_readable_by($this->_user_id)) {
321 321
             throw new midcom_error_forbidden('Node cannot be read or is invisible');
322 322
         }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         });
362 362
         foreach ($leaves as $id => $leaf) {
363 363
             $this->_leaves[$id] = $leaf;
364
-            $this->_loaded_leaves[$node->id][$id] =& $this->_leaves[$id];
364
+            $this->_loaded_leaves[$node->id][$id] = & $this->_leaves[$id];
365 365
         }
366 366
     }
367 367
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             }
448 448
             $subnode_id = $this->_nodeid($id, $up);
449 449
 
450
-            if (   !$show_noentry
450
+            if (!$show_noentry
451 451
                 && self::$_nodes[$subnode_id]->noentry) {
452 452
                 // Hide "noentry" items
453 453
                 continue;
Please login to merge, or discard this patch.
lib/net/nehmer/static/midcom/interfaces.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
 
70 70
         $config = $this->get_config_for_topic($topic);
71
-        if (   $object->name == 'index'
71
+        if ($object->name == 'index'
72 72
             && !$config->get('autoindex')) {
73 73
             return '';
74 74
         }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/midcom/interfaces.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function resolve_object_link(midcom_db_topic $topic, midcom_core_dbaobject $object)
80 80
     {
81
-        if (   $object instanceof org_openpsa_contacts_group_dba
81
+        if ($object instanceof org_openpsa_contacts_group_dba
82 82
             || $object instanceof midcom_db_group) {
83 83
             return "group/{$object->guid}/";
84 84
         }
85
-        if (   $object instanceof org_openpsa_contacts_person_dba
85
+        if ($object instanceof org_openpsa_contacts_person_dba
86 86
             || $object instanceof midcom_db_person) {
87 87
             return "person/{$object->guid}/";
88 88
         }
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
             // We have a feed URL, but we should check if it is GeoRSS as well
112 112
             $items = net_nemein_rss_fetch::raw_fetch($data['rss_url'])->get_items();
113 113
 
114
-            if (   count($items) > 0
115
-                && (   $items[0]->get_latitude()
114
+            if (count($items) > 0
115
+                && ($items[0]->get_latitude()
116 116
                     || $items[0]->get_longitude())) {
117 117
                 // This is a GeoRSS feed
118 118
                 $data['georss_url'] = $data['rss_url'];
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
         $data = $this->_get_data_from_url($group->homepage);
176 176
 
177 177
         // Use the data we got
178
-        if (   midcom::get()->componentloader->is_installed('org.routamc.positioning')
178
+        if (midcom::get()->componentloader->is_installed('org.routamc.positioning')
179 179
             && array_key_exists('icbm', $data)) {
180 180
             // We know where the group is located
181 181
             $icbm_parts = explode(',', $data['icbm']);
182 182
             if (count($icbm_parts) == 2) {
183 183
                 $latitude = (float) $icbm_parts[0];
184 184
                 $longitude = (float) $icbm_parts[1];
185
-                if (   abs($latitude) < 90
185
+                if (abs($latitude) < 90
186 186
                     && abs($longitude) < 180) {
187 187
                     $location = new org_routamc_positioning_location_dba();
188 188
                     $location->date = time();
Please login to merge, or discard this patch.
lib/net/nemein/tag/tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function _on_creating()
44 44
     {
45
-        return (   $this->validate_tag($this->tag)
45
+        return ($this->validate_tag($this->tag)
46 46
                 && $this->_check_duplicates() == 0);
47 47
     }
48 48
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('net.nemein.tag', 'net.nemein.tag'), sprintf(midcom::get()->i18n->get_string('tag "%s" is not valid. tags may not be numeric', 'net.nemein.tag'), $tag), 'info');
67 67
             return false;
68 68
         }
69
-        if (   strstr($tag, '"')
69
+        if (strstr($tag, '"')
70 70
             || strstr($tag, "'")) {
71 71
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('net.nemein.tag', 'net.nemein.tag'), sprintf(midcom::get()->i18n->get_string('tag "%s" is not valid. tags may not contain quotes', 'net.nemein.tag'), $tag), 'info');
72 72
             return false;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function _on_updating()
79 79
     {
80
-        return (   $this->validate_tag($this->tag)
80
+        return ($this->validate_tag($this->tag)
81 81
                 && $this->_check_duplicates() == 0);
82 82
     }
83 83
 
Please login to merge, or discard this patch.
lib/net/nemein/tag/exec/merge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 <h1>Merge tags</h1>
5 5
 
6 6
 <?php
7
-if (   isset($_POST['from'])
7
+if (isset($_POST['from'])
8 8
     && isset($_POST['to'])) {
9 9
     if (net_nemein_tag_handler::merge_tags($_POST['from'], $_POST['to'])) {
10 10
         echo "<p>Successfully merged tag \"{$_POST['from']}\" to \"{$_POST['to']}\"</p>\n";
Please login to merge, or discard this patch.