@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | $this->ptemplate->assign_block_vars('wordgraph', array( |
111 | 111 | 'WORD' => $this->show_word($word, $words_array[$word], $settings['show_word_count']), |
112 | 112 | 'WORD_SIZE' => $settings['min_word_size'] + (($words_array[$word] - $params['min_count']) * $params['size_step']), |
113 | - 'WORD_COLOR' => $r . $g . $b, |
|
114 | - 'WORD_URL' => append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords=' . urlencode($word)), |
|
113 | + 'WORD_COLOR' => $r.$g.$b, |
|
114 | + 'WORD_URL' => append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords='.urlencode($word)), |
|
115 | 115 | )); |
116 | 116 | } |
117 | 117 | } |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | AND m.word_id = l.word_id |
189 | 189 | AND m.post_id = p.post_id |
190 | 190 | AND t.topic_id = p.topic_id |
191 | - AND t.topic_time <= ' . time() . ' |
|
192 | - AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_map('intval', array_keys($this->auth->acl_getf('!f_read', true))), 't.') . |
|
191 | + AND t.topic_time <= ' . time().' |
|
192 | + AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_map('intval', array_keys($this->auth->acl_getf('!f_read', true))), 't.'). |
|
193 | 193 | $sql_where, |
194 | 194 | 'GROUP_BY' => 'l.word_text, l.word_count', |
195 | 195 | 'ORDER_BY' => 'l.word_count DESC' |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | if ($exclude_words) |
207 | 207 | { |
208 | 208 | $exclude_words = array_filter(explode(',', str_replace(' ', '', strtolower($exclude_words)))); |
209 | - $sql_where = (sizeof($exclude_words)) ? ' AND ' . $this->db->sql_in_set('l.word_text', $exclude_words, true) : ''; |
|
209 | + $sql_where = (sizeof($exclude_words)) ? ' AND '.$this->db->sql_in_set('l.word_text', $exclude_words, true) : ''; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | return $sql_where; |
@@ -220,6 +220,6 @@ discard block |
||
220 | 220 | */ |
221 | 221 | private function show_word($word, $count, $show_count) |
222 | 222 | { |
223 | - return censor_text(($show_count) ? $word . '(' . $count . ')' : $word); |
|
223 | + return censor_text(($show_count) ? $word.'('.$count.')' : $word); |
|
224 | 224 | } |
225 | 225 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($this->config['sitemaker_default_layout']) |
116 | 116 | { |
117 | 117 | $is_default_route = ($this->config['sitemaker_default_layout'] === $route) ? true : false; |
118 | - $u_default_route .= $board_url . '/' . $this->config['sitemaker_default_layout']; |
|
118 | + $u_default_route .= $board_url.'/'.$this->config['sitemaker_default_layout']; |
|
119 | 119 | $u_default_route = reapply_sid($u_default_route); |
120 | 120 | } |
121 | 121 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | list($controller_service, $controller_method) = explode(':', $controller); |
196 | 196 | $controller_params = $symfony_request->attributes->get('_route_params'); |
197 | 197 | $controller_object = $this->phpbb_container->get($controller_service); |
198 | - $controller_class = get_class($controller_object); |
|
198 | + $controller_class = get_class($controller_object); |
|
199 | 199 | |
200 | 200 | $r = new \ReflectionMethod($controller_class, $controller_method); |
201 | 201 | $class_params = $r->getParameters(); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | 'CONTROLLER_METHOD' => $controller_method, |
209 | 209 | 'CONTROLLER_PARAMS' => $controller_arguments, |
210 | 210 | 'S_IS_STARTPAGE' => $this->is_startpage($controller_service, $controller_arguments), |
211 | - 'UA_EXTENSION' => $namespace . '/' . $extension, |
|
211 | + 'UA_EXTENSION' => $namespace.'/'.$extension, |
|
212 | 212 | )); |
213 | 213 | } |
214 | 214 | } |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | { |
244 | 244 | $routes_ary = $this->get_routes(); |
245 | 245 | |
246 | - $options = '<option value="">' . $this->translator->lang('SELECT') . '</option>'; |
|
246 | + $options = '<option value="">'.$this->translator->lang('SELECT').'</option>'; |
|
247 | 247 | foreach ($routes_ary as $route) |
248 | 248 | { |
249 | 249 | $selected = ($route == $current_route) ? ' selected="selected"' : ''; |
250 | - $options .= '<option value="' . $route . '"' . $selected . '>' . $route . '</option>'; |
|
250 | + $options .= '<option value="'.$route.'"'.$selected.'>'.$route.'</option>'; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | return $options; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $options = ''; |
265 | 265 | foreach ($ex_positions as $position) |
266 | 266 | { |
267 | - $options .= '<option value="' . $position . '" selected="selected">' . $position . '</option>'; |
|
267 | + $options .= '<option value="'.$position.'" selected="selected">'.$position.'</option>'; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | return $options; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $this->config_path = $config_path; |
40 | 40 | $this->php_ext = $php_ext; |
41 | 41 | |
42 | - $this->config_template = __DIR__ . '/default.config'; |
|
42 | + $this->config_template = __DIR__.'/default.config'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -109,6 +109,6 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function get_config_file() |
111 | 111 | { |
112 | - return $this->config_path . 'config.' . $this->php_ext; |
|
112 | + return $this->config_path.'config.'.$this->php_ext; |
|
113 | 113 | } |
114 | 114 | } |
@@ -53,8 +53,7 @@ |
||
53 | 53 | if (!$this->filesystem->exists($config_file)) |
54 | 54 | { |
55 | 55 | $this->filesystem->copy($this->config_template, $config_file, true); |
56 | - } |
|
57 | - else if ($retry && file($config_file)[1] !== '// Auto-generated configuration file for phpBB sitemaker') |
|
56 | + } else if ($retry && file($config_file)[1] !== '// Auto-generated configuration file for phpBB sitemaker') |
|
58 | 57 | { |
59 | 58 | $this->filesystem->remove($config_file); |
60 | 59 | return $this->get_settings(false); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $this->save_filemanager_settings(); |
155 | 155 | $this->save_config_settings($settings); |
156 | - $this->trigger_error($this->translator->lang('SETTINGS_SAVED') . adm_back_link($this->u_action)); |
|
156 | + $this->trigger_error($this->translator->lang('SETTINGS_SAVED').adm_back_link($this->u_action)); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | $style_prefs = (array) json_decode($this->config_text->get('sm_layout_prefs'), true); |
178 | 178 | |
179 | - $result = $this->db->sql_query('SELECT style_id, style_name FROM ' . STYLES_TABLE); |
|
179 | + $result = $this->db->sql_query('SELECT style_id, style_name FROM '.STYLES_TABLE); |
|
180 | 180 | |
181 | 181 | $styles = array(); |
182 | 182 | while ($row = $this->db->sql_fetchrow($result)) |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $path = dirname($path); |
246 | 246 | $name = basename($path); |
247 | 247 | |
248 | - $layouts[$name] = $this->phpbb_root_path . $path . '/'; |
|
248 | + $layouts[$name] = $this->phpbb_root_path.$path.'/'; |
|
249 | 249 | } |
250 | 250 | ksort($layouts); |
251 | 251 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $id = $entity->get_menu_id(); |
302 | 302 | $name = $entity->get_menu_name(); |
303 | 303 | $selected = ($id == $this->config['sm_navbar_menu']) ? ' selected="selected"' : ''; |
304 | - $options .= '<option value="' . $id . '"' . $selected . '>' . $name . '</option>'; |
|
304 | + $options .= '<option value="'.$id.'"'.$selected.'>'.$name.'</option>'; |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | return $options; |
@@ -99,8 +99,7 @@ |
||
99 | 99 | { |
100 | 100 | $file->remove(); |
101 | 101 | $json_data['message'] = implode('<br />', $file->error); |
102 | - } |
|
103 | - else |
|
102 | + } else |
|
104 | 103 | { |
105 | 104 | $json_data['location'] = $user_dir . $file->get('realname'); |
106 | 105 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | } |
90 | 90 | else |
91 | 91 | { |
92 | - $json_data['location'] = $user_dir . $file->get('realname'); |
|
92 | + $json_data['location'] = $user_dir.$file->get('realname'); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | public function load_permission_language(\phpbb\event\data $event) |
69 | 69 | { |
70 | 70 | $permissions = $event['permissions']; |
71 | - $permissions['a_sm_settings'] = array('lang' => 'ACL_A_SM_SETTINGS', 'cat' => 'misc'); |
|
72 | - $permissions['a_sm_manage_blocks'] = array('lang' => 'ACL_A_SM_MANAGE_BLOCKS', 'cat' => 'misc'); |
|
73 | - $permissions['a_sm_manage_menus'] = array('lang' => 'ACL_A_SM_MANAGE_MENUS', 'cat' => 'misc'); |
|
71 | + $permissions['a_sm_settings'] = array('lang' => 'ACL_A_SM_SETTINGS', 'cat' => 'misc'); |
|
72 | + $permissions['a_sm_manage_blocks'] = array('lang' => 'ACL_A_SM_MANAGE_BLOCKS', 'cat' => 'misc'); |
|
73 | + $permissions['a_sm_manage_menus'] = array('lang' => 'ACL_A_SM_MANAGE_MENUS', 'cat' => 'misc'); |
|
74 | 74 | $permissions['a_sm_filemanager'] = array('lang' => 'ACL_A_SM_FILEMANAGER', 'cat' => 'misc'); |
75 | 75 | $permissions['u_sm_filemanager'] = array('lang' => 'ACL_U_SM_FILEMANAGER', 'cat' => 'misc'); |
76 | 76 | $event['permissions'] = $permissions; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function add_viewonline_location(\phpbb\event\data $event) |
83 | 83 | { |
84 | - if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/forum') === 0) |
|
84 | + if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/forum') === 0) |
|
85 | 85 | { |
86 | 86 | $event['location'] = $this->translator->lang('FORUM_INDEX'); |
87 | 87 | $event['location_url'] = $this->phpbb_container->get('controller.helper')->route('blitze_sitemaker_forum'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function get_access_key() |
76 | 76 | { |
77 | - return sha1($this->user->data['user_form_salt'] . 'filemanager'); |
|
77 | + return sha1($this->user->data['user_form_salt'].'filemanager'); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function get_upload_destination() |
100 | 100 | { |
101 | - return $this->upload_dir . $this->get_user_dir(); |
|
101 | + return $this->upload_dir.$this->get_user_dir(); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | protected function set_user_dir() |
121 | 121 | { |
122 | 122 | // if user does not have root access, they must have a directory |
123 | - $this->user_dir = (!$this->auth->acl_get('a_sm_filemanager')) ? 'users/' . $this->user->data['username'] . '/' : ''; |
|
123 | + $this->user_dir = (!$this->auth->acl_get('a_sm_filemanager')) ? 'users/'.$this->user->data['username'].'/' : ''; |
|
124 | 124 | |
125 | - $destination = $this->phpbb_root_path . $this->upload_dir . $this->user_dir; |
|
125 | + $destination = $this->phpbb_root_path.$this->upload_dir.$this->user_dir; |
|
126 | 126 | |
127 | 127 | if (!is_dir($destination)) |
128 | 128 | { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | '@blitze_sitemaker/assets/icons/picker.min.js', |
51 | 51 | ), |
52 | 52 | 'css' => array_filter(array( |
53 | - defined('IN_ADMIN') ? $this->util->get_web_path() . 'assets/css/font-awesome.min.css' : '', |
|
53 | + defined('IN_ADMIN') ? $this->util->get_web_path().'assets/css/font-awesome.min.css' : '', |
|
54 | 54 | '@blitze_sitemaker/vendor/jquery-ui/themes/smoothness/jquery-ui.min.css', |
55 | 55 | '@blitze_sitemaker/assets/icons/picker.min.css', |
56 | 56 | )) |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | */ |
92 | 92 | private function clean_styles() |
93 | 93 | { |
94 | - $routes_ary = $this->manager->get_routes_per_style(); |
|
95 | - $style_ids = $this->get_style_ids(); |
|
94 | + $routes_ary = $this->manager->get_routes_per_style(); |
|
95 | + $style_ids = $this->get_style_ids(); |
|
96 | 96 | |
97 | 97 | $routes = array(); |
98 | 98 | foreach ($routes_ary as $style_id => $style_routes) |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | foreach ($routes as $route => $row) |
124 | 124 | { |
125 | - $url = $board_url . '/' . $row['route']; |
|
125 | + $url = $board_url.'/'.$row['route']; |
|
126 | 126 | |
127 | 127 | // Route no longer exists => remove all blocks for route |
128 | 128 | if ($this->url_checker->exists($url) !== true) |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | if (sizeof($block_ids)) |
187 | 187 | { |
188 | - $this->db->sql_query('DELETE FROM ' . $this->cblocks_table . ' WHERE ' . $this->db->sql_in_set('block_id', $block_ids)); |
|
188 | + $this->db->sql_query('DELETE FROM '.$this->cblocks_table.' WHERE '.$this->db->sql_in_set('block_id', $block_ids)); |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 |