@@ -122,8 +122,7 @@ |
||
| 122 | 122 | )), CASE_UPPER)); |
| 123 | 123 | $this->template->set_filenames(array('content' => $this->tpl_name)); |
| 124 | 124 | $tpl_data['CUSTOM_DISPLAY'] = $this->template->assign_display('content'); |
| 125 | - } |
|
| 126 | - else |
|
| 125 | + } else |
|
| 127 | 126 | { |
| 128 | 127 | $tpl_data['SEQ_DISPLAY'] = join('<br />', $fields_data); |
| 129 | 128 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | if (!empty($custom_tpl)) |
| 76 | 76 | { |
| 77 | - $this->tpl_name = ($tpl_name) ? $tpl_name : $content_type . '_' . $view_mode; |
|
| 77 | + $this->tpl_name = ($tpl_name) ? $tpl_name : $content_type.'_'.$view_mode; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary'; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function show($type, array $topic_data, array $post_data, array $users_cache, array $attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '') |
| 98 | 98 | { |
| 99 | - $callable = 'get_' . $this->view_mode . '_template_data'; |
|
| 99 | + $callable = 'get_'.$this->view_mode.'_template_data'; |
|
| 100 | 100 | $tpl_data = array_merge( |
| 101 | 101 | $this->{$callable}($type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info, $mode), |
| 102 | 102 | $topic_data_overwrite |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $field_type = $field_data['field_type']; |
| 168 | 168 | $field_data['field_value'] = &$post_field_data[$field_name]; |
| 169 | 169 | $field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']); |
| 170 | - $field_contents = $this->form_fields[$field_type]->display_field($field_data, $this->view_mode, $tpl_data); |
|
| 170 | + $field_contents = $this->form_fields[$field_type]->display_field($field_data, $this->view_mode, $tpl_data); |
|
| 171 | 171 | |
| 172 | 172 | // this essentially hides other fields if the field returns an array |
| 173 | 173 | if (is_array($field_contents)) |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | if (!empty($field_contents)) |
| 180 | 180 | { |
| 181 | - $display_data[$field_name] = '<div class="field-label ' . $this->label[$field_data['field_' . $this->view_mode . '_ldisp']] . '">' . $field_data['field_label'] . $this->language->lang('COLON') . ' </div>' . $field_contents; |
|
| 181 | + $display_data[$field_name] = '<div class="field-label '.$this->label[$field_data['field_'.$this->view_mode.'_ldisp']].'">'.$field_data['field_label'].$this->language->lang('COLON').' </div>'.$field_contents; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @param \phpbb\user $user User object |
| 35 | 35 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
| 36 | 36 | * @param string $php_ext php file extension |
| 37 | - */ |
|
| 37 | + */ |
|
| 38 | 38 | public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\user $user, $phpbb_root_path, $php_ext) |
| 39 | 39 | { |
| 40 | 40 | $this->auth = $auth; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | public function edit_post(array $topic_data, array $post_data, $cp_class = '') |
| 138 | 138 | { |
| 139 | 139 | $cp_class = $this->get_cp_class($post_data['poster_id'], $cp_class); |
| 140 | - $callable = $cp_class . '_can_edit_topic'; |
|
| 140 | + $callable = $cp_class.'_can_edit_topic'; |
|
| 141 | 141 | $edit_url = ''; |
| 142 | 142 | |
| 143 | 143 | if ($this->user->data['is_registered'] && |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | public function delete_post(array $topic_data, array $post_data) |
| 205 | 205 | { |
| 206 | 206 | $cp_class = $this->get_cp_class($post_data['poster_id']); |
| 207 | - $callable = $cp_class . '_can_delete_topic'; |
|
| 207 | + $callable = $cp_class.'_can_delete_topic'; |
|
| 208 | 208 | $u_delete = ''; |
| 209 | 209 | |
| 210 | 210 | if ($this->user->data['is_registered'] && |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public function mini_post($post_id) |
| 225 | 225 | { |
| 226 | - return append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'p=' . $post_id) . '#p' . $post_id; |
|
| 226 | + return append_sid("{$this->phpbb_root_path}viewtopic.$this->php_ext", 'p='.$post_id).'#p'.$post_id; |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | /** |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | */ |
| 234 | 234 | public function report_topic($forum_id, $post_id) |
| 235 | 235 | { |
| 236 | - return ($this->auth->acl_get('f_report', $forum_id)) ? append_sid("{$this->phpbb_root_path}report.$this->php_ext", 'f=' . $forum_id . '&p=' . $post_id) : ''; |
|
| 236 | + return ($this->auth->acl_get('f_report', $forum_id)) ? append_sid("{$this->phpbb_root_path}report.$this->php_ext", 'f='.$forum_id.'&p='.$post_id) : ''; |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | /** |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | */ |
| 255 | 255 | public function mcp_report($forum_id, $post_id) |
| 256 | 256 | { |
| 257 | - return ($this->auth->acl_get('m_report', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $post_id, true, $this->user->session_id) : ''; |
|
| 257 | + return ($this->auth->acl_get('m_report', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f='.$forum_id.'&p='.$post_id, true, $this->user->session_id) : ''; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | /** |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | public function mcp_approve($forum_id, $post_id) |
| 266 | 266 | { |
| 267 | - return ($this->auth->acl_get('m_approve', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $post_id, true, $this->user->session_id) : ''; |
|
| 267 | + return ($this->auth->acl_get('m_approve', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=approve_details&f='.$forum_id.'&p='.$post_id, true, $this->user->session_id) : ''; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | public function mcp_approve_action($forum_id, $post_id, $viewtopic_url) |
| 277 | 277 | { |
| 278 | - return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p=$post_id&f=$forum_id&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $post_id . '#p' . $post_id))); |
|
| 278 | + return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p=$post_id&f=$forum_id&redirect=".urlencode(str_replace('&', '&', $viewtopic_url.'&p='.$post_id.'#p'.$post_id))); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | /** |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | */ |
| 287 | 287 | public function mcp_restore($forum_id, $post_id, $topic_visibility) |
| 288 | 288 | { |
| 289 | - return ($this->auth->acl_get('m_approve', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=' . (($topic_visibility !== ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics') . '&f=' . $forum_id . '&p=' . $post_id, true, $this->user->session_id) : ''; |
|
| 289 | + return ($this->auth->acl_get('m_approve', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode='.(($topic_visibility !== ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics').'&f='.$forum_id.'&p='.$post_id, true, $this->user->session_id) : ''; |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function mcp_notes($poster_id) |
| 297 | 297 | { |
| 298 | - return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u=' . $poster_id, true, $this->user->session_id) : ''; |
|
| 298 | + return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u='.$poster_id, true, $this->user->session_id) : ''; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -306,6 +306,6 @@ discard block |
||
| 306 | 306 | */ |
| 307 | 307 | public function mcp_warn($forum_id, $post_id, $poster_id) |
| 308 | 308 | { |
| 309 | - return ($this->auth->acl_get('m_warn') && $poster_id !== $this->user->data['user_id'] && $poster_id !== ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $post_id, true, $this->user->session_id) : ''; |
|
| 309 | + return ($this->auth->acl_get('m_warn') && $poster_id !== $this->user->data['user_id'] && $poster_id !== ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f='.$forum_id.'&p='.$post_id, true, $this->user->session_id) : ''; |
|
| 310 | 310 | } |
| 311 | 311 | } |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | return new \Twig_Source($source, $name); |
| 90 | 90 | } |
| 91 | - */ |
|
| 91 | + */ |
|
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * Twig_ExistsLoaderInterface as of Twig 1.11 |
@@ -127,8 +127,7 @@ |
||
| 127 | 127 | { |
| 128 | 128 | $data = $this->blocks_data[$id]; |
| 129 | 129 | $column_name = 'block_tpl'; |
| 130 | - } |
|
| 131 | - else |
|
| 130 | + } else |
|
| 132 | 131 | { |
| 133 | 132 | $data = $this->content_types[$id]; |
| 134 | 133 | $column_name = $view . '_tpl'; |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | else |
| 132 | 132 | { |
| 133 | 133 | $data = $this->content_types[$id]; |
| 134 | - $column_name = $view . '_tpl'; |
|
| 134 | + $column_name = $view.'_tpl'; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | $return = array( |
@@ -272,16 +272,13 @@ |
||
| 272 | 272 | if ($topic_deleted) |
| 273 | 273 | { |
| 274 | 274 | $topic_status = 'deleted'; |
| 275 | - } |
|
| 276 | - else if ($topic_unapproved) |
|
| 275 | + } else if ($topic_unapproved) |
|
| 277 | 276 | { |
| 278 | 277 | $topic_status = 'unapproved'; |
| 279 | - } |
|
| 280 | - else if ($row['topic_time'] > time()) |
|
| 278 | + } else if ($row['topic_time'] > time()) |
|
| 281 | 279 | { |
| 282 | 280 | $topic_status = 'scheduled'; |
| 283 | - } |
|
| 284 | - else |
|
| 281 | + } else |
|
| 285 | 282 | { |
| 286 | 283 | $topic_status = $this->filter_topic_types_ary[$row['topic_type']]; |
| 287 | 284 | } |
@@ -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'); |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | $filter_topic_status = $this->apply_status_filter($sql_where_array); |
| 104 | 104 | $filter_content_type = $this->apply_content_type_filter(); |
| 105 | 105 | |
| 106 | - $callable = 'init_' . $mode . '_mode'; |
|
| 107 | - $this->base_url = $u_action . (sizeof($this->params) ? '&' : ''); |
|
| 106 | + $callable = 'init_'.$mode.'_mode'; |
|
| 107 | + $this->base_url = $u_action.(sizeof($this->params) ? '&' : ''); |
|
| 108 | 108 | $this->$callable($content_types, $sql_where_array); |
| 109 | 109 | |
| 110 | 110 | $this->forum->query() |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $topic_tracking_info = $this->forum->get_topic_tracking_info(); |
| 136 | 136 | |
| 137 | 137 | $topics_data = array_values($topics_data); |
| 138 | - $base_url = $u_action . http_build_query($this->params); |
|
| 138 | + $base_url = $u_action.http_build_query($this->params); |
|
| 139 | 139 | |
| 140 | 140 | for ($i = 0, $size = sizeof($topics_data); $i < $size; $i++) |
| 141 | 141 | { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | return array( |
| 172 | 172 | 'ATTACH_ICON_IMG' => $this->get_attachment_icon($row), |
| 173 | - 'U_REVIEW_TOPIC' => $u_action . "&do=view&type=$content_type&t=" . $row['topic_id'], |
|
| 173 | + 'U_REVIEW_TOPIC' => $u_action."&do=view&type=$content_type&t=".$row['topic_id'], |
|
| 174 | 174 | 'U_DELETE' => $this->get_delete_url($mode, $u_action, $row, $post_row), |
| 175 | 175 | ); |
| 176 | 176 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | 'S_CAN_MAKE_NORMAL' => ($s_can_make_sticky || $s_can_make_announce), |
| 197 | 197 | 'S_CAN_MAKE_STICKY' => $s_can_make_sticky, |
| 198 | 198 | 'S_CAN_MAKE_ANNOUNCE' => $s_can_make_announce, |
| 199 | - 'U_MCP_ACTION' => $this->base_url . '&do=moderate&redirect=' . $this->get_redirect_url($this->base_url), |
|
| 199 | + 'U_MCP_ACTION' => $this->base_url.'&do=moderate&redirect='.$this->get_redirect_url($this->base_url), |
|
| 200 | 200 | )); |
| 201 | 201 | } |
| 202 | 202 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | protected function init_ucp_mode(array $content_types, array &$sql_where_array) |
| 208 | 208 | { |
| 209 | - $sql_where_array[] = 't.topic_poster = ' . (int) $this->user->data['user_id']; |
|
| 209 | + $sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id']; |
|
| 210 | 210 | |
| 211 | 211 | // list all content types that the user can post in |
| 212 | 212 | $postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true)); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $this->template->assign_block_vars('postable', array( |
| 219 | 219 | 'TYPE' => $entity->get_content_langname(), |
| 220 | 220 | 'COLOUR' => $entity->get_content_colour(), |
| 221 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&f=' . $entity->get_forum_id()), |
|
| 221 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&f='.$entity->get_forum_id()), |
|
| 222 | 222 | )); |
| 223 | 223 | } |
| 224 | 224 | } |
@@ -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 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | if ($mode === 'mcp') |
| 317 | 317 | { |
| 318 | 318 | $u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id); |
| 319 | - $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 | + $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; |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | return array( |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id) |
| 334 | 334 | { |
| 335 | - 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 | + 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) : ''; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | if ($mode === 'mcp') |
| 350 | 350 | { |
| 351 | 351 | $redirect_url = $this->get_redirect_url($u_action); |
| 352 | - $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 | + $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); |
|
| 353 | 353 | } |
| 354 | 354 | } |
| 355 | 355 | |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | */ |
| 363 | 363 | protected function get_redirect_url($base_url) |
| 364 | 364 | { |
| 365 | - $base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : ''; |
|
| 365 | + $base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : ''; |
|
| 366 | 366 | return urlencode(str_replace('&', '&', $base_url)); |
| 367 | 367 | } |
| 368 | 368 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * @param \blitze\content\services\helper $helper Content helper object |
| 47 | 47 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
| 48 | 48 | * @param string $php_ext php file extension |
| 49 | - */ |
|
| 49 | + */ |
|
| 50 | 50 | public function __construct(\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, $phpbb_root_path, $php_ext) |
| 51 | 51 | { |
| 52 | 52 | $this->language = $language; |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | for ($i = 0, $size = sizeof($topics_data); $i < $size; $i++) |
| 123 | 123 | { |
| 124 | - $topic_data = $topics_data[$i]; |
|
| 124 | + $topic_data = $topics_data[$i]; |
|
| 125 | 125 | $topic_id = $topic_data['topic_id']; |
| 126 | - $post_data = array_shift($posts_data[$topic_id]); |
|
| 126 | + $post_data = array_shift($posts_data[$topic_id]); |
|
| 127 | 127 | |
| 128 | 128 | $tpl_data = array_merge( |
| 129 | 129 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -214,8 +214,8 @@ discard block |
||
| 214 | 214 | $this->pagination->generate_template_pagination( |
| 215 | 215 | array( |
| 216 | 216 | 'routes' => array( |
| 217 | - 'blitze_content_' . $route, |
|
| 218 | - 'blitze_content_' . $route . '_page', |
|
| 217 | + 'blitze_content_'.$route, |
|
| 218 | + 'blitze_content_'.$route.'_page', |
|
| 219 | 219 | ), |
| 220 | 220 | 'params' => $params, |
| 221 | 221 | ), |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | 'L_USER_ABOUT' => $this->language->lang('AUTHOR_INFO_EXPLAIN', $user_cache['username_full'], $user_cache['joined'], $user_content_topics, $content_langname, $user_cache['posts']), |
| 247 | 247 | 'L_USER_VIEW_ALL' => $this->language->lang('VIEW_AUTHOR_CONTENTS', $content_langname, $user_cache['username']), |
| 248 | 248 | 'L_SEARCH_USER_POSTS' => $this->language->lang('SEARCH_USER_POSTS', $user_cache['username']), |
| 249 | - 'U_SEARCH_CONTENTS' => append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$user_cache['username']}&" . urlencode('fid[]') . "=$forum_id&sc=0&sf=titleonly&sr=topics") |
|
| 249 | + 'U_SEARCH_CONTENTS' => append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$user_cache['username']}&".urlencode('fid[]')."=$forum_id&sc=0&sf=titleonly&sr=topics") |
|
| 250 | 250 | ))); |
| 251 | 251 | } |
| 252 | 252 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | ->fetch_forum($topic_data['forum_id']) |
| 267 | 267 | ->fetch_topic_poster($topic_data['topic_poster']) |
| 268 | 268 | ->fetch_custom(array( |
| 269 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
| 269 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
| 270 | 270 | ))->build(true, true, false); |
| 271 | 271 | |
| 272 | 272 | $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 string $phpbb_root_path Path to the phpbb includes directory. |
| 28 | 28 | * @param string $php_ext php file extension |
| 29 | - */ |
|
| 29 | + */ |
|
| 30 | 30 | public function __construct(\phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\request\request_interface $request, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, $phpbb_root_path, $php_ext) |
| 31 | 31 | { |
| 32 | 32 | parent::__construct($language, $pagination, $template, $fields, $forum, $helper, $phpbb_root_path, $php_ext); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | * @param \blitze\content\services\fields $fields Content fields object |
| 45 | 45 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
| 46 | 46 | * @param string $php_ext php file extension |
| 47 | - */ |
|
| 47 | + */ |
|
| 48 | 48 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\language\language $language, \blitze\content\services\types $content_types, \blitze\content\services\fields $fields, $phpbb_root_path, $php_ext) |
| 49 | 49 | { |
| 50 | 50 | $this->db = $db; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | public function modify_posts_data(\phpbb\event\data $event) |
| 95 | 95 | { |
| 96 | 96 | $sql_array = $event['sql_array']; |
| 97 | - $sql_array['WHERE'] .= ' AND t.topic_time <= ' . time(); |
|
| 97 | + $sql_array['WHERE'] .= ' AND t.topic_time <= '.time(); |
|
| 98 | 98 | |
| 99 | 99 | $sql_count = $sql_array; |
| 100 | 100 | $sql_count['SELECT'] = 'COUNT(p.post_id) AS total_results'; |
@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | public function modify_topic_data(\phpbb\event\data $event) |
| 116 | 116 | { |
| 117 | 117 | $sql_where = $event['sql_where']; |
| 118 | - $sql_where .= ' AND t.topic_time <= ' . time(); |
|
| 118 | + $sql_where .= ' AND t.topic_time <= '.time(); |
|
| 119 | 119 | |
| 120 | - $sql = 'SELECT COUNT(t.topic_id) AS total_results FROM ' . $event['sql_from'] . ' WHERE ' . $sql_where; |
|
| 120 | + $sql = 'SELECT COUNT(t.topic_id) AS total_results FROM '.$event['sql_from'].' WHERE '.$sql_where; |
|
| 121 | 121 | $result = $this->db->sql_query($sql); |
| 122 | 122 | $total_results = $this->db->sql_fetchfield('total_results'); |
| 123 | 123 | $this->db->sql_freeresult($result); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function add_viewonline_location(\phpbb\event\data $event) |
| 214 | 214 | { |
| 215 | - if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/content/') === 0) |
|
| 215 | + if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/content/') === 0) |
|
| 216 | 216 | { |
| 217 | 217 | $types = join('|', $this->content_types->get_forum_types()); |
| 218 | 218 | preg_match("/\/content\/($types)(\/[0-9]\/.*)?/is", $event['row']['session_page'], $match); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * Constructor |
| 24 | 24 | * |
| 25 | 25 | * @param \blitze\content\services\builder $builder Form builder object |
| 26 | - */ |
|
| 26 | + */ |
|
| 27 | 27 | public function __construct(\blitze\content\services\builder $builder) |
| 28 | 28 | { |
| 29 | 29 | $this->builder = $builder; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @param \phpbb\language\language $language Language object |
| 24 | 24 | * @param \blitze\content\services\action_handler $action_handler Handles actions |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | public function __construct(\phpbb\language\language $language, \blitze\content\services\action_handler $action_handler) |
| 27 | 27 | { |
| 28 | 28 | $this->language = $language; |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $command = $this->action_handler->create('topic', $action); |
| 44 | 44 | $command->execute($base_url, 'ucp'); |
| 45 | - } |
|
| 46 | - catch (\blitze\sitemaker\exception\base $e) |
|
| 45 | + } catch (\blitze\sitemaker\exception\base $e) |
|
| 47 | 46 | { |
| 48 | 47 | $message = $e->get_message($this->language); |
| 49 | 48 | trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>')); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | catch (\blitze\sitemaker\exception\base $e) |
| 47 | 47 | { |
| 48 | 48 | $message = $e->get_message($this->language); |
| 49 | - trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>')); |
|
| 49 | + trigger_error($message.'<br /><br />'.$this->language->lang('RETURN_PAGE', '<a href="'.$base_url.'">', '</a>')); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | } |