@@ -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); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * @param \phpbb\language\language $language Language object |
| 29 | 29 | * @param \blitze\content\services\types $content_types Content types object |
| 30 | 30 | * @param string $php_ext php file extension |
| 31 | - */ |
|
| 31 | + */ |
|
| 32 | 32 | public function __construct(\phpbb\language\language $language, \blitze\content\services\types $content_types, $php_ext) |
| 33 | 33 | { |
| 34 | 34 | $this->language = $language; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | */ |
| 79 | 79 | public function add_viewonline_location(\phpbb\event\data $event) |
| 80 | 80 | { |
| 81 | - if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/content/') === 0) |
|
| 81 | + if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/content/') === 0) |
|
| 82 | 82 | { |
| 83 | 83 | $types = join('|', $this->content_types->get_forum_types()); |
| 84 | 84 | preg_match("/\/content\/($types)(\/[0-9]\/.*)?/is", $event['row']['session_page'], $match); |
@@ -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 | |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | $update_count = array(); |
| 173 | 173 | foreach ($posts_data as $topic_id => $posts) |
| 174 | 174 | { |
| 175 | - $post_data = array_shift($posts); |
|
| 176 | - $topic_data = $topics_data[$topic_id]; |
|
| 175 | + $post_data = array_shift($posts); |
|
| 176 | + $topic_data = $topics_data[$topic_id]; |
|
| 177 | 177 | $this->ptemplate->assign_block_vars('topicrow', $this->fields->show($type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info)); |
| 178 | 178 | } |
| 179 | 179 | unset($topics_data, $posts_data, $users_cache, $attachments, $topic_tracking_info); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | POST_STICKY => 'CONTENT_STICKY_POSTS', |
| 201 | 201 | ); |
| 202 | 202 | |
| 203 | - return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] : $this->language->lang('CONTENT_' . $this->sort_options[$this->settings['sort_key']], $content_langname); |
|
| 203 | + return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] : $this->language->lang('CONTENT_'.$this->sort_options[$this->settings['sort_key']], $content_langname); |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | foreach ($content_types as $value => $title) |
| 268 | 268 | { |
| 269 | 269 | $selected = ($type == $value) ? ' selected="selected"' : ''; |
| 270 | - $html .= '<option value="' . $value . '"' . $selected . ' data-toggle-setting="#fields-col-' . $value . '">' . $title . '</option>'; |
|
| 270 | + $html .= '<option value="'.$value.'"'.$selected.' data-toggle-setting="#fields-col-'.$value.'">'.$title.'</option>'; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | return $html; |
@@ -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); |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | $this->template->assign_vars($entity->to_array()); |
| 119 | 119 | foreach ($posts_data as $topic_id => $post_data) |
| 120 | 120 | { |
| 121 | - $topic_data = $topics_data[$topic_id]; |
|
| 121 | + $topic_data = $topics_data[$topic_id]; |
|
| 122 | 122 | $topic = $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info); |
| 123 | 123 | |
| 124 | 124 | $this->template->assign_block_vars('topicrow', $topic); |
@@ -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); |
@@ -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); |