@@ -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); |
@@ -71,9 +71,9 @@ |
||
| 71 | 71 | $this->ptemplate->assign_vars(array( |
| 72 | 72 | 'S_SHOW_HIDE_ME' => ($settings['show_hide_me']) ? true : false, |
| 73 | 73 | 'S_AUTOLOGIN_ENABLED' => ($settings['allow_autologin']) ? true : false, |
| 74 | - 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=login'), |
|
| 75 | - 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=register'), |
|
| 76 | - 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=sendpassword'), |
|
| 74 | + 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=login'), |
|
| 75 | + 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=register'), |
|
| 76 | + 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=sendpassword'), |
|
| 77 | 77 | 'U_REDIRECT' => reapply_sid(ltrim(rtrim(build_url(array('edit_mode')), '?'), './../')) |
| 78 | 78 | )); |
| 79 | 79 | |
@@ -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 | } |
@@ -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 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | protected function toggle_edit_mode() |
| 115 | 115 | { |
| 116 | - $edit_mode = $this->request->variable($this->config['cookie_name'] . '_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE); |
|
| 116 | + $edit_mode = $this->request->variable($this->config['cookie_name'].'_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE); |
|
| 117 | 117 | |
| 118 | 118 | if ($this->request->is_set('edit_mode')) |
| 119 | 119 | { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode=' . (int) !$edit_mode); |
|
| 172 | + $u_edit_mode = append_sid(generate_board_url().'/'.ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode='.(int) !$edit_mode); |
|
| 173 | 173 | } |
| 174 | 174 | else |
| 175 | 175 | { |
@@ -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 | } |
@@ -164,8 +164,7 @@ |
||
| 164 | 164 | if (!is_array($settings)) |
| 165 | 165 | { |
| 166 | 166 | $this->settings = $settings; |
| 167 | - } |
|
| 168 | - else if (sizeof($settings)) |
|
| 167 | + } else if (sizeof($settings)) |
|
| 169 | 168 | { |
| 170 | 169 | $this->settings = serialize($settings); |
| 171 | 170 | $this->hash = md5($this->settings); |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | */ |
| 142 | 142 | public function set_class($class) |
| 143 | 143 | { |
| 144 | - $this->class = ($class) ? ' ' . trim($class) : ''; |
|
| 144 | + $this->class = ($class) ? ' '.trim($class) : ''; |
|
| 145 | 145 | return $this; |
| 146 | 146 | } |
| 147 | 147 | |