@@ -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 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | if (!empty($data['.'][0]['TOTAL_USERS_ONLINE']) && !$this->request->is_set('f')) |
68 | 68 | { |
69 | - $l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE']; |
|
69 | + $l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE']; |
|
70 | 70 | $online_userlist = $data['.'][0]['LOGGED_IN_USER_LIST']; |
71 | 71 | $l_online_record = $data['.'][0]['RECORD_USERS']; |
72 | 72 | } |
@@ -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 | } |
@@ -142,8 +142,8 @@ |
||
142 | 142 | { |
143 | 143 | $url_info = parse_url($data['item_url']); |
144 | 144 | |
145 | - $data['url_path'] = (isset($url_info['path'])) ? $url_info['path'] : ''; |
|
146 | - $data['url_query'] = (isset($url_info['query'])) ? explode('&', $url_info['query']) : array(); |
|
145 | + $data['url_path'] = (isset($url_info['path'])) ? $url_info['path'] : ''; |
|
146 | + $data['url_query'] = (isset($url_info['query'])) ? explode('&', $url_info['query']) : array(); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -54,7 +54,7 @@ |
||
54 | 54 | // Delete block data |
55 | 55 | $this->db->sql_query('DELETE FROM ' . $this->cblocks_table . ' WHERE block_id = ' . (int) $id); |
56 | 56 | |
57 | - $sql_data = array( |
|
57 | + $sql_data = array( |
|
58 | 58 | 'block_id' => $id, |
59 | 59 | 'block_content' => $content, |
60 | 60 | 'bbcode_bitfield' => '', |
@@ -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 | } |
@@ -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); |
@@ -91,8 +91,8 @@ |
||
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) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | $sql = "SELECT * |
73 | 73 | FROM $this->items_table |
74 | - WHERE $this->pk = " . (int) $node_id ; |
|
74 | + WHERE $this->pk = " . (int) $node_id; |
|
75 | 75 | $result = $this->db->sql_query($sql); |
76 | 76 | $row = $this->db->sql_fetchrow($result); |
77 | 77 | $this->db->sql_freeresult($result); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | return $data; |
175 | 175 | } |
176 | 176 | |
177 | - public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree') |
|
177 | + public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree') |
|
178 | 178 | { |
179 | 179 | $prev_depth = 0; |
180 | 180 | $parental_depth = array(0 => -1); |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | for ($i = 0, $size = sizeof($data); $i < $size; $i++) |
184 | 184 | { |
185 | 185 | $row = $data[$i]; |
186 | - $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
187 | - $repeat = abs($prev_depth - $this_depth); |
|
186 | + $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
187 | + $repeat = abs($prev_depth - $this_depth); |
|
188 | 188 | |
189 | - $tpl_data = array( |
|
189 | + $tpl_data = array( |
|
190 | 190 | 'S_PREV_DEPTH' => $prev_depth, |
191 | 191 | 'S_THIS_DEPTH' => $this_depth, |
192 | 192 | 'S_NUM_KIDS' => $this->count_descendants($row), |
@@ -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 | } |
@@ -214,23 +214,23 @@ |
||
214 | 214 | foreach ($branch as $i => $row) |
215 | 215 | { |
216 | 216 | $left_id = $right_id + 1; |
217 | - $right_id = $right_id + 2; |
|
217 | + $right_id = $right_id + 2; |
|
218 | 218 | |
219 | 219 | $sql_data[$i] = $row; |
220 | - $sql_data[$i]['parent_id'] = $parent_id; |
|
221 | - $sql_data[$i]['left_id'] = $left_id; |
|
222 | - $sql_data[$i]['right_id'] = $right_id; |
|
223 | - $sql_data[$i]['depth'] = $depth; |
|
220 | + $sql_data[$i]['parent_id'] = $parent_id; |
|
221 | + $sql_data[$i]['left_id'] = $left_id; |
|
222 | + $sql_data[$i]['right_id'] = $right_id; |
|
223 | + $sql_data[$i]['depth'] = $depth; |
|
224 | 224 | |
225 | 225 | if ($row['parent_id']) |
226 | 226 | { |
227 | - $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
228 | - $right_id = $left_id + 1; |
|
227 | + $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
228 | + $right_id = $left_id + 1; |
|
229 | 229 | |
230 | - $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
231 | - $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
232 | - $sql_data[$i]['left_id'] = $left_id; |
|
233 | - $sql_data[$i]['right_id'] = $right_id; |
|
230 | + $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
231 | + $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
232 | + $sql_data[$i]['left_id'] = $left_id; |
|
233 | + $sql_data[$i]['right_id'] = $right_id; |
|
234 | 234 | |
235 | 235 | $this->update_right_side($sql_data, $right_id, $row['parent_id'], $branch); |
236 | 236 | } |
@@ -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 | } |