Completed
Pull Request — master (#200)
by
unknown
18:52
created
lib/org/openpsa/core/siteconfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         }
175 175
         if (!midcom::get()->auth->admin) {
176 176
             $user_id = midcom::get()->auth->acl->get_user_id();
177
-            if (   !$this->data[$type . '_guid']
177
+            if (!$this->data[$type . '_guid']
178 178
                 || !midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->data[$type . '_guid'], midcom_db_topic::class, $user_id)) {
179 179
                 return null;
180 180
             }
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/ui.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
             $config = array_merge($defaults, $config);
40 40
 
41 41
             $node_url = $siteconfig->get_node_full_url($component);
42
-            if (   $node_url
43
-                && (   !$user_id
42
+            if ($node_url
43
+                && (!$user_id
44 44
                     || midcom::get()->auth->acl->can_do_byguid('midgard:read', $siteconfig->get_node_guid($component), midcom_db_topic::class, $user_id))) {
45 45
                 $providers[] = [
46 46
                     'placeholder' => midcom::get()->i18n->get_string('search title', $component),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         echo '<div id="tabs">';
116 116
         echo "\n<ul>\n";
117 117
         foreach ($tabdata as $key => $tab) {
118
-            echo "<li><a id='key_" . $key ."' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
118
+            echo "<li><a id='key_" . $key . "' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
119 119
         }
120 120
         echo "\n</ul>\n";
121 121
         echo "</div>\n";
Please login to merge, or discard this patch.
lib/midcom/helper/nav/node.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function is_readable_by($user_id)
32 32
     {
33
-        return (   !$user_id
33
+        return (!$user_id
34 34
                 || midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->guid, midcom_db_topic::class, $user_id));
35 35
     }
36 36
 
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         }
147 147
         $data['default_mode'] = 'view';
148 148
 
149
-        if (   !self::get_preference('edit_mode')
149
+        if (!self::get_preference('edit_mode')
150 150
             && midcom_baseclasses_components_configuration::get('midgard.admin.asgard', 'config')->get('edit_mode') == 1) {
151 151
             $data['default_mode'] = 'edit';
152 152
         } elseif (self::get_preference('edit_mode') == 1) {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $parent = $object->get_parent();
187 187
 
188
-        if (   is_a($object, midcom_db_parameter::class)
188
+        if (is_a($object, midcom_db_parameter::class)
189 189
             && !empty($parent->guid)) {
190 190
             // Add "parameters" list to breadcrumb if we're in a param
191 191
             $breadcrumb[] = [
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         }
196 196
 
197 197
         $i = 0;
198
-        while (   !empty($parent->guid)
198
+        while (!empty($parent->guid)
199 199
                && $i < 10) {
200 200
             $i++;
201 201
             $parent_reflector = midcom_helper_reflector::get($parent);
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/toolbar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             ];
145 145
         }
146 146
 
147
-        if (   midcom::get()->config->get('midcom_services_rcs_enable')
147
+        if (midcom::get()->config->get('midcom_services_rcs_enable')
148 148
             && $object->can_do('midgard:update')
149 149
             && $object->_use_rcs) {
150 150
             $buttons[] = [
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     private function get_toolbar_update_items($object)
206 206
     {
207 207
         $buttons = [];
208
-        if (   is_a($object, midcom_db_topic::class)
208
+        if (is_a($object, midcom_db_topic::class)
209 209
             && $object->component
210 210
             && $object->can_do('midcom:component_config')) {
211 211
             $buttons[] = [
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             MIDCOM_TOOLBAR_ENABLED => $object->can_do('midgard:privileges'),
244 244
         ];
245 245
 
246
-        if (   midcom::get()->componentloader->is_installed('midcom.helper.replicator')
246
+        if (midcom::get()->componentloader->is_installed('midcom.helper.replicator')
247 247
             && midcom::get()->auth->admin) {
248 248
             $buttons[] = [
249 249
                 MIDCOM_TOOLBAR_URL => "__mfa/asgard_midcom.helper.replicator/object/{$object->guid}/",
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/midcom/interfaces.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function _on_watched_dba_delete(midcom_core_dbaobject $object)
18 18
     {
19 19
         $qb = org_openpsa_directmarketing_campaign_member_dba::new_query_builder();
20
-        if (   $object instanceof midcom_db_person
20
+        if ($object instanceof midcom_db_person
21 21
             || $object instanceof org_openpsa_contacts_person_dba) {
22 22
             $qb->add_constraint('person', '=', $object->id);
23 23
         } elseif ($object instanceof org_openpsa_directmarketing_campaign_dba) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function background_send_message(array $args, midcom_baseclasses_components_cron_handler $handler)
44 44
     {
45
-        if (   !isset($args['url_base'])
45
+        if (!isset($args['url_base'])
46 46
             || !isset($args['batch'])) {
47 47
             $handler->print_error('url_base or batch number not set, aborting');
48 48
             return false;
Please login to merge, or discard this patch.
lib/org/openpsa/products/viewer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
         $object = $dm->get_storage()->get_value();
33 33
 
34 34
         $document = $indexer->new_document($dm);
35
-        if (   $config->get('enable_scheduling')
35
+        if ($config->get('enable_scheduling')
36 36
             && is_a($object, org_openpsa_products_product_dba::class)) {
37 37
             // Check start/end for products
38
-            if (   $object->start > time()
39
-                || (   $object->end != 0
38
+            if ($object->start > time()
39
+                || ($object->end != 0
40 40
                     && $object->end < time())) {
41 41
                 // Not in market, remove from index
42 42
                 $indexer->delete($document->RI);
Please login to merge, or discard this patch.
lib/midcom/services/permalinks/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
         if ($object instanceof midcom_db_attachment) {
94 94
             // Faster linking to attachments
95 95
             $parent = $object->get_parent();
96
-            if (   is_a($parent, midcom_db_topic::class)
96
+            if (is_a($parent, midcom_db_topic::class)
97 97
                 && $nav->is_node_in_tree($parent->id, $nav->get_root_node())) {
98 98
                 $napobj = $nav->get_node($parent->id);
99 99
                 return $napobj[MIDCOM_NAV_FULLURL] . $object->name;
Please login to merge, or discard this patch.
lib/midcom/services/cache/module/nap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             // Get parent from DB and compare to catch moves
78 78
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
79 79
                 $parent_entry_from_object = $this->get_guid($parent->guid);
80
-                if (    $parent_entry_from_object
80
+                if ($parent_entry_from_object
81 81
                      && $parent_entry_from_object[MIDCOM_NAV_ID] != $cached_node_id) {
82 82
                     $this->_cache->delete($this->_prefix . '-' . $parent_entry_from_object[MIDCOM_NAV_ID] . '-leaves');
83 83
                 }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $parent_id = $napobject[MIDCOM_NAV_NODEID];
93 93
             $parent_entry = $this->get_node($parent_id);
94 94
 
95
-            if (   $parent_entry
95
+            if ($parent_entry
96 96
                 && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) {
97 97
                 unset($parent_entry[MIDCOM_NAV_SUBNODES]);
98 98
                 $this->put_node($parent_id, $parent_entry);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
103 103
                 $parent_entry_from_object = $this->get_guid($parent->guid);
104 104
 
105
-                if (    !empty($parent_entry_from_object[MIDCOM_NAV_ID])
105
+                if (!empty($parent_entry_from_object[MIDCOM_NAV_ID])
106 106
                      && !empty($parent_entry[MIDCOM_NAV_ID])
107 107
                      && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) {
108 108
                     unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $nav = new midcom_helper_nav;
129 129
             if ($object instanceof midcom_db_topic) {
130 130
                 $napobject = $nav->get_node($object->id);
131
-            } elseif (   ($node = $nav->find_closest_topic($object))
131
+            } elseif (($node = $nav->find_closest_topic($object))
132 132
                       && $nodeobject = $nav->get_node($node->id)) {
133 133
                 $napobject = $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id);
134 134
             }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         }
154 154
         $lang_id = midcom::get()->i18n->get_current_language();
155 155
         $result = $this->_cache->fetch("{$this->_prefix}-{$key}");
156
-        if (   !is_array($result)
156
+        if (!is_array($result)
157 157
             || !isset($result[$lang_id])) {
158 158
             return false;
159 159
         }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         $lang_id = midcom::get()->i18n->get_current_language();
179 179
         $result = $this->_cache->fetch("{$this->_prefix}-{$key}");
180
-        if (   !is_array($result)
180
+        if (!is_array($result)
181 181
             || !isset($result[$lang_id])) {
182 182
             return false;
183 183
         }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
         $lang_id = midcom::get()->i18n->get_current_language();
246 246
         $result = $this->_cache->fetch("{$this->_prefix}-{$guid}");
247
-        if (   !is_array($result)
247
+        if (!is_array($result)
248 248
             || !isset($result[$lang_id])) {
249 249
             return false;
250 250
         }
Please login to merge, or discard this patch.