@@ -77,8 +77,7 @@ |
||
77 | 77 | $return_data = $command->execute($style_id); |
78 | 78 | |
79 | 79 | $this->action_handler->clear_cache(); |
80 | - } |
|
81 | - catch (\blitze\sitemaker\exception\base $e) |
|
80 | + } catch (\blitze\sitemaker\exception\base $e) |
|
82 | 81 | { |
83 | 82 | $json_data['message'] = $e->get_message($this->user); |
84 | 83 | } |
@@ -58,12 +58,10 @@ |
||
58 | 58 | $return_data = $command->execute(); |
59 | 59 | |
60 | 60 | $this->action_handler->clear_cache(); |
61 | - } |
|
62 | - catch (\blitze\sitemaker\exception\base $e) |
|
61 | + } catch (\blitze\sitemaker\exception\base $e) |
|
63 | 62 | { |
64 | 63 | $return_data['message'] = $e->get_message($this->user); |
65 | - } |
|
66 | - catch (\Exception $e) |
|
64 | + } catch (\Exception $e) |
|
67 | 65 | { |
68 | 66 | $return_data['message'] = $this->user->lang($e->getMessage()); |
69 | 67 | } |
@@ -79,8 +79,7 @@ |
||
79 | 79 | 'title' => 'LOGIN', |
80 | 80 | 'content' => $this->ptemplate->render_view('blitze/sitemaker', 'blocks/login.html', 'login_block') |
81 | 81 | ); |
82 | - } |
|
83 | - else if ($settings['show_member_menu']) |
|
82 | + } else if ($settings['show_member_menu']) |
|
84 | 83 | { |
85 | 84 | $block = $this->phpbb_container->get('blitze.sitemaker.block.member_menu'); |
86 | 85 | $block->set_template($this->ptemplate); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $this->ptemplate->assign_vars(array( |
78 | 78 | 'S_SHOW_HIDE_ME' => ($settings['show_hide_me']) ? true : false, |
79 | 79 | 'S_AUTOLOGIN_ENABLED' => ($settings['allow_autologin']) ? true : false, |
80 | - 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=login'), |
|
81 | - 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=register'), |
|
82 | - 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=sendpassword'), |
|
80 | + 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=login'), |
|
81 | + 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=register'), |
|
82 | + 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=sendpassword'), |
|
83 | 83 | 'U_REDIRECT' => reapply_sid(ltrim(rtrim(build_url(array('edit_mode')), '?'), './../')) |
84 | 84 | )); |
85 | 85 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | private function hide_quicklogin() |
105 | 105 | { |
106 | 106 | $current_page = $this->user->page['page_name']; |
107 | - if ($current_page === 'index.' . $this->php_ext) |
|
107 | + if ($current_page === 'index.'.$this->php_ext) |
|
108 | 108 | { |
109 | 109 | $this->template->assign_var('S_USER_LOGGED_IN', true); |
110 | 110 | } |
@@ -237,8 +237,7 @@ |
||
237 | 237 | { |
238 | 238 | $padding .= $pad_with; |
239 | 239 | $padding_store[$row['parent_id']] = $padding; |
240 | - } |
|
241 | - else if ($row['left_id'] > $right + 1) |
|
240 | + } else if ($row['left_id'] > $right + 1) |
|
242 | 241 | { |
243 | 242 | $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; |
244 | 243 | } |
@@ -33,13 +33,13 @@ |
||
33 | 33 | protected $data = array(); |
34 | 34 | |
35 | 35 | /** |
36 | - * Construct |
|
37 | - * |
|
38 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
39 | - * @param string $items_table Table name |
|
40 | - * @param string $pk Primary key |
|
41 | - * @param string $sql_where Column restriction |
|
42 | - */ |
|
36 | + * Construct |
|
37 | + * |
|
38 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
39 | + * @param string $items_table Table name |
|
40 | + * @param string $pk Primary key |
|
41 | + * @param string $sql_where Column restriction |
|
42 | + */ |
|
43 | 43 | public function __construct(\phpbb\db\driver\driver_interface $db, $items_table, $pk, $sql_where = '') |
44 | 44 | { |
45 | 45 | $this->db = $db; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $sql = "SELECT * |
81 | 81 | FROM $this->items_table |
82 | - WHERE $this->pk = " . (int) $node_id ; |
|
82 | + WHERE $this->pk = ".(int) $node_id; |
|
83 | 83 | $result = $this->db->sql_query($sql); |
84 | 84 | $row = $this->db->sql_fetchrow($result); |
85 | 85 | $this->db->sql_freeresult($result); |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | $this->items_table => 'i' |
109 | 109 | ), |
110 | 110 | 'WHERE' => array( |
111 | - 'i.depth ' . (($max_depth) ? " BETWEEN $start AND " . ($start + $max_depth) : ' >= ' . $start), |
|
112 | - (($this->sql_where) ? 'i.' . $this->sql_where : ''), |
|
111 | + 'i.depth '.(($max_depth) ? " BETWEEN $start AND ".($start + $max_depth) : ' >= '.$start), |
|
112 | + (($this->sql_where) ? 'i.'.$this->sql_where : ''), |
|
113 | 113 | ), |
114 | 114 | 'ORDER_BY' => 'i.left_id ASC', |
115 | 115 | ), |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * @param \phpbb\template\twig\twig $template |
156 | 156 | * @param string $handle |
157 | 157 | */ |
158 | - public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree') |
|
158 | + public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree') |
|
159 | 159 | { |
160 | 160 | $prev_depth = 0; |
161 | 161 | $parental_depth = array(0 => -1); |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | for ($i = 0, $size = sizeof($data); $i < $size; $i++) |
165 | 165 | { |
166 | 166 | $row = $data[$i]; |
167 | - $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
168 | - $repeat = abs($prev_depth - $this_depth); |
|
167 | + $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
168 | + $repeat = abs($prev_depth - $this_depth); |
|
169 | 169 | |
170 | - $tpl_data = array( |
|
170 | + $tpl_data = array( |
|
171 | 171 | 'PREV_DEPTH' => $prev_depth, |
172 | 172 | 'THIS_DEPTH' => $this_depth, |
173 | 173 | 'NUM_KIDS' => $this->count_descendants($row), |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | for ($j = 0; $j < $repeat; $j++) |
179 | 179 | { |
180 | - $template->assign_block_vars($handle . '.close', array()); |
|
180 | + $template->assign_block_vars($handle.'.close', array()); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $prev_depth = $this_depth; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | for ($i = 0; $i < $prev_depth; $i++) |
188 | 188 | { |
189 | - $template->assign_block_vars('close_' . $handle, array()); |
|
189 | + $template->assign_block_vars('close_'.$handle, array()); |
|
190 | 190 | } |
191 | 191 | } |
192 | 192 | |
@@ -225,10 +225,10 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | $right = $row['right_id']; |
228 | - $title = $padding . '├─ ' . $row[$title_column]; |
|
228 | + $title = $padding.'├─ '.$row[$title_column]; |
|
229 | 229 | $selected = (in_array($row[$this->pk], $selected_ids)) ? ' selected="selected' : ''; |
230 | 230 | |
231 | - $return_options .= '<option value="' . $row[$this->pk] . '"' . $selected . '>' . $title . '</option>'; |
|
231 | + $return_options .= '<option value="'.$row[$this->pk].'"'.$selected.'>'.$title.'</option>'; |
|
232 | 232 | $return_data[$row[$this->pk]] = $title; |
233 | 233 | } |
234 | 234 |
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | public function execute($style_id) |
15 | 15 | { |
16 | - $name = $this->request->variable('block', ''); |
|
17 | - $route = $this->request->variable('route', ''); |
|
16 | + $name = $this->request->variable('block', ''); |
|
17 | + $route = $this->request->variable('route', ''); |
|
18 | 18 | |
19 | 19 | if (($block_instance = $this->block_factory->get_block($name)) === null) |
20 | 20 | { |
@@ -135,8 +135,7 @@ discard block |
||
135 | 135 | if ($this->request->is_set('style')) |
136 | 136 | { |
137 | 137 | return $this->request->variable('style', 0); |
138 | - } |
|
139 | - else |
|
138 | + } else |
|
140 | 139 | { |
141 | 140 | return (!$this->config['override_user_style']) ? $this->user->data['user_style'] : $this->config['default_style']; |
142 | 141 | } |
@@ -172,8 +171,7 @@ discard block |
||
172 | 171 | self::SHOW_BLOCK_LANDING => true, |
173 | 172 | self::SHOW_BLOCK_SUBPAGE => false, |
174 | 173 | ); |
175 | - } |
|
176 | - else |
|
174 | + } else |
|
177 | 175 | { |
178 | 176 | $modes = array( |
179 | 177 | self::SHOW_BLOCK_BOTH => true, |
@@ -200,8 +198,7 @@ discard block |
||
200 | 198 | } |
201 | 199 | |
202 | 200 | $u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode=' . (($edit_mode) ? 0 : 1)); |
203 | - } |
|
204 | - else |
|
201 | + } else |
|
205 | 202 | { |
206 | 203 | $edit_mode = false; |
207 | 204 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $edit_mode = $this->toggle_edit_mode(); |
70 | 70 | $style_id = $this->get_style_id(); |
71 | - $current_route = ltrim($this->user->page['page_dir'] . '/' . $this->user->page['page_name'], './'); |
|
71 | + $current_route = ltrim($this->user->page['page_dir'].'/'.$this->user->page['page_name'], './'); |
|
72 | 72 | $route_info = $blocks->get_route_info($current_route, $this->user->page['page_dir'], $style_id, $edit_mode); |
73 | 73 | |
74 | 74 | $display_modes = $this->get_display_modes($route_info['is_sub_route']); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | protected function toggle_edit_mode() |
116 | 116 | { |
117 | - $edit_mode = $this->request->variable($this->config['cookie_name'] . '_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE); |
|
117 | + $edit_mode = $this->request->variable($this->config['cookie_name'].'_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE); |
|
118 | 118 | |
119 | 119 | if ($this->request->is_set('edit_mode')) |
120 | 120 | { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | ); |
171 | 171 | } |
172 | 172 | |
173 | - $u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode=' . (int) !$edit_mode); |
|
173 | + $u_edit_mode = append_sid(generate_board_url().'/'.ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode='.(int) !$edit_mode); |
|
174 | 174 | } |
175 | 175 | else |
176 | 176 | { |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $headers = $headers[0]; |
30 | 30 | } |
31 | 31 | |
32 | - preg_match('/HTTP\/.* ([0-9]+) .*/', $headers , $status); |
|
32 | + preg_match('/HTTP\/.* ([0-9]+) .*/', $headers, $status); |
|
33 | 33 | |
34 | 34 | return ($status[1] == 200) ? true : false; |
35 | 35 | } |
@@ -41,8 +41,7 @@ |
||
41 | 41 | if (is_array($message)) |
42 | 42 | { |
43 | 43 | $this->message = (string) $message[0]; |
44 | - } |
|
45 | - else |
|
44 | + } else |
|
46 | 45 | { |
47 | 46 | $this->message = $message; |
48 | 47 | } |
@@ -339,7 +339,7 @@ |
||
339 | 339 | $this->store['topic'][$row['topic_id']] = $row; |
340 | 340 | |
341 | 341 | $this->store['tracking'][$row['forum_id']]['topic_list'][] = $row['topic_id']; |
342 | - $this->store['tracking'][$row['forum_id']]['mark_time'] =& $row['forum_mark_time']; |
|
342 | + $this->store['tracking'][$row['forum_id']]['mark_time'] = & $row['forum_mark_time']; |
|
343 | 343 | $this->store['post_ids']['first'][] = $row['topic_first_post_id']; |
344 | 344 | $this->store['post_ids']['last'][] = $row['topic_last_post_id']; |
345 | 345 | } |
@@ -232,8 +232,7 @@ |
||
232 | 232 | if (sizeof($post_ids)) |
233 | 233 | { |
234 | 234 | $sql_where[] = $this->db->sql_in_set('p.post_id', $post_ids); |
235 | - } |
|
236 | - else if (sizeof($this->store['topic'])) |
|
235 | + } else if (sizeof($this->store['topic'])) |
|
237 | 236 | { |
238 | 237 | $this->_limit_posts_by_topic($sql_where, $topic_first_or_last_post); |
239 | 238 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | { |
122 | 122 | $this->_entities = array_filter( |
123 | 123 | $this->_entities, |
124 | - function ($v) use ($key) |
|
124 | + function($v) use ($key) |
|
125 | 125 | { |
126 | 126 | return $v !== $key; |
127 | 127 | } |
@@ -101,8 +101,7 @@ |
||
101 | 101 | if (!isset($key)) |
102 | 102 | { |
103 | 103 | $this->_entities[] = $entity; |
104 | - } |
|
105 | - else |
|
104 | + } else |
|
106 | 105 | { |
107 | 106 | $this->_entities[$key] = $entity; |
108 | 107 | } |