@@ -106,7 +106,6 @@ |
||
| 106 | 106 | * |
| 107 | 107 | * @param string $type |
| 108 | 108 | * @param int $topic_id |
| 109 | - * @param int $page |
|
| 110 | 109 | * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
| 111 | 110 | */ |
| 112 | 111 | public function show($type, $topic_id) |
@@ -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); |
@@ -132,8 +132,7 @@ |
||
| 132 | 132 | { |
| 133 | 133 | $this->update_views($topic_id, $update_count); |
| 134 | 134 | $template_file = $view_handler->get_detail_template(); |
| 135 | - } |
|
| 136 | - else |
|
| 135 | + } else |
|
| 137 | 136 | { |
| 138 | 137 | $template_file = 'views/print.html'; |
| 139 | 138 | $this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']); |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | /** |
| 245 | 245 | * @param array $topic_data |
| 246 | 246 | * @param array $post_data |
| 247 | - * @return array |
|
| 247 | + * @return string |
|
| 248 | 248 | */ |
| 249 | 249 | protected function get_mini_post_url(array $topic_data, array $post_data) |
| 250 | 250 | { |
@@ -324,7 +324,6 @@ discard block |
||
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
| 327 | - * @param array $row |
|
| 328 | 327 | * @return array |
| 329 | 328 | */ |
| 330 | 329 | protected function get_watch_status_data(array $topic_data) |
@@ -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_poster, $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, |
@@ -244,6 +244,7 @@ |
||
| 244 | 244 | |
| 245 | 245 | /** |
| 246 | 246 | * {@inheritdoc} |
| 247 | + * @param string $forum_id |
|
| 247 | 248 | */ |
| 248 | 249 | protected function get_filter_sql($filter_type, $filter_value, $forum_id) |
| 249 | 250 | { |
@@ -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; |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | $update_count = array(); |
| 127 | 127 | foreach ($posts_data as $topic_id => $posts) |
| 128 | 128 | { |
| 129 | - $post_data = array_shift($posts); |
|
| 130 | - $topic_data = $topics_data[$topic_id]; |
|
| 129 | + $post_data = array_shift($posts); |
|
| 130 | + $topic_data = $topics_data[$topic_id]; |
|
| 131 | 131 | |
| 132 | 132 | $this->template->assign_block_vars('topicrow', array_merge( |
| 133 | 133 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -233,8 +233,8 @@ discard block |
||
| 233 | 233 | $this->pagination->generate_template_pagination( |
| 234 | 234 | array( |
| 235 | 235 | 'routes' => array( |
| 236 | - 'blitze_content_' . $route, |
|
| 237 | - 'blitze_content_' . $route . '_page', |
|
| 236 | + 'blitze_content_'.$route, |
|
| 237 | + 'blitze_content_'.$route.'_page', |
|
| 238 | 238 | ), |
| 239 | 239 | 'params' => $params, |
| 240 | 240 | ), |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | ->fetch_forum($topic_data['forum_id']) |
| 308 | 308 | ->fetch_topic_poster($topic_data['topic_poster']) |
| 309 | 309 | ->fetch_custom(array( |
| 310 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
| 310 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
| 311 | 311 | ))->build(true, true, false); |
| 312 | 312 | |
| 313 | 313 | $topics_data = $this->forum->get_topic_data(5); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | public function get_edit_url(array $post_data, array $topic_data, $cp_mode = '') |
| 54 | 54 | { |
| 55 | 55 | $cp_param = $this->get_cp_param($post_data, $topic_data, $cp_mode); |
| 56 | - return ($this->edit_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", "mode=edit&f={$topic_data['forum_id']}&p={$post_data['post_id']}" . $cp_param) : ''; |
|
| 56 | + return ($this->edit_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", "mode=edit&f={$topic_data['forum_id']}&p={$post_data['post_id']}".$cp_param) : ''; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | public function get_delete_url(array $post_data, array $topic_data, $cp_mode = '') |
| 66 | 66 | { |
| 67 | 67 | $cp_param = $this->get_cp_param($post_data, $topic_data, $cp_mode); |
| 68 | - return ($this->delete_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", 'mode=' . (($this->softdelete_allowed($topic_data, $post_data)) ? 'soft_delete' : 'delete') . "&f={$post_data['forum_id']}&p={$post_data['post_id']}" . $cp_param) : ''; |
|
| 68 | + return ($this->delete_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", 'mode='.(($this->softdelete_allowed($topic_data, $post_data)) ? 'soft_delete' : 'delete')."&f={$post_data['forum_id']}&p={$post_data['post_id']}".$cp_param) : ''; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function get_print_topic_url(array $topic_data) |
| 95 | 95 | { |
| 96 | - return ($this->auth->acl_get('f_print', $topic_data['forum_id'])) ? $topic_data['topic_url'] . '?view=print' : ''; |
|
| 96 | + return ($this->auth->acl_get('f_print', $topic_data['forum_id'])) ? $topic_data['topic_url'].'?view=print' : ''; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function get_email_topic_url(array $topic_data) |
| 104 | 104 | { |
| 105 | - return ($this->auth->acl_get('f_email', $topic_data['forum_id']) && $this->config['email_enable']) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&t=' . $topic_data['topic_id']) : ''; |
|
| 105 | + return ($this->auth->acl_get('f_email', $topic_data['forum_id']) && $this->config['email_enable']) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&t='.$topic_data['topic_id']) : ''; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function get_search_users_posts_url($forum_id, $username) |
| 114 | 114 | { |
| 115 | - return append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$username}&" . urlencode('fid[]') . "=$forum_id&sc=0&sf=titleonly&sr=topics"); |
|
| 115 | + return append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$username}&".urlencode('fid[]')."=$forum_id&sc=0&sf=titleonly&sr=topics"); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | public function get_info_url(array $post_data) |
| 123 | 123 | { |
| 124 | 124 | $forum_id = $post_data['forum_id']; |
| 125 | - return ($this->auth->acl_get('m_info', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=main&mode=post_details&f=$forum_id&p=" . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 125 | + return ($this->auth->acl_get('m_info', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=main&mode=post_details&f=$forum_id&p=".$post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function get_approve_url(array $post_data, $viewtopic_url) |
| 134 | 134 | { |
| 135 | - return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p={$post_data['post_id']}&f={$post_data['forum_id']}&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $post_data['post_id'] . '#p' . $post_data['post_id']))); |
|
| 135 | + return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p={$post_data['post_id']}&f={$post_data['forum_id']}&redirect=".urlencode(str_replace('&', '&', $viewtopic_url.'&p='.$post_data['post_id'].'#p'.$post_data['post_id']))); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function get_mcp_report_url(array $post_data) |
| 163 | 163 | { |
| 164 | - return ($this->auth->acl_get('m_report', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 164 | + return ($this->auth->acl_get('m_report', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | public function get_mcp_restore_url(array $post_data, array $topic_data) |
| 173 | 173 | { |
| 174 | - return ($this->auth->acl_get('m_approve', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=' . (($topic_data['topic_visibility'] != ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics') . '&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 174 | + return ($this->auth->acl_get('m_approve', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode='.(($topic_data['topic_visibility'] != ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics').'&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public function get_notes_url(array $post_data) |
| 182 | 182 | { |
| 183 | - return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u=' . $post_data['poster_id'], true, $this->user->session_id) : ''; |
|
| 183 | + return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u='.$post_data['poster_id'], true, $this->user->session_id) : ''; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /** |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function get_warning_url(array $post_data) |
| 191 | 191 | { |
| 192 | - return ($this->auth->acl_get('m_warn') && !$this->user_is_poster($post_data['poster_id']) && $post_data['poster_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 192 | + return ($this->auth->acl_get('m_warn') && !$this->user_is_poster($post_data['poster_id']) && $post_data['poster_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $cp_param = ''; |
| 296 | 296 | if ($topic_data['topic_first_post_id'] == $post_data['post_id']) |
| 297 | 297 | { |
| 298 | - $cp_param = '&cp=' . ((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
| 298 | + $cp_param = '&cp='.((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
| 299 | 299 | } |
| 300 | 300 | return $cp_param; |
| 301 | 301 | } |
@@ -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); |
@@ -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); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | foreach ($fields_data as $field => $value) |
| 141 | 141 | { |
| 142 | 142 | $value = is_array($value) ? join("\n", $value) : $value; |
| 143 | - $message .= '[tag=' . $field . ']' . $value . '[/tag]'; |
|
| 143 | + $message .= '[tag='.$field.']'.$value.'[/tag]'; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return $message; |
@@ -192,13 +192,13 @@ discard block |
||
| 192 | 192 | $text = ''; |
| 193 | 193 | if ($entity = $this->types->get_type($content_type)) |
| 194 | 194 | { |
| 195 | - $get_tags = 'get_' . $view . '_tags'; |
|
| 196 | - $get_template = 'get_' . $view . '_tpl'; |
|
| 195 | + $get_tags = 'get_'.$view.'_tags'; |
|
| 196 | + $get_template = 'get_'.$view.'_tpl'; |
|
| 197 | 197 | |
| 198 | 198 | $this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$get_tags(), $entity->$get_template(), $view); |
| 199 | 199 | $content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER)); |
| 200 | 200 | |
| 201 | - $text = $content['SEQ_DISPLAY'] ?: $content['CUSTOM_DISPLAY']; |
|
| 201 | + $text = $content['SEQ_DISPLAY'] ?: $content['CUSTOM_DISPLAY']; |
|
| 202 | 202 | } |
| 203 | 203 | return $text; |
| 204 | 204 | } |
@@ -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(); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $attachments = $this->forum->get_attachments($topic_data['forum_id']); |
| 134 | 134 | |
| 135 | 135 | $this->template->assign_vars(array( |
| 136 | - 'S_TOPIC_ACTION' => append_sid($topic_data['topic_url'], (($start == 0) ? '' : "?start=$start")) . '#comments', |
|
| 136 | + 'S_TOPIC_ACTION' => append_sid($topic_data['topic_url'], (($start == 0) ? '' : "?start=$start")).'#comments', |
|
| 137 | 137 | )); |
| 138 | 138 | |
| 139 | 139 | for ($i = 0, $size = sizeof($posts_data); $i < $size; $i++) |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | 'S_POST_REPORTED' => ($row['post_reported'] && $this->auth->acl_get('m_report', $row['forum_id'])) ? true : false, |
| 151 | 151 | 'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false, |
| 152 | 152 | 'S_POST_HIDDEN' => $row['hide_post'], |
| 153 | - 'L_POST_DISPLAY' => ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '', |
|
| 153 | + 'L_POST_DISPLAY' => ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$row['post_id'].'" href="'.$viewtopic_url."&p={$row['post_id']}&view=show#p{$row['post_id']}".'">', '</a>') : '', |
|
| 154 | 154 | ))); |
| 155 | 155 | |
| 156 | 156 | $this->topic->show_attachments($attachments, $row['post_id'], 'postrow.attachment'); |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0; |
| 175 | 175 | |
| 176 | 176 | $sql = 'SELECT post_id, topic_id, forum_id |
| 177 | - FROM ' . POSTS_TABLE . " |
|
| 177 | + FROM ' . POSTS_TABLE." |
|
| 178 | 178 | WHERE topic_id = $topic_id |
| 179 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id) . " |
|
| 179 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id)." |
|
| 180 | 180 | AND post_time > $topic_last_read |
| 181 | 181 | AND forum_id = $forum_id |
| 182 | 182 | ORDER BY post_time ASC, post_id ASC"; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | if ($row) |
| 188 | 188 | { |
| 189 | - redirect(append_sid($topic_data['topic_url'], 'p=' . $row['post_id']) . '#p' . $row['post_id']); |
|
| 189 | + redirect(append_sid($topic_data['topic_url'], 'p='.$row['post_id']).'#p'.$row['post_id']); |
|
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | } |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $start = $this->pagination->validate_start($start, $this->config['posts_per_page'], $topic_data['total_comments']); |
| 214 | 214 | $this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $topic_data['total_comments'], $this->config['posts_per_page'], $start); |
| 215 | 215 | |
| 216 | - $data =& $this->template_context->get_data_ref(); |
|
| 216 | + $data = & $this->template_context->get_data_ref(); |
|
| 217 | 217 | foreach ($data['pagination'] as &$row) |
| 218 | 218 | { |
| 219 | 219 | $row['PAGE_URL'] .= '#comments'; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | protected function get_prev_posts_count($forum_id, $topic_id, $post_id, $sort_dir) |
| 276 | 276 | { |
| 277 | 277 | $sql = 'SELECT post_id, post_time, post_visibility |
| 278 | - FROM ' . POSTS_TABLE . " p |
|
| 278 | + FROM ' . POSTS_TABLE." p |
|
| 279 | 279 | WHERE p.topic_id = $topic_id |
| 280 | 280 | AND p.post_id = $post_id"; |
| 281 | 281 | $result = $this->db->sql_query($sql); |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | $this->db->sql_freeresult($result); |
| 284 | 284 | |
| 285 | 285 | $sql = 'SELECT COUNT(p.post_id) AS prev_posts |
| 286 | - FROM ' . POSTS_TABLE . " p |
|
| 286 | + FROM ' . POSTS_TABLE." p |
|
| 287 | 287 | WHERE p.topic_id = $topic_id |
| 288 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
| 288 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
| 289 | 289 | |
| 290 | 290 | if ($sort_dir == 'd') |
| 291 | 291 | { |
@@ -312,11 +312,11 @@ discard block |
||
| 312 | 312 | */ |
| 313 | 313 | protected function set_sorting_options(&$sort_days, &$sort_key, &$sort_dir, &$u_sort_param) |
| 314 | 314 | { |
| 315 | - $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
| 315 | + $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
| 316 | 316 | $default_sort_key = (!empty($this->user->data['user_post_sortby_type'])) ? $this->user->data['user_post_sortby_type'] : 't'; |
| 317 | 317 | $default_sort_dir = (!empty($this->user->data['user_post_sortby_dir'])) ? $this->user->data['user_post_sortby_dir'] : 'a'; |
| 318 | 318 | |
| 319 | - $sort_days = $this->request->variable('st', $default_sort_days); |
|
| 319 | + $sort_days = $this->request->variable('st', $default_sort_days); |
|
| 320 | 320 | $sort_key = $this->request->variable('sk', $default_sort_key); |
| 321 | 321 | $sort_dir = $this->request->variable('sd', $default_sort_dir); |
| 322 | 322 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | // Let's create the new BBCode |
| 43 | 43 | $configurator->BBCodes->addCustom( |
| 44 | 44 | '[pagebreak title={SIMPLETEXT;optional;postFilter=ucwords}]', |
| 45 | - '<p><!-- pagebreak --></p>' . |
|
| 45 | + '<p><!-- pagebreak --></p>'. |
|
| 46 | 46 | '<xsl:if test="@title"><h4>{SIMPLETEXT}</h4><br /></xsl:if>' |
| 47 | 47 | ); |
| 48 | 48 | } |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | // Let's create the new BBCode |
| 64 | 64 | $configurator->BBCodes->addCustom( |
| 65 | 65 | '[tag={IDENTIFIER}]{TEXT}[/tag]', |
| 66 | - "<!-- begin field -->\n" . |
|
| 67 | - "<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n" . |
|
| 66 | + "<!-- begin field -->\n". |
|
| 67 | + "<div data-field=\"{IDENTIFIER}\">{TEXT}</div><br />\n". |
|
| 68 | 68 | "<!-- end field -->\n" |
| 69 | 69 | ); |
| 70 | 70 | } |