@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | //Substyle handling |
61 | - if ( !empty($data['message_array']['substyle']) |
|
61 | + if (!empty($data['message_array']['substyle']) |
|
62 | 62 | && !preg_match('/^builtin:/', $data['message_array']['substyle'])) { |
63 | 63 | debug_add("Appending substyle {$data['message_array']['substyle']}"); |
64 | 64 | midcom::get()->style->append_substyle($data['message_array']['substyle']); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | private function _real_show_compose($handler_id, array &$data) |
118 | 118 | { |
119 | 119 | $prefix = ''; |
120 | - if ( !empty($data['message_array']['substyle']) |
|
120 | + if (!empty($data['message_array']['substyle']) |
|
121 | 121 | && preg_match('/^builtin:(.*)/', $data['message_array']['substyle'], $matches_style)) { |
122 | 122 | $prefix = $matches_style[1] . '-'; |
123 | 123 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | if (!$this->timestamp) { |
25 | 25 | $this->timestamp = time(); |
26 | 26 | } |
27 | - if ( !$this->referrer |
|
27 | + if (!$this->referrer |
|
28 | 28 | && !empty($_SERVER['HTTP_REFERER'])) { |
29 | 29 | $this->referrer = $_SERVER['HTTP_REFERER']; |
30 | 30 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | echo " <th>{$type}</th>\n"; |
35 | 35 | echo " <td style=\"text-align: right;\">" . number_format($count) . "</td>\n"; |
36 | 36 | if (isset($cleanups_kept[$type])) { |
37 | - echo " <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) ."</td>\n"; |
|
37 | + echo " <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) . "</td>\n"; |
|
38 | 38 | } |
39 | 39 | echo " </tr>\n"; |
40 | 40 | } |
@@ -48,7 +48,8 @@ |
||
48 | 48 | |
49 | 49 | try { |
50 | 50 | $interface = \midcom::get()->componentloader->get_interface_class($this->component); |
51 | - } catch (\midcom_error $e) { |
|
51 | + } |
|
52 | + catch (\midcom_error $e) { |
|
52 | 53 | debug_add("Failed to load the component {$this->component}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
53 | 54 | return; |
54 | 55 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $button_config[MIDCOM_TOOLBAR_URL] = $url; |
74 | 74 | //The constants are numeric, so array_merge won't work... |
75 | 75 | foreach ($options as $key => $value) { |
76 | - if ( is_array($value) |
|
76 | + if (is_array($value) |
|
77 | 77 | && !empty($button_config[$key])) { |
78 | 78 | $value = array_merge($button_config[$key], $value); |
79 | 79 | } |
@@ -65,8 +65,8 @@ |
||
65 | 65 | private function prepare_field(array $config) |
66 | 66 | { |
67 | 67 | if ( empty($config['storage']['location']) |
68 | - // This line is needed because a parameter default is set by the schema parser and then ignored |
|
69 | - // by the type. The things we do for backwards compatibility... |
|
68 | + // This line is needed because a parameter default is set by the schema parser and then ignored |
|
69 | + // by the type. The things we do for backwards compatibility... |
|
70 | 70 | || $config['storage']['location'] === 'parameter') { |
71 | 71 | if (class_exists('midcom\datamanager\storage\\' . $config['type'])) { |
72 | 72 | $classname = 'midcom\datamanager\storage\\' . $config['type']; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | $config['name'] = $name; |
34 | 34 | $field = $this->prepare_field($config); |
35 | - if ( isset($config['default']) |
|
35 | + if (isset($config['default']) |
|
36 | 36 | && (!$this->object->id || $field instanceof transientnode)) { |
37 | 37 | $field->set_value($config['default']); |
38 | 38 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | private function prepare_field(array $config) |
66 | 66 | { |
67 | - if ( empty($config['storage']['location']) |
|
67 | + if (empty($config['storage']['location']) |
|
68 | 68 | // This line is needed because a parameter default is set by the schema parser and then ignored |
69 | 69 | // by the type. The things we do for backwards compatibility... |
70 | 70 | || $config['storage']['location'] === 'parameter') { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function validate($value, Constraint $constraint) |
14 | 14 | { |
15 | - if ( empty($value['archival']) |
|
15 | + if (empty($value['archival']) |
|
16 | 16 | && empty($value['file'])) { |
17 | 17 | $this->context->buildViolation($constraint->message) |
18 | 18 | ->addViolation(); |
@@ -218,7 +218,8 @@ |
||
218 | 218 | if ($this->_config->get('comments_topic')) { |
219 | 219 | try { |
220 | 220 | $comments_topic = new midcom_db_topic($this->_config->get('comments_topic')); |
221 | - } catch (midcom_error $e) { |
|
221 | + } |
|
222 | + catch (midcom_error $e) { |
|
222 | 223 | return false; |
223 | 224 | } |
224 | 225 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | ]); |
45 | 45 | } |
46 | 46 | |
47 | - if ( $this->_article->topic === $this->_topic->id |
|
47 | + if ($this->_article->topic === $this->_topic->id |
|
48 | 48 | && $this->_article->can_do('midgard:delete')) { |
49 | 49 | $delete = $this->get_workflow('delete', ['object' => $this->_article]); |
50 | 50 | $buttons[] = $delete->get_button("delete/{$this->_article->guid}/"); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | if ($this->_config->get('comments_enable')) { |
97 | 97 | if ($comments_node = $this->_seek_comments()) { |
98 | 98 | $this->_request_data['comments_url'] = $comments_node[MIDCOM_NAV_RELATIVEURL] . "comment/{$this->_article->guid}"; |
99 | - if ( $this->_topic->can_do('midgard:update') |
|
99 | + if ($this->_topic->can_do('midgard:update') |
|
100 | 100 | && $this->_topic->can_do('net.nehmer.comments:moderation')) { |
101 | 101 | net_nehmer_comments_viewer::add_head_elements(); |
102 | 102 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | midcom::get()->auth->require_admin_user(); |
3 | 3 | |
4 | -if ( empty($_POST['to']) |
|
4 | +if (empty($_POST['to']) |
|
5 | 5 | || empty($_POST['from'])) { |
6 | 6 | ?> |
7 | 7 | <h2>Send test email</h2> |