@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | if (is_null($entity->$accessor())) |
90 | 90 | { |
91 | 91 | $entity = $this->insert($entity); |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | $this->update($entity); |
96 | 95 | } |
@@ -109,8 +108,7 @@ discard block |
||
109 | 108 | { |
110 | 109 | $accessor = 'get_' . $this->entity_pkey; |
111 | 110 | $condition = array($this->entity_pkey, '=', $condition->$accessor()); |
112 | - } |
|
113 | - else |
|
111 | + } else |
|
114 | 112 | { |
115 | 113 | throw new \blitze\sitemaker\exception\invalid_argument(array('entity', 'INVALID_ENTITY')); |
116 | 114 | } |
@@ -88,8 +88,7 @@ |
||
88 | 88 | $return_data = $command->execute($style_id); |
89 | 89 | |
90 | 90 | $this->action_handler->clear_cache(); |
91 | - } |
|
92 | - catch (\blitze\sitemaker\exception\base $e) |
|
91 | + } catch (\blitze\sitemaker\exception\base $e) |
|
93 | 92 | { |
94 | 93 | $json_data['message'] = $e->get_message($this->translator); |
95 | 94 | } |
@@ -63,12 +63,10 @@ |
||
63 | 63 | $return_data = $command->execute(); |
64 | 64 | |
65 | 65 | $this->action_handler->clear_cache(); |
66 | - } |
|
67 | - catch (\blitze\sitemaker\exception\base $e) |
|
66 | + } catch (\blitze\sitemaker\exception\base $e) |
|
68 | 67 | { |
69 | 68 | $return_data['message'] = $e->get_message($this->translator); |
70 | - } |
|
71 | - catch (\Exception $e) |
|
69 | + } catch (\Exception $e) |
|
72 | 70 | { |
73 | 71 | $return_data['message'] = $this->translator->lang($e->getMessage()); |
74 | 72 | } |
@@ -257,8 +257,7 @@ discard block |
||
257 | 257 | if ($this->settings['context'] && $this->settings['preview_chars']) |
258 | 258 | { |
259 | 259 | $post_data = $this->forum_data->get_post_data($this->settings['context']); |
260 | - } |
|
261 | - else |
|
260 | + } else |
|
262 | 261 | { |
263 | 262 | $post_data = array_fill_keys(array_keys($topic_data), array(array('post_text' => '', 'bbcode_uid' => '', 'bbcode_bitfield' => ''))); |
264 | 263 | } |
@@ -277,8 +276,7 @@ discard block |
||
277 | 276 | $this->fields['user_id'] = 'topic_last_poster_id'; |
278 | 277 | |
279 | 278 | $this->ptemplate->assign_var('L_POST_BY_AUTHOR', $this->translator->lang('LAST_POST_BY_AUTHOR')); |
280 | - } |
|
281 | - else |
|
279 | + } else |
|
282 | 280 | { |
283 | 281 | $this->fields['time'] = 'topic_time'; |
284 | 282 | $this->fields['user_id'] = 'topic_poster'; |
@@ -130,8 +130,7 @@ |
||
130 | 130 | if (isset($sort_keys[$this->settings['qtype']])) |
131 | 131 | { |
132 | 132 | return $this->user_data->query($sql_where, $sort_keys[$this->settings['qtype']], 1); |
133 | - } |
|
134 | - else |
|
133 | + } else |
|
135 | 134 | { |
136 | 135 | $user_id = (int) userlist::get_user_id($this->settings, $change_user); |
137 | 136 | $data = $this->user_data->get_users(array($user_id), $sql_where); |
@@ -72,8 +72,7 @@ discard block |
||
72 | 72 | 'title' => '', |
73 | 73 | 'content' => '', |
74 | 74 | ); |
75 | - } |
|
76 | - else |
|
75 | + } else |
|
77 | 76 | { |
78 | 77 | $this->fetch_new($bdata['settings']); |
79 | 78 | |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | { |
118 | 117 | $sorting = 't.topic_last_post_time'; |
119 | 118 | $sql_array = $this->get_topics_sql(); |
120 | - } |
|
121 | - else |
|
119 | + } else |
|
122 | 120 | { |
123 | 121 | $sorting = 'p.post_time'; |
124 | 122 | $sql_array = $this->get_posts_sql(); |
@@ -150,8 +150,7 @@ |
||
150 | 150 | if (!$block_exists) |
151 | 151 | { |
152 | 152 | $sql = 'INSERT INTO ' . $this->cblocks_table . ' ' . $this->db->sql_build_array('INSERT', $sql_data); |
153 | - } |
|
154 | - else |
|
153 | + } else |
|
155 | 154 | { |
156 | 155 | $sql = 'UPDATE ' . $this->cblocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE block_id = ' . (int) $sql_data['block_id']; |
157 | 156 | } |
@@ -84,8 +84,7 @@ |
||
84 | 84 | )); |
85 | 85 | |
86 | 86 | $content = $this->ptemplate->render_view('blitze/sitemaker', 'blocks/login.html', 'login_block'); |
87 | - } |
|
88 | - else if ($settings['show_member_menu']) |
|
87 | + } else if ($settings['show_member_menu']) |
|
89 | 88 | { |
90 | 89 | $block = $this->phpbb_container->get('blitze.sitemaker.block.member_menu'); |
91 | 90 | $block->set_template($this->ptemplate); |
@@ -303,8 +303,7 @@ |
||
303 | 303 | $cur_voted_id[] = $row['poll_option_id']; |
304 | 304 | } |
305 | 305 | $this->db->sql_freeresult($result); |
306 | - } |
|
307 | - else |
|
306 | + } else |
|
308 | 307 | { |
309 | 308 | // Cookie based guest tracking ... I don't like this but hum ho |
310 | 309 | // it's oft requested. This relies on "nice" users who don't feel |