@@ -172,6 +172,6 @@ |
||
172 | 172 | */ |
173 | 173 | protected function get_sql_where($menu_id) |
174 | 174 | { |
175 | - return '%smenu_id = ' . (int) $menu_id; |
|
175 | + return '%smenu_id = '.(int) $menu_id; |
|
176 | 176 | } |
177 | 177 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param array $topic_data |
69 | 69 | * @param \phpbb\template\twig\twig $template |
70 | 70 | */ |
71 | - public function build(array $topic_data, \phpbb\template\twig\twig &$template) |
|
71 | + public function build(array $topic_data, \phpbb\template\twig\twig & $template) |
|
72 | 72 | { |
73 | 73 | $this->translator->add_lang('viewtopic'); |
74 | 74 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'S_POLL_ACTION' => $viewtopic_url, |
101 | 101 | 'S_FORM_TOKEN' => $this->sitemaker->get_form_key('posting'), |
102 | 102 | |
103 | - 'U_VIEW_RESULTS' => $viewtopic_url . '&view=viewpoll', |
|
103 | + 'U_VIEW_RESULTS' => $viewtopic_url.'&view=viewpoll', |
|
104 | 104 | )); |
105 | 105 | } |
106 | 106 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $post_id = (int) $topic_data['topic_first_post_id']; |
133 | 133 | |
134 | 134 | $sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid |
135 | - FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p |
|
135 | + FROM ' . POLL_OPTIONS_TABLE.' o, '.POSTS_TABLE." p |
|
136 | 136 | WHERE o.topic_id = $topic_id |
137 | 137 | AND p.post_id = $post_id |
138 | 138 | AND p.topic_id = o.topic_id |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * @param int $poll_most |
178 | 178 | * @param \phpbb\template\twig\twig $template |
179 | 179 | */ |
180 | - private function _build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig &$template) |
|
180 | + private function _build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig & $template) |
|
181 | 181 | { |
182 | 182 | foreach ($poll_info as $poll_option) |
183 | 183 | { |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | if ($this->user->data['is_registered']) |
209 | 209 | { |
210 | 210 | $sql = 'SELECT poll_option_id |
211 | - FROM ' . POLL_VOTES_TABLE . ' |
|
212 | - WHERE topic_id = ' . (int) $topic_id . ' |
|
211 | + FROM ' . POLL_VOTES_TABLE.' |
|
212 | + WHERE topic_id = ' . (int) $topic_id.' |
|
213 | 213 | AND vote_user_id = ' . $this->user->data['user_id']; |
214 | 214 | $result = $this->db->sql_query($sql); |
215 | 215 | |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | // Cookie based guest tracking ... I don't like this but hum ho |
225 | 225 | // it's oft requested. This relies on "nice" users who don't feel |
226 | 226 | // the need to delete cookies to mess with results. |
227 | - if ($this->request->is_set($this->config['cookie_name'] . '_poll_' . $topic_id, \phpbb\request\request_interface::COOKIE)) |
|
227 | + if ($this->request->is_set($this->config['cookie_name'].'_poll_'.$topic_id, \phpbb\request\request_interface::COOKIE)) |
|
228 | 228 | { |
229 | - $cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $topic_id, '', true, \phpbb\request\request_interface::COOKIE)); |
|
229 | + $cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'].'_poll_'.$topic_id, '', true, \phpbb\request\request_interface::COOKIE)); |
|
230 | 230 | $cur_voted_id = array_map('intval', $cur_voted_id); |
231 | 231 | } |
232 | 232 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | if (!function_exists('phpbb_get_user_avatar')) |
64 | 64 | { |
65 | - include($phpbb_root_path . 'includes/functions_display.' . $php_ext); |
|
65 | + include($phpbb_root_path.'includes/functions_display.'.$php_ext); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | */ |
100 | 100 | protected function member_posts(array $row) |
101 | 101 | { |
102 | - $u_posts = append_sid($this->phpbb_root_path . 'search.' . $this->php_ext, "author_id={$row['user_id']}&sr=posts" . $this->explain_range); |
|
103 | - $user_posts = '<a href="' . $u_posts . '">' . $row['user_posts'] . '</a>'; |
|
102 | + $u_posts = append_sid($this->phpbb_root_path.'search.'.$this->php_ext, "author_id={$row['user_id']}&sr=posts".$this->explain_range); |
|
103 | + $user_posts = '<a href="'.$u_posts.'">'.$row['user_posts'].'</a>'; |
|
104 | 104 | |
105 | 105 | return array( |
106 | 106 | 'USERNAME' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'WHERE' => $this->db->sql_in_set('u.user_type', array(USER_NORMAL, USER_FOUNDER)), |
169 | 169 | ); |
170 | 170 | |
171 | - $sql_method = 'set_' . $this->settings['query_type'] . '_sql'; |
|
171 | + $sql_method = 'set_'.$this->settings['query_type'].'_sql'; |
|
172 | 172 | call_user_func_array(array($this, $sql_method), array(&$sql_ary)); |
173 | 173 | |
174 | 174 | $this->set_range_sql($sql_ary); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $this->info_header = ''; |
199 | 199 | $this->view_mode = 'member_bots'; |
200 | 200 | |
201 | - $sql_ary['WHERE'] = 'u.user_type = ' . USER_IGNORE; |
|
201 | + $sql_ary['WHERE'] = 'u.user_type = '.USER_IGNORE; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | protected function set_tenured_sql(array &$sql_ary) |
208 | 208 | { |
209 | 209 | $sql_ary['SELECT'] .= ', u.user_regdate as member_date'; |
210 | - $sql_ary['ORDER_BY'] = 'u.user_regdate ' . (($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC'); |
|
210 | + $sql_ary['ORDER_BY'] = 'u.user_regdate '.(($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC'); |
|
211 | 211 | |
212 | 212 | $this->sql_date_field = 'u.user_regdate'; |
213 | 213 | $this->settings['date_range'] = ''; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $sql_ary['SELECT'] .= ', COUNT(p.post_id) as user_posts'; |
231 | 231 | $sql_ary['FROM'] += array(TOPICS_TABLE => 't'); |
232 | 232 | $sql_ary['FROM'] += array(POSTS_TABLE => 'p'); |
233 | - $sql_ary['WHERE'] .= ' AND ' . time() . ' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = ' . ITEM_APPROVED . ' AND p.poster_id = u.user_id'; |
|
233 | + $sql_ary['WHERE'] .= ' AND '.time().' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = '.ITEM_APPROVED.' AND p.poster_id = u.user_id'; |
|
234 | 234 | $sql_ary['GROUP_BY'] = 'u.user_id'; |
235 | 235 | $sql_ary['ORDER_BY'] = 'user_posts DESC, u.username ASC'; |
236 | 236 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | if ($this->settings['date_range'] && $this->sql_date_field) |
248 | 248 | { |
249 | 249 | $range = $this->date_range->get($this->settings['date_range']); |
250 | - $this->explain_range = '&date=' . $range['date']; |
|
250 | + $this->explain_range = '&date='.$range['date']; |
|
251 | 251 | |
252 | 252 | $sql_ary['WHERE'] .= " AND {$this->sql_date_field} BETWEEN {$range['start']} AND {$range['stop']}"; |
253 | 253 | } |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | public function set_javascript_data($route, $style_id) |
97 | 97 | { |
98 | 98 | $board_url = generate_board_url(); |
99 | - $ajax_url = $board_url . ((!$this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : ''); |
|
99 | + $ajax_url = $board_url.((!$this->config['enable_mod_rewrite']) ? '/app.'.$this->php_ext : ''); |
|
100 | 100 | |
101 | 101 | $is_default_route = $u_default_route = false; |
102 | 102 | if ($this->config['sitemaker_default_layout']) |
103 | 103 | { |
104 | 104 | $is_default_route = ($this->config['sitemaker_default_layout'] === $route) ? true : false; |
105 | - $u_default_route .= $board_url . '/' . $this->config['sitemaker_default_layout']; |
|
105 | + $u_default_route .= $board_url.'/'.$this->config['sitemaker_default_layout']; |
|
106 | 106 | $u_default_route = reapply_sid($u_default_route); |
107 | 107 | } |
108 | 108 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | list($controller_service, $controller_method) = explode(':', $controller); |
150 | 150 | $controller_params = $symfony_request->attributes->get('_route_params'); |
151 | 151 | $controller_object = $this->phpbb_container->get($controller_service); |
152 | - $controller_class = get_class($controller_object); |
|
152 | + $controller_class = get_class($controller_object); |
|
153 | 153 | |
154 | 154 | $r = new \ReflectionMethod($controller_class, $controller_method); |
155 | 155 | $class_params = $r->getParameters(); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'CONTROLLER_METHOD' => $controller_method, |
163 | 163 | 'CONTROLLER_PARAMS' => $controller_arguments, |
164 | 164 | 'S_IS_STARTPAGE' => $this->is_startpage($controller_service, $controller_arguments), |
165 | - 'UA_EXTENSION' => $namespace . '/' . $extension, |
|
165 | + 'UA_EXTENSION' => $namespace.'/'.$extension, |
|
166 | 166 | )); |
167 | 167 | } |
168 | 168 | } |
@@ -197,11 +197,11 @@ discard block |
||
197 | 197 | { |
198 | 198 | $routes_ary = $this->get_routes(); |
199 | 199 | |
200 | - $options = '<option value="">' . $this->translator->lang('SELECT') . '</option>'; |
|
200 | + $options = '<option value="">'.$this->translator->lang('SELECT').'</option>'; |
|
201 | 201 | foreach ($routes_ary as $route) |
202 | 202 | { |
203 | 203 | $selected = ($route == $current_route) ? ' selected="selected"' : ''; |
204 | - $options .= '<option value="' . $route . '"' . $selected . '>' . $route . '</option>'; |
|
204 | + $options .= '<option value="'.$route.'"'.$selected.'>'.$route.'</option>'; |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $options; |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function get_excluded_position_options(array $ex_positions) |
217 | 217 | { |
218 | - $options = '<option value=""' . ((!sizeof($ex_positions)) ? ' selected="selected"' : '') . '>' . $this->translator->lang('NONE') . '</option>'; |
|
218 | + $options = '<option value=""'.((!sizeof($ex_positions)) ? ' selected="selected"' : '').'>'.$this->translator->lang('NONE').'</option>'; |
|
219 | 219 | foreach ($ex_positions as $position) |
220 | 220 | { |
221 | - $options .= '<option value="' . $position . '" selected="selected">' . $position . '</option>'; |
|
221 | + $options .= '<option value="'.$position.'" selected="selected">'.$position.'</option>'; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | return $options; |
@@ -59,6 +59,6 @@ |
||
59 | 59 | $class_name = get_class($block_instance); |
60 | 60 | list($namespace, $extension) = explode('\\', $class_name); |
61 | 61 | |
62 | - return $namespace . '/' . $extension; |
|
62 | + return $namespace.'/'.$extension; |
|
63 | 63 | } |
64 | 64 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | */ |
64 | 64 | public function create($action) |
65 | 65 | { |
66 | - $action_class = 'blitze\\sitemaker\\services\\blocks\\action\\' . $action; |
|
66 | + $action_class = 'blitze\\sitemaker\\services\\blocks\\action\\'.$action; |
|
67 | 67 | |
68 | 68 | if (!class_exists($action_class)) |
69 | 69 | { |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get_item_info($item_id = 0) |
57 | 57 | { |
58 | - $sql = 'SELECT * FROM ' . $this->table_name . ' ' . $this->get_sql_where('WHERE') . |
|
59 | - (($item_id) ? " AND {$this->column_item_id} = " . (int) $item_id : ''); |
|
58 | + $sql = 'SELECT * FROM '.$this->table_name.' '.$this->get_sql_where('WHERE'). |
|
59 | + (($item_id) ? " AND {$this->column_item_id} = ".(int) $item_id : ''); |
|
60 | 60 | |
61 | 61 | $result = $this->db->sql_query($sql); |
62 | 62 | $row = $this->db->sql_fetchrow($result); |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | public function update_item($item_id, array $sql_data) |
76 | 76 | { |
77 | 77 | $sql = "UPDATE {$this->table_name} |
78 | - SET " . $this->db->sql_build_array('UPDATE', $sql_data) . " |
|
79 | - WHERE $this->column_item_id = " . (int) $item_id; |
|
78 | + SET ".$this->db->sql_build_array('UPDATE', $sql_data)." |
|
79 | + WHERE $this->column_item_id = ".(int) $item_id; |
|
80 | 80 | $this->db->sql_query($sql); |
81 | 81 | |
82 | 82 | return $sql_data; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | // Rather than updating each item individually, we will just delete all items |
111 | 111 | // then add them all over again with new parent_id|left_id|right_id |
112 | - $this->db->sql_query("DELETE FROM {$this->table_name} " . $this->get_sql_where('WHERE')); |
|
112 | + $this->db->sql_query("DELETE FROM {$this->table_name} ".$this->get_sql_where('WHERE')); |
|
113 | 113 | |
114 | 114 | // Now we add it back |
115 | 115 | $sql_data = $this->add_sub_tree($tree, 0); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | if ($depth && !$parent_id) |
160 | 160 | { |
161 | - throw new \RuntimeException($this->message_prefix . 'MALFORMED_TREE'); |
|
161 | + throw new \RuntimeException($this->message_prefix.'MALFORMED_TREE'); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | $key = $i + $max_id + 1; |
@@ -230,23 +230,23 @@ discard block |
||
230 | 230 | foreach ($branch as $i => $row) |
231 | 231 | { |
232 | 232 | $left_id = $right_id + 1; |
233 | - $right_id = $right_id + 2; |
|
233 | + $right_id = $right_id + 2; |
|
234 | 234 | |
235 | 235 | $sql_data[$i] = $row; |
236 | - $sql_data[$i]['parent_id'] = $parent_id; |
|
237 | - $sql_data[$i]['left_id'] = $left_id; |
|
238 | - $sql_data[$i]['right_id'] = $right_id; |
|
239 | - $sql_data[$i]['depth'] = $depth; |
|
236 | + $sql_data[$i]['parent_id'] = $parent_id; |
|
237 | + $sql_data[$i]['left_id'] = $left_id; |
|
238 | + $sql_data[$i]['right_id'] = $right_id; |
|
239 | + $sql_data[$i]['depth'] = $depth; |
|
240 | 240 | |
241 | 241 | if ($row['parent_id']) |
242 | 242 | { |
243 | - $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
244 | - $right_id = $left_id + 1; |
|
243 | + $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
244 | + $right_id = $left_id + 1; |
|
245 | 245 | |
246 | - $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
247 | - $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
248 | - $sql_data[$i]['left_id'] = $left_id; |
|
249 | - $sql_data[$i]['right_id'] = $right_id; |
|
246 | + $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
247 | + $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
248 | + $sql_data[$i]['left_id'] = $left_id; |
|
249 | + $sql_data[$i]['right_id'] = $right_id; |
|
250 | 250 | |
251 | 251 | $this->update_right_side($sql_data, $right_id, $row['parent_id'], $branch); |
252 | 252 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $this->db->sql_transaction('rollback'); |
273 | 273 | $this->lock->release(); |
274 | 274 | |
275 | - throw new \RuntimeException($this->message_prefix . 'INVALID_PARENT'); |
|
275 | + throw new \RuntimeException($this->message_prefix.'INVALID_PARENT'); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | // adjust items in affected branch |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | protected function get_max_id($column, $use_sql_where = true) |
301 | 301 | { |
302 | 302 | $sql = "SELECT MAX($column) AS $column |
303 | - FROM {$this->table_name} " . |
|
303 | + FROM {$this->table_name} ". |
|
304 | 304 | (($use_sql_where) ? $this->get_sql_where('WHERE') : ''); |
305 | 305 | $result = $this->db->sql_query($sql); |
306 | 306 | $max_id = $this->db->sql_fetchfield($column); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $time = $this->user->create_datetime($this->time); |
39 | 39 | $now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset()); |
40 | 40 | |
41 | - $method = 'get_' . $range; |
|
41 | + $method = 'get_'.$range; |
|
42 | 42 | $data = array( |
43 | 43 | 'start' => 0, |
44 | 44 | 'stop' => 0, |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | $default_lang_files = $finder |
65 | 65 | ->prefix($lang_file) |
66 | 66 | ->suffix(".$this->php_ext") |
67 | - ->extension_directory('/language/' . basename($this->config['default_lang'])) |
|
68 | - ->core_path('language/' . basename($this->config['default_lang']) . '/') |
|
67 | + ->extension_directory('/language/'.basename($this->config['default_lang'])) |
|
68 | + ->core_path('language/'.basename($this->config['default_lang']).'/') |
|
69 | 69 | ->find(); |
70 | 70 | } |
71 | 71 | |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | $user_lang_files = $finder |
85 | 85 | ->prefix($lang_file) |
86 | 86 | ->suffix(".$this->php_ext") |
87 | - ->extension_directory('/language/' . $this->user->lang_name) |
|
88 | - ->core_path('language/' . $this->user->lang_name . '/') |
|
87 | + ->extension_directory('/language/'.$this->user->lang_name) |
|
88 | + ->core_path('language/'.$this->user->lang_name.'/') |
|
89 | 89 | ->find(); |
90 | 90 | |
91 | 91 | $lang_files = array_unique(array_merge($user_lang_files, $english_lang_files, $default_lang_files)); |