@@ -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 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | public function get_info_url(array $post_data) |
| 86 | 86 | { |
| 87 | 87 | $forum_id = $post_data['forum_id']; |
| 88 | - 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) : ''; |
|
| 88 | + 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) : ''; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function get_approve_url(array $post_data, $viewtopic_url) |
| 97 | 97 | { |
| 98 | - 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']))); |
|
| 98 | + 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']))); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public function get_mcp_report_url(array $post_data) |
| 126 | 126 | { |
| 127 | - 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) : ''; |
|
| 127 | + 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) : ''; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function get_mcp_restore_url(array $post_data, array $topic_data) |
| 136 | 136 | { |
| 137 | - 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) : ''; |
|
| 137 | + 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) : ''; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function get_notes_url(array $post_data) |
| 145 | 145 | { |
| 146 | - 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) : ''; |
|
| 146 | + 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) : ''; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function get_warning_url(array $post_data) |
| 154 | 154 | { |
| 155 | - 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) : ''; |
|
| 155 | + 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) : ''; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $cp_param = ''; |
| 269 | 269 | if ($topic_data['topic_first_post_id'] == $post_data['post_id']) |
| 270 | 270 | { |
| 271 | - $cp_param = '&cp=' . ((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
| 271 | + $cp_param = '&cp='.((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
| 272 | 272 | } |
| 273 | 273 | return $cp_param; |
| 274 | 274 | } |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | |
| 118 | 118 | foreach ($posts_data as $topic_id => $post_data) |
| 119 | 119 | { |
| 120 | - $topic_data = $topics_data[$topic_id]; |
|
| 120 | + $topic_data = $topics_data[$topic_id]; |
|
| 121 | 121 | $topic = $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info); |
| 122 | 122 | |
| 123 | 123 | $this->template->assign_block_vars('topicrow', $topic); |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | $update_count = array(); |
| 149 | 149 | foreach ($posts_data as $topic_id => $posts) |
| 150 | 150 | { |
| 151 | - $post_data = array_shift($posts); |
|
| 152 | - $topic_data = $topics_data[$topic_id]; |
|
| 151 | + $post_data = array_shift($posts); |
|
| 152 | + $topic_data = $topics_data[$topic_id]; |
|
| 153 | 153 | |
| 154 | 154 | $this->template->assign_block_vars('topicrow', array_merge( |
| 155 | 155 | $this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info), |
@@ -249,8 +249,8 @@ discard block |
||
| 249 | 249 | $this->pagination->generate_template_pagination( |
| 250 | 250 | array( |
| 251 | 251 | 'routes' => array( |
| 252 | - 'blitze_content_' . $route, |
|
| 253 | - 'blitze_content_' . $route . '_page', |
|
| 252 | + 'blitze_content_'.$route, |
|
| 253 | + 'blitze_content_'.$route.'_page', |
|
| 254 | 254 | ), |
| 255 | 255 | 'params' => $params, |
| 256 | 256 | ), |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | 'L_USER_ABOUT' => $this->language->lang('AUTHOR_INFO_EXPLAIN', $user_cache['username_full'], $user_cache['joined'], $user_content_topics, $content_langname, $user_cache['posts']), |
| 282 | 282 | 'L_USER_VIEW_ALL' => $this->language->lang('VIEW_AUTHOR_CONTENTS', $content_langname, $user_cache['username']), |
| 283 | 283 | 'L_SEARCH_USER_POSTS' => $this->language->lang('SEARCH_USER_POSTS', $user_cache['username']), |
| 284 | - '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") |
|
| 284 | + '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") |
|
| 285 | 285 | ))); |
| 286 | 286 | } |
| 287 | 287 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | ->fetch_forum($topic_data['forum_id']) |
| 302 | 302 | ->fetch_topic_poster($topic_data['topic_poster']) |
| 303 | 303 | ->fetch_custom(array( |
| 304 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
| 304 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
| 305 | 305 | ))->build(true, true, false); |
| 306 | 306 | |
| 307 | 307 | $topics_data = $this->forum->get_topic_data(5); |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | */ |
| 125 | 125 | protected function allow_topic_delete(array $topic_data) |
| 126 | 126 | { |
| 127 | - return ($this->auth->acl_get('m_delete', $topic_data['forum_id'])) || (($topic_data['topic_visibility'] != ITEM_DELETED) && $this->auth->acl_get('m_softdelete', $topic_data['forum_id'])); |
|
| 127 | + return ($this->auth->acl_get('m_delete', $topic_data['forum_id'])) || (($topic_data['topic_visibility'] != ITEM_DELETED) && $this->auth->acl_get('m_softdelete', $topic_data['forum_id'])); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | foreach ($fields_data as $field => $value) |
| 142 | 142 | { |
| 143 | 143 | $value = is_array($value) ? join("\n", $value) : $value; |
| 144 | - $message .= '[tag=' . $field . ']' . $value . '[/tag]'; |
|
| 144 | + $message .= '[tag='.$field.']'.$value.'[/tag]'; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $message; |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | public function get_content_view($content_type, array $post_data, $view) |
| 192 | 192 | { |
| 193 | 193 | $entity = $this->types->get_type($content_type); |
| 194 | - $get_tags = 'get_' . $view . '_tags'; |
|
| 195 | - $get_template = 'get_' . $view . '_tpl'; |
|
| 194 | + $get_tags = 'get_'.$view.'_tags'; |
|
| 195 | + $get_template = 'get_'.$view.'_tpl'; |
|
| 196 | 196 | |
| 197 | 197 | $this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$get_tags(), $entity->$get_template(), $view); |
| 198 | 198 | $content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER)); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->ptemplate->assign_vars($data); |
| 70 | 70 | |
| 71 | 71 | $field = $this->get_name(); |
| 72 | - return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field . '_field'); |
|
| 72 | + return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field.'_field'); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function get_langname() |
| 87 | 87 | { |
| 88 | - return strtoupper('FORM_FIELD_' . $this->get_name()); |
|
| 88 | + return strtoupper('FORM_FIELD_'.$this->get_name()); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $value = $this->request->variable($name, $value); |
| 20 | 20 | $value = $this->get_image_src($value); |
| 21 | 21 | |
| 22 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
| 22 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $data['field_value'] = $this->get_image_src($bbcode_value); |
| 35 | 35 | |
| 36 | 36 | $this->ptemplate->assign_vars($data); |
| 37 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
| 37 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
| 38 | 38 | |
| 39 | 39 | $data['field_value'] = $bbcode_value; |
| 40 | 40 | |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | $image = ''; |
| 50 | 50 | if ($data['field_value']) |
| 51 | 51 | { |
| 52 | - $image = '<figure class="img-ui">' . $data['field_value'] . '</figure>'; |
|
| 52 | + $image = '<figure class="img-ui">'.$data['field_value'].'</figure>'; |
|
| 53 | 53 | if ($mode !== 'block') |
| 54 | 54 | { |
| 55 | - $image = '<div class="' . join(' ', array_filter($data['field_props'])) . '">' . $image . '</div>'; |
|
| 55 | + $image = '<div class="'.join(' ', array_filter($data['field_props'])).'">'.$image.'</div>'; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | return $image; |
@@ -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 | )); |
@@ -144,12 +144,12 @@ discard block |
||
| 144 | 144 | // Assigning custom bbcodes |
| 145 | 145 | if (!function_exists('display_custom_bbcodes')) |
| 146 | 146 | { |
| 147 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
| 147 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | display_custom_bbcodes(); |
| 151 | 151 | |
| 152 | - $bbcode_status = ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false; |
|
| 152 | + $bbcode_status = ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false; |
|
| 153 | 153 | |
| 154 | 154 | $dataref = $this->template_context->get_data_ref(); |
| 155 | 155 | $this->ptemplate->assign_block_vars_array('custom_tags', (isset($dataref['custom_tags'])) ? $dataref['custom_tags'] : array()); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $this->template->assign_block_vars('toc', array( |
| 239 | 239 | 'TITLE' => ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'), |
| 240 | 240 | 'S_PAGE' => ($page === $start), |
| 241 | - 'U_VIEW' => append_sid($topic_url, ($page) ? 'page=' . $page : false), |
|
| 241 | + 'U_VIEW' => append_sid($topic_url, ($page) ? 'page='.$page : false), |
|
| 242 | 242 | )); |
| 243 | 243 | } |
| 244 | 244 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ), |
| 69 | 69 | 'css' => array( |
| 70 | 70 | '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css', |
| 71 | - '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $data['field_props']['theme'] . '.min.css', |
|
| 71 | + '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$data['field_props']['theme'].'.min.css', |
|
| 72 | 72 | ) |
| 73 | 73 | )); |
| 74 | 74 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - return join($range, ' - ') . $data['field_props']['postfix']; |
|
| 92 | + return join($range, ' - ').$data['field_props']['postfix']; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -129,6 +129,6 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | protected function set_prefix(&$item, $key, $prefix) |
| 131 | 131 | { |
| 132 | - $item = $prefix . $item; |
|
| 132 | + $item = $prefix.$item; |
|
| 133 | 133 | } |
| 134 | 134 | } |