@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $value = $this->request->variable($name, $value); |
| 20 | 20 | $value = $this->get_image_src($value); |
| 21 | 21 | |
| 22 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
| 22 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $data['field_value'] = $this->get_image_src($bbcode_value); |
| 35 | 35 | |
| 36 | 36 | $this->ptemplate->assign_vars($data); |
| 37 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
| 37 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
| 38 | 38 | |
| 39 | 39 | $data['field_value'] = $bbcode_value; |
| 40 | 40 | |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | $image = ''; |
| 50 | 50 | if ($data['field_value']) |
| 51 | 51 | { |
| 52 | - $image = '<figure class="img-ui">' . $data['field_value'] . '</figure>'; |
|
| 52 | + $image = '<figure class="img-ui">'.$data['field_value'].'</figure>'; |
|
| 53 | 53 | if ($mode !== 'block') |
| 54 | 54 | { |
| 55 | - $image = '<div class="' . join(' ', array_filter($data['field_props'])) . '">' . $image . '</div>'; |
|
| 55 | + $image = '<div class="'.join(' ', array_filter($data['field_props'])).'">'.$image.'</div>'; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | return $image; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ), |
| 69 | 69 | 'css' => array( |
| 70 | 70 | '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css', |
| 71 | - '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $data['field_props']['theme'] . '.min.css', |
|
| 71 | + '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$data['field_props']['theme'].'.min.css', |
|
| 72 | 72 | ) |
| 73 | 73 | )); |
| 74 | 74 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - return join($range, ' - ') . $data['field_props']['postfix']; |
|
| 92 | + return join($range, ' - ').$data['field_props']['postfix']; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -129,6 +129,6 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | protected function set_prefix(&$item, $key, $prefix) |
| 131 | 131 | { |
| 132 | - $item = $prefix . $item; |
|
| 132 | + $item = $prefix.$item; |
|
| 133 | 133 | } |
| 134 | 134 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function display_field(array $data) |
| 38 | 38 | { |
| 39 | - return $data['field_value'] ? '<a href="tel:' . $data['field_value'] . '">' . preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']) . '</a>' : ''; |
|
| 39 | + return $data['field_value'] ? '<a href="tel:'.$data['field_value'].'">'.preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']).'</a>' : ''; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function get_field_value($name, $default) |
| 30 | 30 | { |
| 31 | 31 | $default = is_array($default) ? $default : explode("\n", $default); |
| 32 | - $value = $this->request->variable($name, $default, true); |
|
| 32 | + $value = $this->request->variable($name, $default, true); |
|
| 33 | 33 | |
| 34 | 34 | if (empty($value) && $this->request->server('REQUEST_METHOD') !== 'POST') |
| 35 | 35 | { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->ptemplate->assign_vars($data); |
| 63 | 63 | |
| 64 | 64 | $tpl_name = ($data['field_type'] === 'select') ? 'select' : 'pickem'; |
| 65 | - return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'] . '_field'); |
|
| 65 | + return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'].'_field'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | foreach ($choices as $value => $option) |
| 86 | 86 | { |
| 87 | 87 | $options[] = array( |
| 88 | - 'id' => 'smc-'. $name . '-' . $count, |
|
| 88 | + 'id' => 'smc-'.$name.'-'.$count, |
|
| 89 | 89 | 'label' => $this->language->lang($option), |
| 90 | 90 | 'selected' => (int) (in_array($value, $selected)), |
| 91 | 91 | 'value' => $value, |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * @param \phpbb\user $user User object |
| 43 | 43 | * @param string $root_path Path to the phpbb includes directory. |
| 44 | 44 | * @param string $php_ext php file extension |
| 45 | - */ |
|
| 45 | + */ |
|
| 46 | 46 | public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, $root_path, $php_ext) |
| 47 | 47 | { |
| 48 | 48 | $this->auth = $auth; |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | 'L_QUICKREPLY' => $this->language->lang('NEW_COMMENT'), |
| 82 | 82 | 'U_QR_ACTION' => append_sid("{$this->phpbb_root_path}posting.{$this->php_ext}", "mode=reply&f={$topic_data['forum_id']}&t={$topic_data['topic_id']}"), |
| 83 | 83 | 'QR_HIDDEN_FIELDS' => build_hidden_fields($qr_hidden_fields), |
| 84 | - 'SUBJECT' => 'Re: ' . censor_text($topic_data['topic_title']), |
|
| 84 | + 'SUBJECT' => 'Re: '.censor_text($topic_data['topic_title']), |
|
| 85 | 85 | )); |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * @param \blitze\content\services\topic $topic Topic object |
| 59 | 59 | * @param string $root_path Path to the phpbb directory. |
| 60 | 60 | * @param string $php_ext php file extension |
| 61 | - */ |
|
| 61 | + */ |
|
| 62 | 62 | public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\content_visibility $content_visibility, \phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\template\context $template_context, \phpbb\user $user, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\topic $topic, $root_path, $php_ext) |
| 63 | 63 | { |
| 64 | 64 | parent::__construct($auth, $config, $language, $template, $user, $root_path, $php_ext); |
@@ -258,8 +258,7 @@ discard block |
||
| 258 | 258 | $prev_posts_count = $this->content_visibility->get_count('topic_posts', $topic_data, $topic_data['forum_id']) - 1; |
| 259 | 259 | } |
| 260 | 260 | return $prev_posts_count; |
| 261 | - } |
|
| 262 | - else |
|
| 261 | + } else |
|
| 263 | 262 | { |
| 264 | 263 | return $this->get_prev_posts_count($topic_data['forum_id'], $topic_data['topic_id'], $post_id, $sort_dir) - 1; |
| 265 | 264 | } |
@@ -290,8 +289,7 @@ discard block |
||
| 290 | 289 | if ($sort_dir == 'd') |
| 291 | 290 | { |
| 292 | 291 | $sql .= " AND (p.post_time > {$row['post_time']} OR (p.post_time = {$row['post_time']} AND p.post_id >= {$row['post_id']}))"; |
| 293 | - } |
|
| 294 | - else |
|
| 292 | + } else |
|
| 295 | 293 | { |
| 296 | 294 | $sql .= " AND (p.post_time < {$row['post_time']} OR (p.post_time = {$row['post_time']} AND p.post_id <= {$row['post_id']}))"; |
| 297 | 295 | } |
@@ -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(); |
|
| 214 | + $data = & $this->template_context->get_data_ref(); |
|
| 215 | 215 | foreach ($data['pagination'] 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 | } |
@@ -34,10 +34,10 @@ |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * Get the url to this item |
|
| 38 | - * |
|
| 39 | - * @return string URL |
|
| 40 | - */ |
|
| 37 | + * Get the url to this item |
|
| 38 | + * |
|
| 39 | + * @return string URL |
|
| 40 | + */ |
|
| 41 | 41 | public function get_url() |
| 42 | 42 | { |
| 43 | 43 | if ($type = $this->types->get_forum_type($this->item_parent_id)) |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | if ($type = $this->types->get_forum_type($this->item_parent_id)) |
| 44 | 44 | { |
| 45 | - return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "i=-blitze-content-mcp-content_module&mode=content&type=$type&t={$this->item_id}&do=view"); |
|
| 45 | + return append_sid($this->phpbb_root_path.'mcp.'.$this->php_ext, "i=-blitze-content-mcp-content_module&mode=content&type=$type&t={$this->item_id}&do=view"); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | return parent::get_url(); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
| 31 | 31 | * @param \blitze\content\services\types $content_types Content types object |
| 32 | 32 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
| 33 | - */ |
|
| 33 | + */ |
|
| 34 | 34 | public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\views\views_factory $views_factory, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory) |
| 35 | 35 | { |
| 36 | 36 | parent::__construct($auth, $controller_helper, $phpbb_dispatcher, $language, $template, $user, $auto_lang, $fields_factory, $views_factory); |
@@ -301,8 +301,7 @@ |
||
| 301 | 301 | if ($row['post_delete_reason']) |
| 302 | 302 | { |
| 303 | 303 | return $this->language->lang('POST_DELETED_BY_REASON', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']); |
| 304 | - } |
|
| 305 | - else |
|
| 304 | + } else |
|
| 306 | 305 | { |
| 307 | 306 | return $this->language->lang('POST_DELETED_BY', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true)); |
| 308 | 307 | } |
@@ -250,10 +250,10 @@ discard block |
||
| 250 | 250 | { |
| 251 | 251 | if ($topic_data['topic_first_post_id'] === $post_data['post_id']) |
| 252 | 252 | { |
| 253 | - return append_sid($topic_data['topic_url'], 'view=unread') . '#unread'; |
|
| 253 | + return append_sid($topic_data['topic_url'], 'view=unread').'#unread'; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | - return append_sid($topic_data['topic_url'], 'p=' . $post_data['post_id']) . '#p' . $post_data['post_id']; |
|
| 256 | + return append_sid($topic_data['topic_url'], 'p='.$post_data['post_id']).'#p'.$post_data['post_id']; |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | /** |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | $l_edited_by = $edit_reason = ''; |
| 267 | 267 | if (($row['post_edit_count'] && $this->config['display_last_edited']) || $row['post_edit_reason']) |
| 268 | 268 | { |
| 269 | - $display_username = $users_cache[$row['poster_id']]['username_full']; |
|
| 269 | + $display_username = $users_cache[$row['poster_id']]['username_full']; |
|
| 270 | 270 | $l_edited_by = $this->language->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $this->user->format_date($row['post_edit_time'], false, true)); |
| 271 | 271 | $edit_reason = $row['post_edit_reason']; |
| 272 | 272 | } |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | if ($s_post_deleted && $row['post_delete_user']) |
| 291 | 291 | { |
| 292 | - $display_postername = $users_cache[$row['poster_id']]['username_full']; |
|
| 293 | - $display_username = $users_cache[$row['post_delete_user']]['username_full']; |
|
| 292 | + $display_postername = $users_cache[$row['poster_id']]['username_full']; |
|
| 293 | + $display_username = $users_cache[$row['post_delete_user']]['username_full']; |
|
| 294 | 294 | |
| 295 | 295 | $l_deleted_message = $this->get_delete_message($row, $display_postername, $display_username); |
| 296 | 296 | $l_deleted_by = $this->language->lang('DELETED_INFORMATION', $display_username, $this->user->format_date($row['post_delete_time'], false, true)); |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | ); |
| 367 | 367 | |
| 368 | 368 | return array( |
| 369 | - 'U_BOOKMARK_TOPIC' => ($this->user->data['is_registered'] && $this->config['allow_bookmarks']) ? $this->helper->get_viewtopic_url($topic_data) . '&bookmark=1&hash=' . generate_link_hash("topic_{$topic_data['topic_id']}") : '', |
|
| 369 | + 'U_BOOKMARK_TOPIC' => ($this->user->data['is_registered'] && $this->config['allow_bookmarks']) ? $this->helper->get_viewtopic_url($topic_data).'&bookmark=1&hash='.generate_link_hash("topic_{$topic_data['topic_id']}") : '', |
|
| 370 | 370 | 'S_BOOKMARK_TOPIC' => $this->language->lang($lang_keys['bookmark'][$state_key]), |
| 371 | 371 | 'S_BOOKMARK_TOGGLE' => $this->language->lang($lang_keys['toggle'][$state_key]), |
| 372 | 372 | 'S_BOOKMARKED_TOPIC' => $bookmarked, |