@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get_field_value(array $data) |
57 | 57 | { |
58 | 58 | $default = is_array($data['field_value']) ? $data['field_value'] : explode("\n", $data['field_value']); |
59 | - $value = $this->request->variable($name, array(0 => '')); |
|
59 | + $value = $this->request->variable($name, array(0 => '')); |
|
60 | 60 | return $value ?: $default; |
61 | 61 | } |
62 | 62 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function make_box($color) |
103 | 103 | { |
104 | - $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color; |
|
105 | - return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : ''; |
|
104 | + $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color; |
|
105 | + return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : ''; |
|
106 | 106 | } |
107 | 107 | } |
@@ -58,21 +58,21 @@ |
||
58 | 58 | '@blitze_content/assets/fields/display.min.js', |
59 | 59 | ), |
60 | 60 | 'css' => array( |
61 | - '@blitze_content/assets/fields/share/' . $props['theme'] . '.min.css', |
|
61 | + '@blitze_content/assets/fields/share/'.$props['theme'].'.min.css', |
|
62 | 62 | ) |
63 | 63 | )); |
64 | 64 | |
65 | 65 | $classes = ['social-share', $props['corners'], $props['placement']]; |
66 | 66 | $attributes = [ |
67 | - 'class="' . join(' ', array_filter($classes)) . '"', |
|
68 | - 'data-show-label="' . $props['show_label'] . '"', |
|
69 | - 'data-show-count="' . $props['show_count'] . '"', |
|
70 | - 'data-share-in="' . $props['sharein'] . '"', |
|
71 | - 'data-shares="' . join(',', $props['defaults']) . '"', |
|
72 | - 'style="font-size: ' . $props['size'] . 'px"', |
|
67 | + 'class="'.join(' ', array_filter($classes)).'"', |
|
68 | + 'data-show-label="'.$props['show_label'].'"', |
|
69 | + 'data-show-count="'.$props['show_count'].'"', |
|
70 | + 'data-share-in="'.$props['sharein'].'"', |
|
71 | + 'data-shares="'.join(',', $props['defaults']).'"', |
|
72 | + 'style="font-size: '.$props['size'].'px"', |
|
73 | 73 | ]; |
74 | 74 | |
75 | - return '<div ' . join(' ', $attributes) . '></div>'; |
|
75 | + return '<div '.join(' ', $attributes).'></div>'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->util->add_assets(array( |
85 | 85 | 'js' => array( |
86 | 86 | 100 => '@blitze_content/assets/fields/form.min.js', |
87 | - 101 => '//maps.googleapis.com/maps/api/js?key=' . $this->google_api_key . '&libraries=places&callback=initMap&language=' . $this->language->get_used_language() . '" async defer charset="UTF-8', |
|
87 | + 101 => '//maps.googleapis.com/maps/api/js?key='.$this->google_api_key.'&libraries=places&callback=initMap&language='.$this->language->get_used_language().'" async defer charset="UTF-8', |
|
88 | 88 | ) |
89 | 89 | )); |
90 | 90 | $data['show_input'] = true; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | $data['field_value'] = $this->get_field_value($data); |
106 | - $callable = 'display_' . $data['field_props']['disp_type']; |
|
106 | + $callable = 'display_'.$data['field_props']['disp_type']; |
|
107 | 107 | |
108 | 108 | return $this->$callable($data); |
109 | 109 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | protected function display_address(array $data) |
116 | 116 | { |
117 | - return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']) . $data['field_value']['address']; |
|
117 | + return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']).$data['field_value']['address']; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | */ |
124 | 124 | protected function display_coordinates(array $data) |
125 | 125 | { |
126 | - return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']) . |
|
127 | - $data['field_value']['latitude'] . ', ' . $data['field_value']['longitude']; |
|
126 | + return $this->get_location_title($data['field_value']['place'], $data['field_value']['address']). |
|
127 | + $data['field_value']['latitude'].', '.$data['field_value']['longitude']; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | $this->util->add_assets(array( |
140 | 140 | 'js' => array( |
141 | - '//maps.googleapis.com/maps/api/js?key=' . $this->google_api_key . '&callback=initMap&language=' . $this->language->get_used_language() . '" async defer charset="UTF-8', |
|
141 | + '//maps.googleapis.com/maps/api/js?key='.$this->google_api_key.'&callback=initMap&language='.$this->language->get_used_language().'" async defer charset="UTF-8', |
|
142 | 142 | '@blitze_content/assets/fields/display.min.js', |
143 | 143 | ) |
144 | 144 | )); |
@@ -157,18 +157,18 @@ discard block |
||
157 | 157 | $info = $data['field_value']; |
158 | 158 | $settings = $data['field_props']; |
159 | 159 | $map_types = $settings['options'] ?: ['roadmap']; |
160 | - $coordinates = $info['latitude'] . ',' . $info['longitude']; |
|
160 | + $coordinates = $info['latitude'].','.$info['longitude']; |
|
161 | 161 | |
162 | 162 | $params = array( |
163 | 163 | 'center' => $coordinates, |
164 | 164 | 'zoom' => $settings['map_zoom'] ?: $info['zoom'], |
165 | - 'size' => $settings['map_width'] . 'x' . $settings['map_height'], |
|
165 | + 'size' => $settings['map_width'].'x'.$settings['map_height'], |
|
166 | 166 | 'maptype' => $info['map_type'] ?: $map_types[0], |
167 | 167 | 'markers' => $coordinates, |
168 | 168 | 'key' => $this->google_api_key, |
169 | 169 | ); |
170 | 170 | |
171 | - return '<img src="https://maps.googleapis.com/maps/api/staticmap?' . http_build_query($params) . '" alt="' . $info['address'] . '" title="' . $info['place'] . '" />'; |
|
171 | + return '<img src="https://maps.googleapis.com/maps/api/staticmap?'.http_build_query($params).'" alt="'.$info['address'].'" title="'.$info['place'].'" />'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -178,6 +178,6 @@ discard block |
||
178 | 178 | */ |
179 | 179 | protected function get_location_title($place, $address) |
180 | 180 | { |
181 | - return (strpos($address, $place) === false) ? '<strong>' . $place . '</strong><br />' : ''; |
|
181 | + return (strpos($address, $place) === false) ? '<strong>'.$place.'</strong><br />' : ''; |
|
182 | 182 | } |
183 | 183 | } |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | { |
95 | 95 | $toc_pattern = '(<h4>(.*?)</h4>)?'; |
96 | 96 | $pages_pattern = '<p><!-- pagebreak --></p>'; |
97 | - $split_pattern = $pages_pattern . (($view_mode !== 'detail') ? $toc_pattern : ''); |
|
97 | + $split_pattern = $pages_pattern.(($view_mode !== 'detail') ? $toc_pattern : ''); |
|
98 | 98 | |
99 | - $pages = array_filter(preg_split('#' . $split_pattern . '#s', $data['field_value'])); |
|
99 | + $pages = array_filter(preg_split('#'.$split_pattern.'#s', $data['field_value'])); |
|
100 | 100 | |
101 | 101 | if ($view_mode !== 'detail') |
102 | 102 | { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | // get page titles to generate TOC |
107 | - preg_match_all('#' . $pages_pattern . $toc_pattern . '#s', $data['field_value'], $matches); |
|
107 | + preg_match_all('#'.$pages_pattern.$toc_pattern.'#s', $data['field_value'], $matches); |
|
108 | 108 | |
109 | 109 | return $this->get_detail_value($pages, $matches[2], $data); |
110 | 110 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $asset_path = $this->util->get_web_path(); |
120 | 120 | $this->util->add_assets(array( |
121 | 121 | 'js' => array( |
122 | - $asset_path . 'assets/javascript/editor.js', |
|
122 | + $asset_path.'assets/javascript/editor.js', |
|
123 | 123 | '@blitze_content/assets/fields/textarea.min.js' |
124 | 124 | ) |
125 | 125 | )); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $this->template->assign_block_vars('toc', array( |
228 | 228 | 'TITLE' => ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'), |
229 | 229 | 'S_PAGE' => ($page === $start), |
230 | - 'U_VIEW' => append_sid($topic_url, ($page) ? 'page=' . $page : false), |
|
230 | + 'U_VIEW' => append_sid($topic_url, ($page) ? 'page='.$page : false), |
|
231 | 231 | )); |
232 | 232 | } |
233 | 233 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // Assigning custom bbcodes |
280 | 280 | if (!function_exists('display_custom_bbcodes')) |
281 | 281 | { |
282 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
282 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | display_custom_bbcodes(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $value = $this->request->variable($data['field_name'], $data['field_value']); |
53 | 53 | $value = $this->get_image_src($value); |
54 | 54 | |
55 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
55 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->set_filemanager($data); |
79 | 79 | $this->ptemplate->assign_vars($data); |
80 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
80 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
81 | 81 | |
82 | 82 | $data['field_value'] = $bbcode_value; |
83 | 83 | |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | */ |
137 | 137 | private function get_image_html($image, $mode, array $field_props) |
138 | 138 | { |
139 | - $image = $image ?: '<img src="' . $field_props['default'] . '" class="postimage" alt="Image" />'; |
|
139 | + $image = $image ?: '<img src="'.$field_props['default'].'" class="postimage" alt="Image" />'; |
|
140 | 140 | |
141 | - $html = '<figure class="img-ui">' . $image . '</figure>'; |
|
141 | + $html = '<figure class="img-ui">'.$image.'</figure>'; |
|
142 | 142 | if ($mode !== 'block') |
143 | 143 | { |
144 | - $view_props = array_fill_keys(array($mode . '_size', $mode . '_align'), ''); |
|
144 | + $view_props = array_fill_keys(array($mode.'_size', $mode.'_align'), ''); |
|
145 | 145 | $image_props = array_filter(array_intersect_key($field_props, $view_props)); |
146 | - $html = '<div class="' . join(' ', $image_props) . '">' . $html . '</div>'; |
|
146 | + $html = '<div class="'.join(' ', $image_props).'">'.$html.'</div>'; |
|
147 | 147 | } |
148 | 148 | return $html; |
149 | 149 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | $data['filemanager_path'] = append_sid("{$this->phpbb_root_path}ResponsiveFilemanager/filemanager/dialog.$this->php_ext", array( |
160 | 160 | 'type' => 1, |
161 | - 'field_id' => 'smc-' . $data['field_name'], |
|
161 | + 'field_id' => 'smc-'.$data['field_name'], |
|
162 | 162 | 'akey' => $this->filemanager->get_access_key(), |
163 | 163 | )); |
164 | 164 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | foreach ($posts_data as $topic_id => $posts) |
136 | 136 | { |
137 | - $post_data = array_shift($posts); |
|
137 | + $post_data = array_shift($posts); |
|
138 | 138 | $topic_data = $topics_data[$topic_id]; |
139 | 139 | $topic_data = array_merge( |
140 | 140 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | $this->pagination->generate_template_pagination( |
249 | 249 | array( |
250 | 250 | 'routes' => array( |
251 | - 'blitze_content_' . $route_type, |
|
252 | - 'blitze_content_' . $route_type . '_page', |
|
251 | + 'blitze_content_'.$route_type, |
|
252 | + 'blitze_content_'.$route_type.'_page', |
|
253 | 253 | ), |
254 | 254 | 'params' => $params, |
255 | 255 | ), |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | ->fetch_forum($topic_data['forum_id']) |
341 | 341 | ->fetch_topic_poster($topic_data['topic_poster']) |
342 | 342 | ->fetch_custom(array( |
343 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
343 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
344 | 344 | ))->build(true, true, false); |
345 | 345 | |
346 | 346 | $topics_data = $this->forum->get_topic_data(5); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function execute($u_action, $mode = '') |
92 | 92 | { |
93 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
93 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
94 | 94 | |
95 | 95 | $this->language->add_lang('viewforum'); |
96 | 96 | $this->language->add_lang('manager', 'blitze/content'); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | $filter_topic_status = $this->apply_status_filter($sql_where_array); |
107 | 107 | $filter_content_type = $this->apply_content_type_filter(); |
108 | 108 | |
109 | - $callable = 'init_' . $mode . '_mode'; |
|
110 | - $this->base_url = $u_action . (sizeof($this->params) ? '&' : ''); |
|
109 | + $callable = 'init_'.$mode.'_mode'; |
|
110 | + $this->base_url = $u_action.(sizeof($this->params) ? '&' : ''); |
|
111 | 111 | $this->$callable($content_types, $sql_where_array); |
112 | 112 | |
113 | 113 | $this->forum->query(true, false) |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $topic_tracking_info = $this->forum->get_topic_tracking_info(); |
139 | 139 | |
140 | 140 | $topics_data = array_values($topics_data); |
141 | - $base_url = $u_action . http_build_query($this->params); |
|
141 | + $base_url = $u_action.http_build_query($this->params); |
|
142 | 142 | |
143 | 143 | for ($i = 0, $size = sizeof($topics_data); $i < $size; $i++) |
144 | 144 | { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | { |
173 | 173 | return array( |
174 | 174 | 'ATTACH_ICON_IMG' => $this->get_attachment_icon($row), |
175 | - 'U_REVIEW_TOPIC' => $u_action . "&do=view&type=$content_type&t=" . $row['topic_id'], |
|
175 | + 'U_REVIEW_TOPIC' => $u_action."&do=view&type=$content_type&t=".$row['topic_id'], |
|
176 | 176 | ); |
177 | 177 | } |
178 | 178 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | 'S_CAN_MAKE_NORMAL' => ($s_can_make_sticky || $s_can_make_announce), |
198 | 198 | 'S_CAN_MAKE_STICKY' => $s_can_make_sticky, |
199 | 199 | 'S_CAN_MAKE_ANNOUNCE' => $s_can_make_announce, |
200 | - 'U_MCP_ACTION' => $this->base_url . '&do=moderate&redirect=' . $this->get_redirect_url($this->base_url), |
|
200 | + 'U_MCP_ACTION' => $this->base_url.'&do=moderate&redirect='.$this->get_redirect_url($this->base_url), |
|
201 | 201 | )); |
202 | 202 | } |
203 | 203 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | protected function init_ucp_mode(array $content_types, array &$sql_where_array) |
209 | 209 | { |
210 | - $sql_where_array[] = 't.topic_poster = ' . (int) $this->user->data['user_id']; |
|
210 | + $sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id']; |
|
211 | 211 | |
212 | 212 | // list all content types that the user can post in |
213 | 213 | $postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true)); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $this->template->assign_block_vars('postable', array( |
220 | 220 | 'TYPE' => $entity->get_content_langname(), |
221 | 221 | 'COLOUR' => $entity->get_content_colour(), |
222 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&f=' . $entity->get_forum_id()), |
|
222 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&f='.$entity->get_forum_id()), |
|
223 | 223 | )); |
224 | 224 | } |
225 | 225 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | 'CONTENT_TYPE' => $entity->get_content_langname(), |
238 | 238 | 'CONTENT_TYPE_COLOR' => $entity->get_content_colour(), |
239 | 239 | 'S_COMMENTS' => $entity->get_allow_comments(), |
240 | - 'U_CONTENT_TYPE' => $base_url . "&type=$type", |
|
240 | + 'U_CONTENT_TYPE' => $base_url."&type=$type", |
|
241 | 241 | ); |
242 | 242 | } |
243 | 243 | |
@@ -287,8 +287,8 @@ discard block |
||
287 | 287 | } |
288 | 288 | |
289 | 289 | return array( |
290 | - 'TOPIC_STATUS' => $this->language->lang('TOPIC_' . strtoupper($topic_status)), |
|
291 | - 'U_TOPIC_STATUS' => $base_url . "&status=$topic_status", |
|
290 | + 'TOPIC_STATUS' => $this->language->lang('TOPIC_'.strtoupper($topic_status)), |
|
291 | + 'U_TOPIC_STATUS' => $base_url."&status=$topic_status", |
|
292 | 292 | ); |
293 | 293 | } |
294 | 294 | |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | if ($mode === 'mcp') |
316 | 316 | { |
317 | 317 | $u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id); |
318 | - $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=deleted_topics&t=' . $topic_id, true, $this->user->session_id) : $u_mcp_queue; |
|
318 | + $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=deleted_topics&t='.$topic_id, true, $this->user->session_id) : $u_mcp_queue; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | return array( |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | */ |
332 | 332 | protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id) |
333 | 333 | { |
334 | - return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $this->user->session_id) : ''; |
|
334 | + return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode='.(($topic_unapproved) ? 'approve_details' : 'unapproved_posts')."&t=$topic_id", true, $this->user->session_id) : ''; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | if ($mode === 'mcp') |
349 | 349 | { |
350 | 350 | $redirect_url = $this->get_redirect_url($u_action); |
351 | - $u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t=' . $row['topic_id'] . '&redirect=' . $redirect_url, true, $this->user->session_id); |
|
351 | + $u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t='.$row['topic_id'].'&redirect='.$redirect_url, true, $this->user->session_id); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | protected function get_redirect_url($base_url) |
363 | 363 | { |
364 | - $base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : ''; |
|
364 | + $base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : ''; |
|
365 | 365 | return urlencode(str_replace('&', '&', $base_url)); |
366 | 366 | } |
367 | 367 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->template->assign_vars(array( |
64 | 64 | 'BOARD_URL' => $this->board_url, |
65 | 65 | 'SELF_LINK' => $this->controller_helper->route($this->symfony_request->attributes->get('_route'), $this->symfony_request->attributes->get('_route_params'), true, '', UrlGeneratorInterface::ABSOLUTE_URL), |
66 | - 'FEED_LINK' => $this->board_url . $this->user->page['script_path'] . 'index.' . $this->php_ext, |
|
66 | + 'FEED_LINK' => $this->board_url.$this->user->page['script_path'].'index.'.$this->php_ext, |
|
67 | 67 | 'FEED_TITLE' => $this->config['sitename'], |
68 | 68 | 'FEED_SUBTITLE' => $this->config['site_desc'], |
69 | 69 | 'FEED_UPDATED' => $max_update_time, |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $response = new Response($this->prepare_content($content)); |
89 | 89 | $response->headers->set('Content-Type', 'application/atom+xml'); |
90 | 90 | $response->setCharset('UTF-8'); |
91 | - $response->setLastModified(new \DateTime('@' . $max_update_time)); |
|
91 | + $response->setLastModified(new \DateTime('@'.$max_update_time)); |
|
92 | 92 | |
93 | 93 | if (!empty($this->user->data['is_bot'])) |
94 | 94 | { |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | { |
108 | 108 | // convert relative urls to absolute urls |
109 | 109 | $script_path = trim($this->user->page['script_path'], '/'); |
110 | - $full_path = $this->board_url . '/' . $script_path; |
|
111 | - $content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:' . $script_path . '\/)?)(.*?)("|\')/i', '$1=$2' . $full_path . '/$4$5', $content); |
|
110 | + $full_path = $this->board_url.'/'.$script_path; |
|
111 | + $content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:'.$script_path.'\/)?)(.*?)("|\')/i', '$1=$2'.$full_path.'/$4$5', $content); |
|
112 | 112 | |
113 | 113 | // remove hidden field labels |
114 | 114 | $content = preg_replace('#<div class="field-label label-hidden">(.*?)</div>#', '', $content); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $content = preg_replace('/((?:\?|&)sid=[a-z0-9]+)/', '', $content); |
118 | 118 | |
119 | 119 | // Remove Comments from inline attachments [ia] |
120 | - $content = preg_replace('#<dd>(.*?)</dd>#','',$content); |
|
120 | + $content = preg_replace('#<dd>(.*?)</dd>#', '', $content); |
|
121 | 121 | |
122 | 122 | // Replace some entities with their unicode counterpart |
123 | 123 | $entities = array( |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | { |
88 | 88 | if ($topic_data['total_comments']) |
89 | 89 | { |
90 | - $view = $this->request->variable('view', ''); |
|
91 | - $start = $this->request->variable('start', 0); |
|
92 | - $post_id = $this->request->variable('p', 0); |
|
90 | + $view = $this->request->variable('view', ''); |
|
91 | + $start = $this->request->variable('start', 0); |
|
92 | + $post_id = $this->request->variable('p', 0); |
|
93 | 93 | |
94 | 94 | $this->find_unread($view, $topic_data); |
95 | 95 | |
@@ -104,10 +104,10 @@ discard block |
||
104 | 104 | ->build(); |
105 | 105 | $posts_data = $this->forum->get_post_data(false, array(), $this->config['posts_per_page'], $start, array( |
106 | 106 | 'WHERE' => array( |
107 | - 'p.topic_id = ' . (int) $topic_data['topic_id'], |
|
108 | - 'p.post_id <> ' . (int) $topic_data['topic_first_post_id'], |
|
107 | + 'p.topic_id = '.(int) $topic_data['topic_id'], |
|
108 | + 'p.post_id <> '.(int) $topic_data['topic_first_post_id'], |
|
109 | 109 | ), |
110 | - 'ORDER_BY' => $this->sort_by_sql[$sort_key] . ' ' . $this->sort_dir_sql[$sort_dir], |
|
110 | + 'ORDER_BY' => $this->sort_by_sql[$sort_key].' '.$this->sort_dir_sql[$sort_dir], |
|
111 | 111 | )); |
112 | 112 | |
113 | 113 | $topic_tracking_info = $this->forum->get_topic_tracking_info(); |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0; |
173 | 173 | |
174 | 174 | $sql = 'SELECT post_id, topic_id, forum_id |
175 | - FROM ' . POSTS_TABLE . " |
|
175 | + FROM ' . POSTS_TABLE." |
|
176 | 176 | WHERE topic_id = $topic_id |
177 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id) . " |
|
177 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id)." |
|
178 | 178 | AND post_time > $topic_last_read |
179 | 179 | AND forum_id = $forum_id |
180 | 180 | ORDER BY post_time ASC, post_id ASC"; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | if ($row) |
186 | 186 | { |
187 | - redirect(append_sid($topic_data['topic_url'], 'p=' . $row['post_id']) . '#p' . $row['post_id']); |
|
187 | + redirect(append_sid($topic_data['topic_url'], 'p='.$row['post_id']).'#p'.$row['post_id']); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $start = $this->pagination->validate_start($start, $this->config['posts_per_page'], $topic_data['total_comments']); |
212 | 212 | $this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $topic_data['total_comments'], $this->config['posts_per_page'], $start); |
213 | 213 | |
214 | - $data =& $this->template_context->get_data_ref()['pagination']; |
|
214 | + $data = & $this->template_context->get_data_ref()['pagination']; |
|
215 | 215 | foreach ($data as &$row) |
216 | 216 | { |
217 | 217 | $row['PAGE_URL'] .= '#comments'; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | protected function get_prev_posts_count($forum_id, $topic_id, $post_id, $sort_dir) |
274 | 274 | { |
275 | 275 | $sql = 'SELECT post_id, post_time, post_visibility |
276 | - FROM ' . POSTS_TABLE . " p |
|
276 | + FROM ' . POSTS_TABLE." p |
|
277 | 277 | WHERE p.topic_id = $topic_id |
278 | 278 | AND p.post_id = $post_id"; |
279 | 279 | $result = $this->db->sql_query($sql); |
@@ -281,9 +281,9 @@ discard block |
||
281 | 281 | $this->db->sql_freeresult($result); |
282 | 282 | |
283 | 283 | $sql = 'SELECT COUNT(p.post_id) AS prev_posts |
284 | - FROM ' . POSTS_TABLE . " p |
|
284 | + FROM ' . POSTS_TABLE." p |
|
285 | 285 | WHERE p.topic_id = $topic_id |
286 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
286 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
287 | 287 | |
288 | 288 | if ($sort_dir == 'd') |
289 | 289 | { |
@@ -310,11 +310,11 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function set_sorting_options(&$sort_days, &$sort_key, &$sort_dir, &$u_sort_param) |
312 | 312 | { |
313 | - $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
313 | + $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
314 | 314 | $default_sort_key = (!empty($this->user->data['user_post_sortby_type'])) ? $this->user->data['user_post_sortby_type'] : 't'; |
315 | 315 | $default_sort_dir = (!empty($this->user->data['user_post_sortby_dir'])) ? $this->user->data['user_post_sortby_dir'] : 'a'; |
316 | 316 | |
317 | - $sort_days = $this->request->variable('st', $default_sort_days); |
|
317 | + $sort_days = $this->request->variable('st', $default_sort_days); |
|
318 | 318 | $sort_key = $this->request->variable('sk', $default_sort_key); |
319 | 319 | $sort_dir = $this->request->variable('sd', $default_sort_dir); |
320 | 320 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | */ |
377 | 377 | protected function get_post_display_lang(array $row, $topic_url) |
378 | 378 | { |
379 | - return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . append_sid($topic_url, "p={$row['post_id']}&view=show") . "#p{$row['post_id']}" . '">', '</a>') : ''; |
|
379 | + return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$row['post_id'].'" href="'.append_sid($topic_url, "p={$row['post_id']}&view=show")."#p{$row['post_id']}".'">', '</a>') : ''; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | /** |
@@ -386,6 +386,6 @@ discard block |
||
386 | 386 | */ |
387 | 387 | protected function set_form_action($topic_url, $start) |
388 | 388 | { |
389 | - $this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")) . '#comments'); |
|
389 | + $this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")).'#comments'); |
|
390 | 390 | } |
391 | 391 | } |