Completed
Push — master ( 309357...7ad46f )
by Andreas
18:00
created
lib/midcom/helper/toolbar/node.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,8 @@
 block discarded – undo
88 88
                         $style = midcom_db_style::get_cached($style_id);
89 89
                         $styleeditor_url = midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$style->guid}/";
90 90
                         $enabled = true;
91
-                    } catch (midcom_error $e) {
91
+                    }
92
+                    catch (midcom_error $e) {
92 93
                         $e->log();
93 94
                     }
94 95
                 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         }
38 38
         $buttons = [];
39 39
         $workflow = new midcom\workflow\datamanager;
40
-        if (   $this->topic->can_do('midgard:update')
40
+        if ($this->topic->can_do('midgard:update')
41 41
             && $this->topic->can_do('midcom.admin.folder:topic_management')) {
42 42
             $buttons[] = $workflow->get_button("__ais/folder/edit/", [
43 43
                 MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('edit folder', 'midcom.admin.folder'),
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             ]);
50 50
         }
51 51
 
52
-        if (   $urltopic->can_do('midgard:update')
52
+        if ($urltopic->can_do('midgard:update')
53 53
             && $urltopic->can_do('midcom.admin.folder:topic_management')) {
54 54
             // Allow to move other than root folder
55 55
             if ($urltopic->guid !== midcom::get()->config->get('midcom_root_topic_guid')) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             }
62 62
         }
63 63
 
64
-        if (   $this->topic->can_do('midgard:update')
64
+        if ($this->topic->can_do('midgard:update')
65 65
             && $this->topic->can_do('midcom.admin.folder:topic_management')) {
66 66
             $buttons[] = [
67 67
                 MIDCOM_TOOLBAR_URL => "__ais/folder/order/",
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             ];
79 79
         }
80 80
         $buttons = array_merge($buttons, $this->get_approval_controls($this->topic, false));
81
-        if (   $this->topic->can_do('midcom.admin.folder:template_management')
81
+        if ($this->topic->can_do('midcom.admin.folder:template_management')
82 82
             && midcom::get()->auth->can_user_do('midgard.admin.asgard:manage_objects', null, 'midgard_admin_asgard_plugin')) {
83 83
             $enabled = false;
84 84
             $styleeditor_url = '';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             ];
104 104
         }
105 105
 
106
-        if (   $this->topic->can_do('midgard:create')
106
+        if ($this->topic->can_do('midgard:create')
107 107
             && $this->topic->can_do('midcom.admin.folder:topic_management')) {
108 108
             $buttons[] = $workflow->get_button("__ais/folder/create/", [
109 109
                 MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('create subfolder', 'midcom.admin.folder'),
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 MIDCOM_TOOLBAR_ACCESSKEY => 'f',
112 112
             ]);
113 113
         }
114
-        if (   $urltopic->guid !== midcom::get()->config->get('midcom_root_topic_guid')
114
+        if ($urltopic->guid !== midcom::get()->config->get('midcom_root_topic_guid')
115 115
             && $urltopic->can_do('midgard:delete')
116 116
             && $urltopic->can_do('midcom.admin.folder:topic_management')) {
117 117
             $workflow = new midcom\workflow\delete(['object' => $urltopic, 'recursive' => true]);
Please login to merge, or discard this patch.
lib/midcom/helper/search/handler/search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $node = $nap->get_node($node_id);
55 55
 
56
-        if (   !array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
56
+        if (!array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
57 57
             && $node[MIDCOM_NAV_COMPONENT] != 'midcom.helper.search') {
58 58
             $l10n = $this->_i18n->get_l10n($node[MIDCOM_NAV_COMPONENT]);
59 59
             $this->_request_data['components'][$node[MIDCOM_NAV_COMPONENT]] = $l10n->get($node[MIDCOM_NAV_COMPONENT]);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $this->prepare_query_data();
113 113
         $this->prepare_formdata($_REQUEST['type']);
114 114
 
115
-        if (   count(explode(' ', $data['query'])) == 1
115
+        if (count(explode(' ', $data['query'])) == 1
116 116
             && strpos($data['query'], '*') === false
117 117
             && $this->_config->get('single_term_auto_wilcard')) {
118 118
             //If there is only one search term append * to the query if auto_wildcard is enabled
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
             $this->_request_data['last_document_number'] = $last_document_id + 1;
193 193
             $this->_request_data['shown_documents'] = $last_document_id - $first_document_id + 1;
194 194
             $this->_request_data['results_per_page'] = $results_per_page;
195
-            $this->_request_data['all_results'] =& $result;
195
+            $this->_request_data['all_results'] = & $result;
196 196
             $this->_request_data['result'] = array_slice($result, $first_document_id, $results_per_page);
197 197
 
198 198
             // Register GUIDs for cache engine
199 199
             foreach ($this->_request_data['result'] as $doc) {
200
-                if (   !isset($doc->source)
200
+                if (!isset($doc->source)
201 201
                     || !mgd_is_guid($doc->source)) {
202 202
                     // Non-Midgard results don't need to go through cache registration
203 203
                     continue;
Please login to merge, or discard this patch.
lib/midcom/baseclasses/components/configuration.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,8 @@
 block discarded – undo
143 143
 
144 144
         try {
145 145
             $data = file_get_contents($filename);
146
-        } catch (Exception $e) {
146
+        }
147
+        catch (Exception $e) {
147 148
             return false;
148 149
         }
149 150
 
Please login to merge, or discard this patch.
lib/midcom/baseclasses/components/handler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,12 +100,12 @@
 block discarded – undo
100 100
     {
101 101
         $this->_master = $master;
102 102
 
103
-        $this->_request_data =& $master->_request_data;
103
+        $this->_request_data = & $master->_request_data;
104 104
         $this->_topic = $master->_topic;
105 105
 
106 106
         // Load component specific stuff, special treatment if the handler has
107 107
         // a component different than the master handler set.
108
-        if (   $this->_component
108
+        if ($this->_component
109 109
             && $this->_component != $master->_component) {
110 110
             $this->_config->store_from_object($this->_topic, $this->_component, true);
111 111
         } else {
Please login to merge, or discard this patch.
lib/midcom/style/midcom_helper_datamanager2_unlock.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
 try {
5 5
     $person = new midcom_db_person($metadata->locker);
6 6
     $name = $person->name;
7
-} catch (midcom_error $e) {
7
+}
8
+catch (midcom_error $e) {
8 9
     $name = $this->data['handler']->_l10n_midcom->get('unknown user');
9 10
     $e->log();
10 11
 }
Please login to merge, or discard this patch.
lib/midcom/exec/touch_attachments.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,8 @@
 block discarded – undo
16 16
 foreach ($atts as $att) {
17 17
     try {
18 18
         $att->file_to_cache();
19
-    } catch (midcom_error $e) {
19
+    }
20
+    catch (midcom_error $e) {
20 21
         echo 'Error: ' . $e->getMessage() . "\n";
21 22
     }
22 23
 }
Please login to merge, or discard this patch.
lib/midcom/exec/reindex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
 $http_client = new org_openpsa_httplib();
57 57
 $http_client->set_param('timeout', 300);
58
-if (   !empty($_SERVER['PHP_AUTH_USER'])
58
+if (!empty($_SERVER['PHP_AUTH_USER'])
59 59
     && !empty($_SERVER['PHP_AUTH_PW'])) {
60 60
     $http_client->basicauth['user'] = $_SERVER['PHP_AUTH_USER'];
61 61
     $http_client->basicauth['password'] = $_SERVER['PHP_AUTH_PW'];
Please login to merge, or discard this patch.
lib/midcom/services/toolbars.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
             return;
87 87
         }
88 88
         $initialized = true;
89
-        if (   !midcom::get()->auth->user
89
+        if (!midcom::get()->auth->user
90 90
             || !midcom::get()->config->get('toolbars_enable_centralized')
91 91
             || !midcom::get()->auth->can_user_do('midcom:centralized_toolbar', null, $this)) {
92 92
             return;
Please login to merge, or discard this patch.
lib/midcom/services/cron.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,8 @@
 block discarded – undo
153 153
                         $job['component'] = $component;
154 154
                         $this->_jobs[] = $job;
155 155
                     }
156
-                } catch (midcom_error $e) {
156
+                }
157
+                catch (midcom_error $e) {
157 158
                     $e->log(MIDCOM_LOG_ERROR);
158 159
                     debug_print_r('Got this job declaration:', $job);
159 160
                     echo "ERROR: Failed to register a job for {$component}: " . $e->getMessage() . "\n";
Please login to merge, or discard this patch.