@@ -280,8 +280,7 @@ discard block |
||
280 | 280 | if (!$field_data['field_mod_only'] || $this->mode === 'mcp') |
281 | 281 | { |
282 | 282 | $this->form->add($field, $field_data['field_type'], $field_data, $topic_id); |
283 | - } |
|
284 | - else if (!empty($field_data['field_value'])) |
|
283 | + } else if (!empty($field_data['field_value'])) |
|
285 | 284 | { |
286 | 285 | $this->form->add($field, 'hidden', $field_data, $topic_id); |
287 | 286 | } |
@@ -333,8 +332,7 @@ discard block |
||
333 | 332 | { |
334 | 333 | $sql_data['topic_visibility'] = $force_status; |
335 | 334 | } |
336 | - } |
|
337 | - else |
|
335 | + } else |
|
338 | 336 | { |
339 | 337 | if ($this->force_state()) |
340 | 338 | { |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | { |
100 | 100 | $toc_pattern = '(<h4>(.*?)</h4>)?'; |
101 | 101 | $pages_pattern = '<p><!-- pagebreak --></p>'; |
102 | - $split_pattern = $pages_pattern . (($view_mode !== 'detail') ? $toc_pattern : ''); |
|
102 | + $split_pattern = $pages_pattern.(($view_mode !== 'detail') ? $toc_pattern : ''); |
|
103 | 103 | |
104 | - $pages = array_filter(preg_split('#' . $split_pattern . '#s', $data['field_value'])); |
|
104 | + $pages = array_filter(preg_split('#'.$split_pattern.'#s', $data['field_value'])); |
|
105 | 105 | |
106 | 106 | if ($view_mode !== 'detail') |
107 | 107 | { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | // get page titles to generate TOC |
112 | - preg_match_all('#' . $pages_pattern . $toc_pattern . '#s', $data['field_value'], $matches); |
|
112 | + preg_match_all('#'.$pages_pattern.$toc_pattern.'#s', $data['field_value'], $matches); |
|
113 | 113 | |
114 | 114 | return $this->get_detail_value($pages, $matches[2], $data); |
115 | 115 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $asset_path = $this->util->get_web_path(); |
125 | 125 | $this->util->add_assets(array( |
126 | 126 | 'js' => array( |
127 | - $asset_path . 'assets/javascript/editor.js', |
|
127 | + $asset_path.'assets/javascript/editor.js', |
|
128 | 128 | '@blitze_content/assets/form/textarea.min.js' |
129 | 129 | ) |
130 | 130 | )); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $this->template->assign_block_vars('toc', array( |
233 | 233 | 'TITLE' => ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'), |
234 | 234 | 'S_PAGE' => ($page === $start), |
235 | - 'U_VIEW' => append_sid($topic_url, ($page) ? 'page=' . $page : false), |
|
235 | + 'U_VIEW' => append_sid($topic_url, ($page) ? 'page='.$page : false), |
|
236 | 236 | )); |
237 | 237 | } |
238 | 238 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | // Assigning custom bbcodes |
283 | 283 | if (!function_exists('display_custom_bbcodes')) |
284 | 284 | { |
285 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
285 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | display_custom_bbcodes(); |
@@ -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($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($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 | /** |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $cp_param = ''; |
243 | 243 | if ($topic_data['topic_first_post_id'] == $post_data['post_id']) |
244 | 244 | { |
245 | - $cp_param = '&cp=' . ((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
245 | + $cp_param = '&cp='.((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
246 | 246 | } |
247 | 247 | return $cp_param; |
248 | 248 | } |
@@ -222,8 +222,7 @@ |
||
222 | 222 | if ($topic_id) |
223 | 223 | { |
224 | 224 | $u_mcp = append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", "i=mcp_main&mode=topic_view&f=$forum_id&t=$topic_id", true, $this->user->session_id); |
225 | - } |
|
226 | - else |
|
225 | + } else |
|
227 | 226 | { |
228 | 227 | $u_mcp = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=-blitze-content-mcp-content_module&mode=content', true, $this->user->session_id); |
229 | 228 | } |
@@ -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); |
@@ -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(); |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | $topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0; |
173 | 173 | |
174 | 174 | $sql = 'SELECT post_id, topic_id, forum_id |
175 | - FROM ' . POSTS_TABLE . " |
|
175 | + FROM ' . POSTS_TABLE." |
|
176 | 176 | WHERE topic_id = $topic_id |
177 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id) . " |
|
177 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id)." |
|
178 | 178 | AND post_time > $topic_last_read |
179 | 179 | AND forum_id = $forum_id |
180 | 180 | ORDER BY post_time ASC, post_id ASC"; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | if ($row) |
186 | 186 | { |
187 | - redirect(append_sid($topic_data['topic_url'], 'p=' . $row['post_id']) . '#p' . $row['post_id']); |
|
187 | + redirect(append_sid($topic_data['topic_url'], 'p='.$row['post_id']).'#p'.$row['post_id']); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $start = $this->pagination->validate_start($start, $this->config['posts_per_page'], $topic_data['total_comments']); |
212 | 212 | $this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $topic_data['total_comments'], $this->config['posts_per_page'], $start); |
213 | 213 | |
214 | - $data =& $this->template_context->get_data_ref(); |
|
214 | + $data = & $this->template_context->get_data_ref(); |
|
215 | 215 | foreach ($data['pagination'] as &$row) |
216 | 216 | { |
217 | 217 | $row['PAGE_URL'] .= '#comments'; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | protected function get_prev_posts_count($forum_id, $topic_id, $post_id, $sort_dir) |
274 | 274 | { |
275 | 275 | $sql = 'SELECT post_id, post_time, post_visibility |
276 | - FROM ' . POSTS_TABLE . " p |
|
276 | + FROM ' . POSTS_TABLE." p |
|
277 | 277 | WHERE p.topic_id = $topic_id |
278 | 278 | AND p.post_id = $post_id"; |
279 | 279 | $result = $this->db->sql_query($sql); |
@@ -281,9 +281,9 @@ discard block |
||
281 | 281 | $this->db->sql_freeresult($result); |
282 | 282 | |
283 | 283 | $sql = 'SELECT COUNT(p.post_id) AS prev_posts |
284 | - FROM ' . POSTS_TABLE . " p |
|
284 | + FROM ' . POSTS_TABLE." p |
|
285 | 285 | WHERE p.topic_id = $topic_id |
286 | - AND " . $this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
286 | + AND ".$this->content_visibility->get_visibility_sql('post', $forum_id, 'p.'); |
|
287 | 287 | |
288 | 288 | if ($sort_dir == 'd') |
289 | 289 | { |
@@ -310,11 +310,11 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function set_sorting_options(&$sort_days, &$sort_key, &$sort_dir, &$u_sort_param) |
312 | 312 | { |
313 | - $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
313 | + $default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0; |
|
314 | 314 | $default_sort_key = (!empty($this->user->data['user_post_sortby_type'])) ? $this->user->data['user_post_sortby_type'] : 't'; |
315 | 315 | $default_sort_dir = (!empty($this->user->data['user_post_sortby_dir'])) ? $this->user->data['user_post_sortby_dir'] : 'a'; |
316 | 316 | |
317 | - $sort_days = $this->request->variable('st', $default_sort_days); |
|
317 | + $sort_days = $this->request->variable('st', $default_sort_days); |
|
318 | 318 | $sort_key = $this->request->variable('sk', $default_sort_key); |
319 | 319 | $sort_dir = $this->request->variable('sd', $default_sort_dir); |
320 | 320 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | */ |
377 | 377 | protected function get_post_display_lang(array $row, $topic_url) |
378 | 378 | { |
379 | - return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . append_sid($topic_url, "p={$row['post_id']}&view=show") . "#p{$row['post_id']}" . '">', '</a>') : ''; |
|
379 | + return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$row['post_id'].'" href="'.append_sid($topic_url, "p={$row['post_id']}&view=show")."#p{$row['post_id']}".'">', '</a>') : ''; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | /** |
@@ -386,6 +386,6 @@ discard block |
||
386 | 386 | */ |
387 | 387 | protected function set_form_action($topic_url, $start) |
388 | 388 | { |
389 | - $this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")) . '#comments'); |
|
389 | + $this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")).'#comments'); |
|
390 | 390 | } |
391 | 391 | } |
@@ -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'); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | $filter_topic_status = $this->apply_status_filter($sql_where_array); |
107 | 107 | $filter_content_type = $this->apply_content_type_filter(); |
108 | 108 | |
109 | - $callable = 'init_' . $mode . '_mode'; |
|
110 | - $this->base_url = $u_action . (sizeof($this->params) ? '&' : ''); |
|
109 | + $callable = 'init_'.$mode.'_mode'; |
|
110 | + $this->base_url = $u_action.(sizeof($this->params) ? '&' : ''); |
|
111 | 111 | $this->$callable($content_types, $sql_where_array); |
112 | 112 | |
113 | 113 | $this->forum->query() |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $topic_tracking_info = $this->forum->get_topic_tracking_info(); |
139 | 139 | |
140 | 140 | $topics_data = array_values($topics_data); |
141 | - $base_url = $u_action . http_build_query($this->params); |
|
141 | + $base_url = $u_action.http_build_query($this->params); |
|
142 | 142 | |
143 | 143 | for ($i = 0, $size = sizeof($topics_data); $i < $size; $i++) |
144 | 144 | { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | { |
173 | 173 | return array( |
174 | 174 | 'ATTACH_ICON_IMG' => $this->get_attachment_icon($row), |
175 | - 'U_REVIEW_TOPIC' => $u_action . "&do=view&type=$content_type&t=" . $row['topic_id'], |
|
175 | + 'U_REVIEW_TOPIC' => $u_action."&do=view&type=$content_type&t=".$row['topic_id'], |
|
176 | 176 | 'U_DELETE' => $this->get_delete_url($mode, $u_action, $row, $post_row), |
177 | 177 | ); |
178 | 178 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | 'S_CAN_MAKE_NORMAL' => ($s_can_make_sticky || $s_can_make_announce), |
199 | 199 | 'S_CAN_MAKE_STICKY' => $s_can_make_sticky, |
200 | 200 | 'S_CAN_MAKE_ANNOUNCE' => $s_can_make_announce, |
201 | - 'U_MCP_ACTION' => $this->base_url . '&do=moderate&redirect=' . $this->get_redirect_url($this->base_url), |
|
201 | + 'U_MCP_ACTION' => $this->base_url.'&do=moderate&redirect='.$this->get_redirect_url($this->base_url), |
|
202 | 202 | )); |
203 | 203 | } |
204 | 204 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | protected function init_ucp_mode(array $content_types, array &$sql_where_array) |
210 | 210 | { |
211 | - $sql_where_array[] = 't.topic_poster = ' . (int) $this->user->data['user_id']; |
|
211 | + $sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id']; |
|
212 | 212 | |
213 | 213 | // list all content types that the user can post in |
214 | 214 | $postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true)); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $this->template->assign_block_vars('postable', array( |
221 | 221 | 'TYPE' => $entity->get_content_langname(), |
222 | 222 | 'COLOUR' => $entity->get_content_colour(), |
223 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&f=' . $entity->get_forum_id()), |
|
223 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&f='.$entity->get_forum_id()), |
|
224 | 224 | )); |
225 | 225 | } |
226 | 226 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | 'CONTENT_TYPE' => $entity->get_content_langname(), |
239 | 239 | 'CONTENT_TYPE_COLOR' => $entity->get_content_colour(), |
240 | 240 | 'S_COMMENTS' => $entity->get_allow_comments(), |
241 | - 'U_CONTENT_TYPE' => $base_url . "&type=$type", |
|
241 | + 'U_CONTENT_TYPE' => $base_url."&type=$type", |
|
242 | 242 | ); |
243 | 243 | } |
244 | 244 | |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | return array( |
291 | - 'TOPIC_STATUS' => $this->language->lang('TOPIC_' . strtoupper($topic_status)), |
|
292 | - 'U_TOPIC_STATUS' => $base_url . "&status=$topic_status", |
|
291 | + 'TOPIC_STATUS' => $this->language->lang('TOPIC_'.strtoupper($topic_status)), |
|
292 | + 'U_TOPIC_STATUS' => $base_url."&status=$topic_status", |
|
293 | 293 | ); |
294 | 294 | } |
295 | 295 | |
@@ -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 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $this->template = $template; |
53 | 53 | $this->content_types = $content_types; |
54 | 54 | $this->phpbb_root_path = $phpbb_root_path; |
55 | - $this->phpbb_admin_path = $this->phpbb_root_path . $relative_admin_path; |
|
55 | + $this->phpbb_admin_path = $this->phpbb_root_path.$relative_admin_path; |
|
56 | 56 | $this->php_ext = $php_ext; |
57 | 57 | } |
58 | 58 | |
@@ -76,19 +76,19 @@ discard block |
||
76 | 76 | |
77 | 77 | 'S_ENABLED' => $entity->get_content_enabled(), |
78 | 78 | |
79 | - 'U_DELETE' => $u_action . '&do=pre_delete&type=' . $type, |
|
80 | - 'U_EDIT' => $u_action . '&do=edit&type=' . $type, |
|
81 | - 'U_STATUS' => $u_action . '&do=toggle_status&type=' . $type, |
|
79 | + 'U_DELETE' => $u_action.'&do=pre_delete&type='.$type, |
|
80 | + 'U_EDIT' => $u_action.'&do=edit&type='.$type, |
|
81 | + 'U_STATUS' => $u_action.'&do=toggle_status&type='.$type, |
|
82 | 82 | 'U_VIEW' => $this->controller_helper->route('blitze_content_index', array('type' => $type)), |
83 | - 'U_POST' => append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, "mode=post&f=$forum_id"), |
|
84 | - 'U_GROUP_PERMS' => append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_group_global"), |
|
85 | - 'U_FORUM_PERMS' => append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"), |
|
83 | + 'U_POST' => append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, "mode=post&f=$forum_id"), |
|
84 | + 'U_GROUP_PERMS' => append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_group_global"), |
|
85 | + 'U_FORUM_PERMS' => append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"), |
|
86 | 86 | ); |
87 | 87 | } |
88 | 88 | |
89 | 89 | $this->template->assign_vars(array( |
90 | 90 | 'TYPES' => $types_list, |
91 | - 'U_ADD_TYPE' => $u_action . "&do=add", |
|
91 | + 'U_ADD_TYPE' => $u_action."&do=add", |
|
92 | 92 | )); |
93 | 93 | } |
94 | 94 | } |