@@ -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( |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $l_edited_by = $edit_reason = ''; |
212 | 212 | if (($row['post_edit_count'] && $this->config['display_last_edited']) || $row['post_edit_reason']) |
213 | 213 | { |
214 | - $display_username = $users_cache[$row['poster_id']]['username_full']; |
|
214 | + $display_username = $users_cache[$row['poster_id']]['username_full']; |
|
215 | 215 | $l_edited_by = $this->language->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $this->user->format_date($row['post_edit_time'], false, true)); |
216 | 216 | $edit_reason = $row['post_edit_reason']; |
217 | 217 | } |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | $l_deleted_by = $delete_reason = $l_deleted_message = ''; |
233 | 233 | if ($row['post_visibility'] === ITEM_DELETED && $row['post_delete_user']) |
234 | 234 | { |
235 | - $display_postername = $users_cache[$row['poster_id']]['username_full']; |
|
236 | - $display_username = $users_cache[$row['post_delete_user']]['username_full']; |
|
235 | + $display_postername = $users_cache[$row['poster_id']]['username_full']; |
|
236 | + $display_username = $users_cache[$row['post_delete_user']]['username_full']; |
|
237 | 237 | |
238 | 238 | if ($row['post_delete_reason']) |
239 | 239 | { |
@@ -238,8 +238,7 @@ |
||
238 | 238 | if ($row['post_delete_reason']) |
239 | 239 | { |
240 | 240 | $l_deleted_message = $this->language->lang('POST_DELETED_BY_REASON', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']); |
241 | - } |
|
242 | - else |
|
241 | + } else |
|
243 | 242 | { |
244 | 243 | $l_deleted_message = $this->language->lang('POST_DELETED_BY', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true)); |
245 | 244 | } |
@@ -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 |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | { |
167 | 167 | $field_type = $row['field_type']; |
168 | 168 | $field_value = &$post_field_data[$field_name]; |
169 | - $field_contents = $this->form_fields[$field_type]->display_field($field_value, $this->view_mode, $tpl_data, $row); |
|
169 | + $field_contents = $this->form_fields[$field_type]->display_field($field_value, $this->view_mode, $tpl_data, $row); |
|
170 | 170 | |
171 | 171 | // this essentially hides other fields if the field returns an array |
172 | 172 | if (is_array($field_contents)) |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | break; |
176 | 176 | } |
177 | 177 | |
178 | - $fields_data[$field_name] = '<div class="field-label ' . $this->label[$row['field_' . $this->view_mode . '_ldisp']] . '">' . $row['field_label'] . ': </div>' . $field_contents; |
|
178 | + $fields_data[$field_name] = '<div class="field-label '.$this->label[$row['field_'.$this->view_mode.'_ldisp']].'">'.$row['field_label'].': </div>'.$field_contents; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | return $fields_data; |
@@ -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 |
@@ -142,7 +142,7 @@ |
||
142 | 142 | else |
143 | 143 | { |
144 | 144 | $data = $this->content_types[$id]; |
145 | - $column_name = $view . '_tpl'; |
|
145 | + $column_name = $view.'_tpl'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | $return = array( |
@@ -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'; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | * @param \blitze\sitemaker\services\forum\manager $forum_manager Forum manager object |
45 | 45 | * @param \blitze\content\model\mapper_factory $cmapper_factory Content Mapper factory object |
46 | 46 | * @param \blitze\sitemaker\model\mapper_factory $smapper_factory Sitemaker Mapper factory object |
47 | - */ |
|
47 | + */ |
|
48 | 48 | public function __construct(\phpbb\cache\service $cache, \phpbb\language\language $language, \phpbb\request\request_interface $request, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $cmapper_factory, \blitze\sitemaker\model\mapper_factory $smapper_factory) |
49 | 49 | { |
50 | 50 | $this->cache = $cache; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | if (!check_form_key('delete_content_type')) |
65 | 65 | { |
66 | - trigger_error($this->language->lang('FORM_INVALID') . adm_back_link($u_action)); |
|
66 | + trigger_error($this->language->lang('FORM_INVALID').adm_back_link($u_action)); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $types_mapper = $this->cmapper_factory->create('types'); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->cache->destroy('_content_types'); |
78 | 78 | |
79 | 79 | meta_refresh(3, $u_action); |
80 | - trigger_error($this->language->lang('CONTENT_TYPE_DELETED') . adm_back_link($u_action)); |
|
80 | + trigger_error($this->language->lang('CONTENT_TYPE_DELETED').adm_back_link($u_action)); |
|
81 | 81 | |
82 | 82 | } |
83 | 83 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * @param \phpbb\cache\service $cache Cache object |
29 | 29 | * @param \blitze\content\services\types $content_types Content types object |
30 | 30 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
31 | - */ |
|
31 | + */ |
|
32 | 32 | public function __construct(\phpbb\cache\service $cache, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory) |
33 | 33 | { |
34 | 34 | $this->cache = $cache; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @param \phpbb\language\language $language Language Object |
33 | 33 | * @param \phpbb\template\template $template Template object |
34 | 34 | * @param \blitze\content\services\types $content_types Content types object |
35 | - */ |
|
35 | + */ |
|
36 | 36 | public function __construct(\phpbb\config\db $config, \phpbb\language\language $language, \phpbb\template\template $template, \blitze\content\services\types $content_types) |
37 | 37 | { |
38 | 38 | $this->config = $config; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * @param \blitze\sitemaker\services\auto_lang $auto_lang Auto add lang file |
44 | 44 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
45 | 45 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
46 | - */ |
|
46 | + */ |
|
47 | 47 | public function __construct(\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\views\views_factory $views_factory) |
48 | 48 | { |
49 | 49 | $this->language = $language; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'POST_DATE' => $this->user->format_date(time()), |
73 | 73 | 'ITEMS_PER_PAGE' => 10, |
74 | 74 | 'TOPICS_PER_GROUP' => 4, |
75 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
75 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
76 | 76 | |
77 | 77 | 'S_TYPE_OPS' => $this->get_field_options(), |
78 | 78 | 'S_FORUM_OPTIONS' => make_forum_select(false, $forum_id, true, false, false), |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $options = ''; |
111 | 111 | foreach ($fields as $object) |
112 | 112 | { |
113 | - $options .= '<option value="' . $object->get_name() . '">' . $this->language->lang($object->get_langname()) . "</option>\n"; |
|
113 | + $options .= '<option value="'.$object->get_name().'">'.$this->language->lang($object->get_langname())."</option>\n"; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return $options; |