@@ -70,13 +70,13 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | } elseif (!$this->form->isSubmitted()) { |
| 72 | 72 | $this->form->handleRequest($request); |
| 73 | - if ( $this->form->isSubmitted() |
|
| 73 | + if ($this->form->isSubmitted() |
|
| 74 | 74 | && $button = $this->form->getClickedButton()) { |
| 75 | 75 | $operation = $button->getConfig()->getOption('operation'); |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if ( in_array($operation, [self::SAVE, self::NEXT]) |
|
| 79 | + if (in_array($operation, [self::SAVE, self::NEXT]) |
|
| 80 | 80 | && !$this->form->isValid()) { |
| 81 | 81 | $operation = self::EDIT; |
| 82 | 82 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if ($storage->get_last_operation() === self::SAVE) { |
| 160 | 160 | // Get GUIDs and such for new-created dependent objects |
| 161 | 161 | $this->dm->set_storage($storage->get_value(), $this->dm->get_schema()->get_name()); |
| 162 | - } elseif ( !$this->form->isValid() |
|
| 162 | + } elseif (!$this->form->isValid() |
|
| 163 | 163 | && $storage->move_uploaded_files() > 0) { |
| 164 | 164 | $form = $this->dm->get_form($this->form->getName(), true); |
| 165 | 165 | $this->copy_errors($this->form, $form); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | private function process_attachment() |
| 72 | 72 | { |
| 73 | - if ( !isset($this->attachment->metadata) |
|
| 73 | + if (!isset($this->attachment->metadata) |
|
| 74 | 74 | || !is_object($this->attachment->metadata)) { |
| 75 | 75 | return; |
| 76 | 76 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $published = sprintf($data['l10n']->get('posted on %s.'), "<abbr title=\"" . strftime('%Y-%m-%dT%H:%M:%S%z', $data['article']->metadata->published) . "\">" . $published . "</abbr>"); |
| 13 | 13 | |
| 14 | 14 | if (array_key_exists('ajax_comments_enable', $data)) { |
| 15 | - $published .= ' <a href="#switch_comments" onClick="showAjaxComments(this, \''.$data['article']->guid.'\'); return false;">' |
|
| 15 | + $published .= ' <a href="#switch_comments" onClick="showAjaxComments(this, \'' . $data['article']->guid . '\'); return false;">' |
|
| 16 | 16 | . sprintf($data['l10n']->get('%s comments'), net_nehmer_comments_comment::count_by_objectguid($data['article']->guid)) |
| 17 | 17 | . "</a>."; |
| 18 | 18 | } elseif (array_key_exists('comments_enable', $data)) { |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | &(published:h); |
| 29 | 29 | <?php |
| 30 | 30 | if ($data['linked']) { |
| 31 | - echo $data['l10n']->get('to') ." <a href=\"{$data['node'][MIDCOM_NAV_ABSOLUTEURL]}\">{$data['node'][MIDCOM_NAV_NAME]}</a>\n"; |
|
| 31 | + echo $data['l10n']->get('to') . " <a href=\"{$data['node'][MIDCOM_NAV_ABSOLUTEURL]}\">{$data['node'][MIDCOM_NAV_NAME]}</a>\n"; |
|
| 32 | 32 | } |
| 33 | 33 | ?> |
| 34 | 34 | </p> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $item->title = $data['article']->title; |
| 19 | 19 | $arg = $data['article']->name ?: $data['article']->guid; |
| 20 | 20 | |
| 21 | -if ( $data['config']->get('link_to_external_url') |
|
| 21 | +if ($data['config']->get('link_to_external_url') |
|
| 22 | 22 | && !empty($data['article']->url)) { |
| 23 | 23 | $item->link = $data['article']->url; |
| 24 | 24 | } else { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $item->description .= '<div class="abstract">' . $view['abstract'] . '</div>'; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -if ( array_key_exists('image', $view) |
|
| 40 | +if (array_key_exists('image', $view) |
|
| 41 | 41 | && $data['config']->get('rss_use_image')) { |
| 42 | 42 | $item->description .= "\n<div class=\"image\">" . $view['image'] . '</div>'; |
| 43 | 43 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function _on_initialize() |
| 36 | 36 | { |
| 37 | - $this->_request_data['page'] =& $this->_page; |
|
| 37 | + $this->_request_data['page'] = & $this->_page; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -216,9 +216,9 @@ discard block |
||
| 216 | 216 | $toc .= "\n<ol class=\"midcom_helper_toc_formatter level_{$current_list_level}\">\n"; |
| 217 | 217 | foreach ($headings[4] as $key => $heading) { |
| 218 | 218 | $anchor = 'heading-' . md5($heading); |
| 219 | - $tag_level =& $headings[3][$key]; |
|
| 220 | - $heading_code =& $headings[0][$key]; |
|
| 221 | - $heading_tag =& $headings[2][$key]; |
|
| 219 | + $tag_level = & $headings[3][$key]; |
|
| 220 | + $heading_code = & $headings[0][$key]; |
|
| 221 | + $heading_tag = & $headings[2][$key]; |
|
| 222 | 222 | $heading_new_code = "<a id='{$anchor}'></a>{$heading_code}"; |
| 223 | 223 | $content = str_replace($heading_code, $heading_new_code, $content); |
| 224 | 224 | if ($current_tag_level === false) { |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | |
| 102 | 102 | $this->_controller = $this->load_controller(); |
| 103 | 103 | |
| 104 | - if ( $data['enable_versioning'] |
|
| 104 | + if ($data['enable_versioning'] |
|
| 105 | 105 | && $request->request->count() > 0) { |
| 106 | 106 | $this->_backup_attachment(); |
| 107 | 107 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | //Check for bounce detector usage |
| 35 | 35 | if (!empty($config['bounce_detector_address'])) { |
| 36 | 36 | //Force bouncer as backend if default specified |
| 37 | - if ( empty($config['mail_send_backend']) |
|
| 37 | + if (empty($config['mail_send_backend']) |
|
| 38 | 38 | || $config['mail_send_backend'] == 'try_default') { |
| 39 | 39 | $config['mail_send_backend'] = 'bouncer'; |
| 40 | 40 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $address = addslashes($address); |
| 180 | 180 | return preg_replace_callback( |
| 181 | 181 | '/href="(http:\/\/.*?)"/i', |
| 182 | - function ($match) use ($address) { |
|
| 182 | + function($match) use ($address) { |
|
| 183 | 183 | return 'href="' . str_replace("URL", rawurlencode($match[1]), $address) . '"'; |
| 184 | 184 | }, |
| 185 | 185 | $html); |
@@ -159,16 +159,16 @@ |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | - * Inserts a link detector to the given HTML source. All outgoing |
|
| 163 | - * HTTP links in the source HTML are replaced with the given |
|
| 164 | - * link detector address so that the token "URL" is replaced with |
|
| 165 | - * encoded form of the original link. It is expected that the link detector |
|
| 166 | - * address points to a script that records the passed link and |
|
| 167 | - * forwards the client to the real link target. |
|
| 168 | - * |
|
| 169 | - * @param string $html the HTML source |
|
| 170 | - * @param string $address the link detector address |
|
| 171 | - */ |
|
| 162 | + * Inserts a link detector to the given HTML source. All outgoing |
|
| 163 | + * HTTP links in the source HTML are replaced with the given |
|
| 164 | + * link detector address so that the token "URL" is replaced with |
|
| 165 | + * encoded form of the original link. It is expected that the link detector |
|
| 166 | + * address points to a script that records the passed link and |
|
| 167 | + * forwards the client to the real link target. |
|
| 168 | + * |
|
| 169 | + * @param string $html the HTML source |
|
| 170 | + * @param string $address the link detector address |
|
| 171 | + */ |
|
| 172 | 172 | private function _insert_link_detector(string $html, string $address) : string |
| 173 | 173 | { |
| 174 | 174 | $address = addslashes($address); |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | $help = new midcom_admin_help_help(); |
| 107 | - $this->_request_data['help'] = $help->get_help_contents('asgard_'.$this->type, $help_component); |
|
| 107 | + $this->_request_data['help'] = $help->get_help_contents('asgard_' . $this->type, $help_component); |
|
| 108 | 108 | $this->_request_data['component'] = $component; |
| 109 | 109 | } |
| 110 | 110 | |
@@ -281,7 +281,7 @@ |
||
| 281 | 281 | return $data; |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | - $preg='/s:([0-9]+):"(.*?)";/ms'; |
|
| 284 | + $preg = '/s:([0-9]+):"(.*?)";/ms'; |
|
| 285 | 285 | preg_match_all($preg, $data, $matches); |
| 286 | 286 | $cache = []; |
| 287 | 287 | |