@@ -283,6 +283,7 @@ |
||
| 283 | 283 | |
| 284 | 284 | /** |
| 285 | 285 | * {@inheritdoc} |
| 286 | + * @param integer $forum_id |
|
| 286 | 287 | */ |
| 287 | 288 | protected function get_filter_sql(array $filters, $forum_id) |
| 288 | 289 | { |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @param \blitze\content\services\helper $helper Content helper object |
| 51 | 51 | * @param \blitze\content\services\quickmod $quickmod Quick moderator tools |
| 52 | 52 | * @param \blitze\content\services\topic\blocks_factory $topic_blocks_factory Topic blocks factory object |
| 53 | - */ |
|
| 53 | + */ |
|
| 54 | 54 | 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, \blitze\content\services\topic\blocks_factory $topic_blocks_factory) |
| 55 | 55 | { |
| 56 | 56 | $this->phpbb_dispatcher = $phpbb_dispatcher; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | foreach ($posts_data as $topic_id => $posts) |
| 141 | 141 | { |
| 142 | - $post_data = array_shift($posts); |
|
| 142 | + $post_data = array_shift($posts); |
|
| 143 | 143 | $topic_data = $topics_data[$topic_id]; |
| 144 | 144 | $topic_data = array_merge( |
| 145 | 145 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -253,8 +253,8 @@ discard block |
||
| 253 | 253 | $this->pagination->generate_template_pagination( |
| 254 | 254 | array( |
| 255 | 255 | 'routes' => array( |
| 256 | - 'blitze_content_' . $route_type, |
|
| 257 | - 'blitze_content_' . $route_type . '_page', |
|
| 256 | + 'blitze_content_'.$route_type, |
|
| 257 | + 'blitze_content_'.$route_type.'_page', |
|
| 258 | 258 | ), |
| 259 | 259 | 'params' => $params, |
| 260 | 260 | ), |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * @param \phpbb\controller\helper $helper Controller helper class |
| 41 | 41 | * @param \phpbb\template\template $template Template object |
| 42 | 42 | * @param \blitze\content\services\form\builder $builder Form builder object |
| 43 | - */ |
|
| 43 | + */ |
|
| 44 | 44 | public function __construct(\phpbb\controller\helper $helper, \phpbb\template\template $template, \blitze\content\services\form\builder $builder) |
| 45 | 45 | { |
| 46 | 46 | $this->helper = $helper; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $this->board_url = generate_board_url(true); |
| 99 | 99 | $this->display_mode = $view_mode; |
| 100 | - $this->tpl_name = ($custom_tpl) ? $tpl_name ?: $this->content_type . '_' . $view_mode : ''; |
|
| 100 | + $this->tpl_name = ($custom_tpl) ? $tpl_name ?: $this->content_type.'_'.$view_mode : ''; |
|
| 101 | 101 | $this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary'; |
| 102 | 102 | $this->db_fields = $db_fields; |
| 103 | 103 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | 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 = '') |
| 122 | 122 | { |
| 123 | - $callable = 'get_' . $this->view_mode . '_template_data'; |
|
| 123 | + $callable = 'get_'.$this->view_mode.'_template_data'; |
|
| 124 | 124 | $tpl_data = array_merge(array( |
| 125 | 125 | 'TOPIC_COMMENTS' => $this->comments->count($topic_data), |
| 126 | 126 | 'S_USER_LOGGED_IN' => $this->user->data['is_registered'], |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $topic_data_overwrite |
| 130 | 130 | ); |
| 131 | 131 | |
| 132 | - $tpl_data['PERMA_LINK'] = $this->board_url . parse_url($tpl_data['TOPIC_URL'], PHP_URL_PATH); |
|
| 132 | + $tpl_data['PERMA_LINK'] = $this->board_url.parse_url($tpl_data['TOPIC_URL'], PHP_URL_PATH); |
|
| 133 | 133 | |
| 134 | 134 | return $this->build_content($tpl_data); |
| 135 | 135 | } |
@@ -207,21 +207,21 @@ discard block |
||
| 207 | 207 | $field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']); |
| 208 | 208 | $field_data['field_value'] = &$field_values[$field_name]; |
| 209 | 209 | |
| 210 | - $field_contents = $this->form_fields[$field_type]->display_field($field_data, $tpl_data, $this->display_mode); |
|
| 210 | + $field_contents = $this->form_fields[$field_type]->display_field($field_data, $tpl_data, $this->display_mode); |
|
| 211 | 211 | |
| 212 | 212 | // this essentially hides other fields if the field returns an array |
| 213 | 213 | if (is_array($field_contents)) |
| 214 | 214 | { |
| 215 | 215 | $display_data['all'] = $field_contents; |
| 216 | - $display_data[$field_data['field_' . $this->view_mode . '_show']] = $field_contents; |
|
| 216 | + $display_data[$field_data['field_'.$this->view_mode.'_show']] = $field_contents; |
|
| 217 | 217 | break; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | if (!empty($field_contents)) |
| 221 | 221 | { |
| 222 | - $field = $this->get_field_label($field_data['field_' . $this->view_mode . '_ldisp'], $field_data['field_label']) . $field_contents; |
|
| 222 | + $field = $this->get_field_label($field_data['field_'.$this->view_mode.'_ldisp'], $field_data['field_label']).$field_contents; |
|
| 223 | 223 | $display_data['all'][$field_name] = $field; |
| 224 | - $display_data[$field_data['field_' . $this->view_mode . '_show']][$field_name] = $field; |
|
| 224 | + $display_data[$field_data['field_'.$this->view_mode.'_show']][$field_name] = $field; |
|
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $html = ''; |
| 239 | 239 | if ($label_type) |
| 240 | 240 | { |
| 241 | - $html = '<div class="field-label ' . $this->label[$label_type] . '">' . $label_text . $this->language->lang('COLON') . ' </div>'; |
|
| 241 | + $html = '<div class="field-label '.$this->label[$label_type].'">'.$label_text.$this->language->lang('COLON').' </div>'; |
|
| 242 | 242 | } |
| 243 | 243 | return $html; |
| 244 | 244 | } |
@@ -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->template->assign_var('MODE', $mode); |
@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | $filter_topic_status = $this->apply_status_filter($sql_where_array); |
| 106 | 106 | $filter_content_type = $this->apply_content_type_filter(); |
| 107 | 107 | |
| 108 | - $callable = 'init_' . $mode . '_mode'; |
|
| 109 | - $this->base_url = $u_action . (sizeof($this->params) ? '&' : ''); |
|
| 108 | + $callable = 'init_'.$mode.'_mode'; |
|
| 109 | + $this->base_url = $u_action.(sizeof($this->params) ? '&' : ''); |
|
| 110 | 110 | $this->$callable($content_types, $sql_where_array); |
| 111 | 111 | |
| 112 | 112 | $this->forum->query(true, false) |
@@ -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 | ); |
| 175 | 175 | } |
| 176 | 176 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | 'S_CAN_MAKE_NORMAL' => ($s_can_make_sticky || $s_can_make_announce), |
| 196 | 196 | 'S_CAN_MAKE_STICKY' => $s_can_make_sticky, |
| 197 | 197 | 'S_CAN_MAKE_ANNOUNCE' => $s_can_make_announce, |
| 198 | - 'U_MCP_ACTION' => $this->base_url . '&do=moderate&redirect=' . $this->get_redirect_url($this->base_url), |
|
| 198 | + 'U_MCP_ACTION' => $this->base_url.'&do=moderate&redirect='.$this->get_redirect_url($this->base_url), |
|
| 199 | 199 | )); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | protected function init_ucp_mode(array $content_types, array &$sql_where_array) |
| 207 | 207 | { |
| 208 | - $sql_where_array[] = 't.topic_poster = ' . (int) $this->user->data['user_id']; |
|
| 208 | + $sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id']; |
|
| 209 | 209 | |
| 210 | 210 | // list all content types that the user can post in |
| 211 | 211 | $postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true)); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $this->template->assign_block_vars('postable', array( |
| 218 | 218 | 'TYPE' => $entity->get_content_langname(), |
| 219 | 219 | 'COLOUR' => $entity->get_content_colour(), |
| 220 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&f=' . $entity->get_forum_id()), |
|
| 220 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&f='.$entity->get_forum_id()), |
|
| 221 | 221 | )); |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | 'CONTENT_TYPE' => $entity->get_content_langname(), |
| 236 | 236 | 'CONTENT_TYPE_COLOR' => $entity->get_content_colour(), |
| 237 | 237 | 'S_COMMENTS' => $entity->get_allow_comments(), |
| 238 | - 'U_CONTENT_TYPE' => $base_url . "&type=$type", |
|
| 238 | + 'U_CONTENT_TYPE' => $base_url."&type=$type", |
|
| 239 | 239 | ); |
| 240 | 240 | } |
| 241 | 241 | |
@@ -285,8 +285,8 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | return array( |
| 288 | - 'TOPIC_STATUS' => $this->language->lang('TOPIC_' . strtoupper($topic_status)), |
|
| 289 | - 'U_TOPIC_STATUS' => $base_url . "&status=$topic_status", |
|
| 288 | + 'TOPIC_STATUS' => $this->language->lang('TOPIC_'.strtoupper($topic_status)), |
|
| 289 | + 'U_TOPIC_STATUS' => $base_url."&status=$topic_status", |
|
| 290 | 290 | ); |
| 291 | 291 | } |
| 292 | 292 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | if ($mode === 'mcp') |
| 314 | 314 | { |
| 315 | 315 | $u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id); |
| 316 | - $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; |
|
| 316 | + $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; |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | return array( |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id) |
| 331 | 331 | { |
| 332 | - 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) : ''; |
|
| 332 | + 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) : ''; |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | /** |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | if ($mode === 'mcp') |
| 347 | 347 | { |
| 348 | 348 | $redirect_url = $this->get_redirect_url($u_action); |
| 349 | - $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); |
|
| 349 | + $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); |
|
| 350 | 350 | } |
| 351 | 351 | } |
| 352 | 352 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | */ |
| 360 | 360 | protected function get_redirect_url($base_url) |
| 361 | 361 | { |
| 362 | - $base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : ''; |
|
| 362 | + $base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : ''; |
|
| 363 | 363 | return urlencode(str_replace('&', '&', $base_url)); |
| 364 | 364 | } |
| 365 | 365 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | * @param string $phpbb_admin_path Relative admin root path |
| 78 | 78 | * @param string $php_ext php file extension |
| 79 | 79 | * @param boolean $auto_refresh Used for testing |
| 80 | - */ |
|
| 80 | + */ |
|
| 81 | 81 | public function __construct(\phpbb\auth\auth $auth, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\log\log_interface $logger, \phpbb\request\request_interface $request, \phpbb\user $user, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $mapper_factory, $phpbb_admin_path, $php_ext, $auto_refresh = true) |
| 82 | 82 | { |
| 83 | 83 | $this->auth = $auth; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
| 36 | 36 | * @param \blitze\content\services\types $content_types Content types object |
| 37 | 37 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
| 38 | - */ |
|
| 38 | + */ |
|
| 39 | 39 | public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \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\topic\blocks_factory $topic_blocks_factory, \blitze\content\services\views\views_factory $views_factory, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory) |
| 40 | 40 | { |
| 41 | 41 | parent::__construct($auth, $controller_helper, $language, $template, $user, $auto_lang, $fields_factory, $topic_blocks_factory, $views_factory); |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
| 56 | 56 | * @param \blitze\content\services\topic\blocks_factory $topic_blocks_factory Topic blocks factory object |
| 57 | 57 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
| 58 | - */ |
|
| 58 | + */ |
|
| 59 | 59 | public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \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\topic\blocks_factory $topic_blocks_factory, \blitze\content\services\views\views_factory $views_factory) |
| 60 | 60 | { |
| 61 | 61 | $this->auth = $auth; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'TOPIC_BLOCK_OPS' => $this->topic_blocks_factory->get_all(), |
| 91 | 91 | 'ITEMS_PER_PAGE' => 10, |
| 92 | 92 | |
| 93 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
| 93 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
| 94 | 94 | 'UA_AJAX_URL' => $this->controller_helper->route('blitze_content_field_settings', array(), false), |
| 95 | 95 | |
| 96 | 96 | 'S_TYPE_OPS' => $this->get_field_options(), |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $options = ''; |
| 112 | 112 | foreach ($fields as $field => $object) |
| 113 | 113 | { |
| 114 | - $options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>'; |
|
| 114 | + $options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | return $options; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * @param \phpbb\template\template $template Template object |
| 31 | 31 | * @param \blitze\content\services\fields $fields Content fields object |
| 32 | 32 | * @param \blitze\sitemaker\services\forum\data $forum Forum Data object |
| 33 | - */ |
|
| 33 | + */ |
|
| 34 | 34 | public function __construct(\phpbb\language\language $language, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum) |
| 35 | 35 | { |
| 36 | 36 | $this->language = $language; |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | ->fetch_forum($topic_data['forum_id']) |
| 69 | 69 | ->fetch_topic_poster($topic_data['topic_poster']) |
| 70 | 70 | ->fetch_custom(array( |
| 71 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
| 71 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
| 72 | 72 | ))->build(true, true, false); |
| 73 | 73 | |
| 74 | 74 | $topics_data = $this->forum->get_topic_data(5); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * @param \phpbb\template\template $template Template object |
| 31 | 31 | * @param \blitze\sitemaker\services\forum\data $forum Forum Data object |
| 32 | 32 | * @param \blitze\content\services\helper $helper Content helper object |
| 33 | - */ |
|
| 33 | + */ |
|
| 34 | 34 | public function __construct(\phpbb\language\language $language, \phpbb\template\template $template, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper) |
| 35 | 35 | { |
| 36 | 36 | $this->language = $language; |