@@ -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, |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * @param \blitze\content\services\fields $fields Content fields object |
| 37 | 37 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
| 38 | 38 | * @param string $php_ext php file extension |
| 39 | - */ |
|
| 39 | + */ |
|
| 40 | 40 | public function __construct(\phpbb\db\driver\driver_interface $db, \blitze\content\services\types $content_types, \blitze\content\services\fields $fields, $phpbb_root_path, $php_ext) |
| 41 | 41 | { |
| 42 | 42 | $this->db = $db; |
@@ -115,9 +115,9 @@ |
||
| 115 | 115 | $forum_list = is_array($forum_list) ? $forum_list : array($forum_list); |
| 116 | 116 | |
| 117 | 117 | $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_attachment AS post_attachment, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour |
| 118 | - FROM ' . TOPICS_TABLE . ' t |
|
| 119 | - WHERE ' . $this->db->sql_in_set('forum_id', $this->get_forum_list($forum_list)) . ' |
|
| 120 | - AND ' . $this->db->sql_in_set('topic_visibility', $event['visibility_const']) . " |
|
| 118 | + FROM ' . TOPICS_TABLE.' t |
|
| 119 | + WHERE ' . $this->db->sql_in_set('forum_id', $this->get_forum_list($forum_list)).' |
|
| 120 | + AND ' . $this->db->sql_in_set('topic_visibility', $event['visibility_const'])." |
|
| 121 | 121 | AND topic_delete_user <> 0 |
| 122 | 122 | {$event['limit_time_sql']} |
| 123 | 123 | ORDER BY {$event['sort_order_sql']}"; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * @param \phpbb\db\driver\driver_interface $db Database object |
| 29 | 29 | * @param \phpbb\controller\helper $helper Helper object |
| 30 | 30 | * @param \blitze\content\services\types $content_types Content types object |
| 31 | - */ |
|
| 31 | + */ |
|
| 32 | 32 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \blitze\content\services\types $content_types) |
| 33 | 33 | { |
| 34 | 34 | $this->db = $db; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function modify_posts_data(\phpbb\event\data $event) |
| 59 | 59 | { |
| 60 | 60 | $sql_array = $event['sql_array']; |
| 61 | - $sql_array['WHERE'] .= ' AND t.topic_time <= ' . time(); |
|
| 61 | + $sql_array['WHERE'] .= ' AND t.topic_time <= '.time(); |
|
| 62 | 62 | |
| 63 | 63 | $sql_count = $sql_array; |
| 64 | 64 | $sql_count['SELECT'] = 'COUNT(p.post_id) AS total_results'; |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | public function modify_topic_data(\phpbb\event\data $event) |
| 83 | 83 | { |
| 84 | 84 | $sql_where = $event['sql_where']; |
| 85 | - $sql_where .= ' AND t.topic_time <= ' . time(); |
|
| 85 | + $sql_where .= ' AND t.topic_time <= '.time(); |
|
| 86 | 86 | |
| 87 | - $sql = 'SELECT COUNT(t.topic_id) AS total_results FROM ' . $event['sql_from'] . ' WHERE ' . $sql_where; |
|
| 87 | + $sql = 'SELECT COUNT(t.topic_id) AS total_results FROM '.$event['sql_from'].' WHERE '.$sql_where; |
|
| 88 | 88 | $result = $this->db->sql_query($sql); |
| 89 | 89 | $total_results = $this->db->sql_fetchfield('total_results'); |
| 90 | 90 | $this->db->sql_freeresult($result); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @param \phpbb\controller\helper $helper Helper object |
| 26 | 26 | * @param \blitze\content\services\types $content_types Content types object |
| 27 | - */ |
|
| 27 | + */ |
|
| 28 | 28 | public function __construct(\phpbb\controller\helper $helper, \blitze\content\services\types $content_types) |
| 29 | 29 | { |
| 30 | 30 | $this->helper = $helper; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * Constructor |
| 30 | 30 | * |
| 31 | 31 | * @param \blitze\content\services\form\builder $builder Form builder object |
| 32 | - */ |
|
| 32 | + */ |
|
| 33 | 33 | public function __construct(\blitze\content\services\form\builder $builder) |
| 34 | 34 | { |
| 35 | 35 | $this->builder = $builder; |
@@ -160,8 +160,7 @@ |
||
| 160 | 160 | if ($this->build_content) |
| 161 | 161 | { |
| 162 | 162 | $event['redirect_url'] = $this->builder->get_cp_url(); |
| 163 | - } |
|
| 164 | - else |
|
| 163 | + } else |
|
| 165 | 164 | { |
| 166 | 165 | $topic_url = $this->builder->get_post_url($this->content_type, $event['post_data']); |
| 167 | 166 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * @param \blitze\content\services\quickmod $quickmod Quick moderator tools |
| 31 | 31 | * @param \phpbb\config\config $config Config object |
| 32 | 32 | * @param \blitze\content\services\types $content_types Content types object |
| 33 | - */ |
|
| 33 | + */ |
|
| 34 | 34 | public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod, \phpbb\config\config $config, \blitze\content\services\types $content_types) |
| 35 | 35 | { |
| 36 | 36 | parent::__construct($phpbb_dispatcher, $language, $pagination, $template, $fields, $forum, $helper, $quickmod); |
@@ -136,8 +136,7 @@ |
||
| 136 | 136 | if (sizeof(array_keys($filters)) > 1) |
| 137 | 137 | { |
| 138 | 138 | return array('filters' => $filters); |
| 139 | - } |
|
| 140 | - else |
|
| 139 | + } else |
|
| 141 | 140 | { |
| 142 | 141 | $key = key($filters); |
| 143 | 142 | return array( |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * @param \blitze\sitemaker\services\forum\data $forum Forum Data object |
| 47 | 47 | * @param \blitze\content\services\helper $helper Content helper object |
| 48 | 48 | * @param \blitze\content\services\quickmod $quickmod Quick moderator tools |
| 49 | - */ |
|
| 49 | + */ |
|
| 50 | 50 | public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod) |
| 51 | 51 | { |
| 52 | 52 | $this->phpbb_dispatcher = $phpbb_dispatcher; |
@@ -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); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * @param \blitze\content\services\helper $helper Content helper object |
| 27 | 27 | * @param \blitze\content\services\quickmod $quickmod Quick moderator tools |
| 28 | 28 | * @param \phpbb\request\request_interface $request Request object |
| 29 | - */ |
|
| 29 | + */ |
|
| 30 | 30 | public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod, \phpbb\request\request_interface $request) |
| 31 | 31 | { |
| 32 | 32 | parent::__construct($phpbb_dispatcher, $language, $pagination, $template, $fields, $forum, $helper, $quickmod); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | else |
| 137 | 137 | { |
| 138 | 138 | $template_file = 'views/print.html'; |
| 139 | - $this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']); |
|
| 139 | + $this->template->assign_var('TOPIC_URL', generate_board_url(true).$topic_data['topic_url']); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | return $this->helper->render($template_file, $topic_data['topic_title']); |
@@ -184,15 +184,15 @@ discard block |
||
| 184 | 184 | { |
| 185 | 185 | if (!$this->user->data['is_bot'] && !$this->request->is_set('page')) |
| 186 | 186 | { |
| 187 | - $sql = 'UPDATE ' . TOPICS_TABLE . ' |
|
| 188 | - SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . " |
|
| 187 | + $sql = 'UPDATE '.TOPICS_TABLE.' |
|
| 188 | + SET topic_views = topic_views + 1, topic_last_view_time = ' . time()." |
|
| 189 | 189 | WHERE topic_id = $topic_id"; |
| 190 | 190 | $this->db->sql_query($sql); |
| 191 | 191 | |
| 192 | 192 | // Update the attachment download counts |
| 193 | 193 | if (sizeof($update_count)) |
| 194 | 194 | { |
| 195 | - $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' |
|
| 195 | + $sql = 'UPDATE '.ATTACHMENTS_TABLE.' |
|
| 196 | 196 | SET download_count = download_count + 1 |
| 197 | 197 | WHERE ' . $this->db->sql_in_set('attach_id', array_unique($update_count)); |
| 198 | 198 | $this->db->sql_query($sql); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * @param string $filter_type |
| 78 | 78 | * @param mixed $filter_value |
| 79 | 79 | * @param int $page |
| 80 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 80 | + * @return string A Symfony Response object |
|
| 81 | 81 | */ |
| 82 | 82 | public function index($type, $_format = '', $filter_type = '', $filter_value = '', $page = 1) |
| 83 | 83 | { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @param string $filter_type |
| 163 | 163 | * @param mixed $filter_value |
| 164 | 164 | * @param int $page |
| 165 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 165 | + * @return string A Symfony Response object |
|
| 166 | 166 | */ |
| 167 | 167 | public function filter($_format = '', $filter_type = '', $filter_value = '', $page = 1) |
| 168 | 168 | { |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | * @param \blitze\content\services\feed $feed Feed object |
| 55 | 55 | * @param \blitze\content\services\poll $poll Poll object |
| 56 | 56 | * @param \blitze\content\services\views\views_factory $views_factory Views handlers |
| 57 | - */ |
|
| 57 | + */ |
|
| 58 | 58 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\comments\comments_interface $comments, \blitze\content\services\types $content_types, \blitze\content\services\feed $feed, \blitze\content\services\poll $poll, \blitze\content\services\views\views_factory $views_factory) |
| 59 | 59 | { |
| 60 | 60 | $this->db = $db; |
@@ -122,8 +122,7 @@ discard block |
||
| 122 | 122 | { |
| 123 | 123 | $this->update_views($topic_id, $update_count); |
| 124 | 124 | $template_file = $view_handler->get_detail_template(); |
| 125 | - } |
|
| 126 | - else |
|
| 125 | + } else |
|
| 127 | 126 | { |
| 128 | 127 | $template_file = 'views/print.html'; |
| 129 | 128 | $this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']); |
@@ -244,8 +243,7 @@ discard block |
||
| 244 | 243 | if ($filter_type) |
| 245 | 244 | { |
| 246 | 245 | $filters = array($filter_type => (array) $filter_value); |
| 247 | - } |
|
| 248 | - else |
|
| 246 | + } else |
|
| 249 | 247 | { |
| 250 | 248 | $filters = $this->request->variable('filters', array('' => array('' => '')), true); |
| 251 | 249 | } |