Completed
Pull Request — master (#26)
by Daniel
14:20 queued 11:35
created
blocks/custom.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$content = $this->request->variable('content', '', true);
70 70
 		$cblocks = $this->get_custom_blocks();
71 71
 
72
-		$sql_data =	$this->get_default_fields($block_id);
72
+		$sql_data = $this->get_default_fields($block_id);
73 73
 		$sql_data['block_content'] = $content;
74 74
 
75 75
 		generate_text_for_storage($sql_data['block_content'], $sql_data['bbcode_uid'], $sql_data['bbcode_bitfield'], $sql_data['bbcode_options'], true, true, true);
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 	{
131 131
 		if (!$block_exists)
132 132
 		{
133
-			$sql = 'INSERT INTO ' . $this->cblocks_table . ' ' . $this->db->sql_build_array('INSERT', $sql_data);
133
+			$sql = 'INSERT INTO '.$this->cblocks_table.' '.$this->db->sql_build_array('INSERT', $sql_data);
134 134
 		}
135 135
 		else
136 136
 		{
137
-			$sql = 'UPDATE ' . $this->cblocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE block_id = ' . (int) $sql_data['block_id'];
137
+			$sql = 'UPDATE '.$this->cblocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE block_id = '.(int) $sql_data['block_id'];
138 138
 		}
139 139
 		$this->db->sql_query($sql);
140 140
 		$this->cache->destroy('pt_cblocks');
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		if ($edit_mode !== false)
152 152
 		{
153 153
 			decode_message($cblock['block_content'], $cblock['bbcode_uid']);
154
-			$content = '<div id="block-editor-' . $cblock['block_id'] . '" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="' . $cblock['block_content'] . '">' . $content . '</div>';
154
+			$content = '<div id="block-editor-'.$cblock['block_id'].'" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="'.$cblock['block_content'].'">'.$content.'</div>';
155 155
 		}
156 156
 	}
157 157
 
Please login to merge, or discard this patch.
blocks/whats_new.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 		if (!empty($collection))
51 51
 		{
52 52
 			return $collection->get_entities();
53
-		}
54
-		else
53
+		} else
55 54
 		{
56 55
 			return array();
57 56
 		}
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
 		if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions))
89 88
 		{
90 89
 			$this->route_mapper->delete($route);
91
-		}
92
-		else
90
+		} else
93 91
 		{
94 92
 			$route->set_has_blocks($has_blocks);
95 93
 			$this->route_mapper->save($route);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 			$this->ptemplate->assign_block_vars('topicrow', array(
101 101
 				'TOPIC_TITLE'    => censor_text($row['topic_title']),
102
-				'U_VIEWTOPIC'    => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&amp;t=$topic_id"),
102
+				'U_VIEWTOPIC'    => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&amp;t=$topic_id"),
103 103
 			));
104 104
 			unset($topic_data[$i]);
105 105
 		}
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		return array(
142 142
 			'WHERE'		=> array(
143
-				't.topic_last_post_time > ' . $this->user->data['user_lastvisit'],
143
+				't.topic_last_post_time > '.$this->user->data['user_lastvisit'],
144 144
 				't.topic_moved_id = 0',
145 145
 			),
146 146
 		);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 				POSTS_TABLE		=> 'p',
157 157
 			),
158 158
 			'WHERE'		=> array(
159
-				't.topic_id = p.topic_id AND p.post_time > ' . $this->user->data['user_lastvisit'],
159
+				't.topic_id = p.topic_id AND p.post_time > '.$this->user->data['user_lastvisit'],
160 160
 			),
161 161
 		);
162 162
 	}
Please login to merge, or discard this patch.
blocks/whois.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 		if (!empty($data['.'][0]['TOTAL_USERS_ONLINE']))
70 70
 		{
71
-			$l_online_users	= $data['.'][0]['TOTAL_USERS_ONLINE'];
71
+			$l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE'];
72 72
 			$online_userlist = $data['.'][0]['LOGGED_IN_USER_LIST'];
73 73
 			$l_online_record = $data['.'][0]['RECORD_USERS'];
74 74
 		}
@@ -105,6 +105,6 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	private function get_viewonline_url()
107 107
 	{
108
-		return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline." . $this->php_ext) : '';
108
+		return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline.".$this->php_ext) : '';
109 109
 	}
110 110
 }
Please login to merge, or discard this patch.
services/tree/builder.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
blocks/forum_topics.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 		if (!empty($collection))
51 51
 		{
52 52
 			return $collection->get_entities();
53
-		}
54
-		else
53
+		} else
55 54
 		{
56 55
 			return array();
57 56
 		}
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
 		if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions))
89 88
 		{
90 89
 			$this->route_mapper->delete($route);
91
-		}
92
-		else
90
+		} else
93 91
 		{
94 92
 			$route->set_has_blocks($has_blocks);
95 93
 			$this->route_mapper->save($route);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	{
142 142
 		$this->set_display_fields();
143 143
 
144
-		$view = 'S_' . strtoupper($this->settings['template']);
144
+		$view = 'S_'.strtoupper($this->settings['template']);
145 145
 		$post_data = $this->get_post_data($topic_data);
146 146
 		$topic_data = array_values($topic_data);
147 147
 
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
 				'VIEWS'				=> $row['topic_views'],
190 190
 				'S_UNREAD_TOPIC'	=> $this->is_unread_topic($forum_id, $topic_id, $row['topic_last_post_time']),
191 191
 
192
-				'U_VIEWTOPIC'		=> append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&amp;t=$topic_id"),
193
-				'U_VIEWFORUM'		=> append_sid($this->phpbb_root_path . 'viewforum.' . $this->php_ext, "f=$forum_id"),
194
-				'U_NEW_POST'		=> append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
195
-				'U_LAST_POST'		=> append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
192
+				'U_VIEWTOPIC'		=> append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&amp;t=$topic_id"),
193
+				'U_VIEWFORUM'		=> append_sid($this->phpbb_root_path.'viewforum.'.$this->php_ext, "f=$forum_id"),
194
+				'U_NEW_POST'		=> append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&amp;t=$topic_id&amp;view=unread").'#unread',
195
+				'U_LAST_POST'		=> append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&amp;t=$topic_id&amp;p=".$row['topic_last_post_id']).'#p'.$row['topic_last_post_id'],
196 196
 			));
197 197
 			unset($topic_data[$i], $post_data[$topic_id]);
198 198
 		}
Please login to merge, or discard this patch.
services/blocks/blocks.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,8 +178,7 @@
 block discarded – undo
178 178
 		if (!empty($block['content']))
179 179
 		{
180 180
 			$content = $block['content'];
181
-		}
182
-		else if ($edit_mode)
181
+		} else if ($edit_mode)
183 182
 		{
184 183
 			$content = $this->user->lang('BLOCK_NO_DATA');
185 184
 		}
Please login to merge, or discard this patch.
blocks/featured_member.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	private function change_user()
148 148
 	{
149 149
 		$change = false;
150
-		if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 ' . self::$rotations[$this->settings['rotation']]))
150
+		if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 '.self::$rotations[$this->settings['rotation']]))
151 151
 		{
152 152
 			$this->settings['last_changed'] = time();
153 153
 			$change = true;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	private function get_settings(array $bdata)
164 164
 	{
165
-		$cached_settings = $this->cache->get('pt_block_data_' . $bdata['bid']);
165
+		$cached_settings = $this->cache->get('pt_block_data_'.$bdata['bid']);
166 166
 		$settings = ($cached_settings && $cached_settings['hash'] === $bdata['hash']) ? $cached_settings : $bdata['settings'];
167 167
 		$settings['hash'] = $bdata['hash'];
168 168
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 			$sql_data = array(
183 183
 				'settings'	=> json_encode($settings)
184 184
 			);
185
-			$this->db->sql_query('UPDATE ' . $this->blocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE bid = ' . (int) $bid);
186
-			$this->cache->put('pt_block_data_' . $bid, $this->settings);
185
+			$this->db->sql_query('UPDATE '.$this->blocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE bid = '.(int) $bid);
186
+			$this->cache->put('pt_block_data_'.$bid, $this->settings);
187 187
 		}
188 188
 	}
189 189
 
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 		$rotation = $this->settings['rotation'];
236 236
 
237 237
 		$this->ptemplate->assign_vars(array(
238
-			'QTYPE_EXPLAIN'		=> ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_' . strtoupper($query_type)) : '',
239
-			'TITLE_EXPLAIN'		=> ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation) . '_MEMBER') : '',
238
+			'QTYPE_EXPLAIN'		=> ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_'.strtoupper($query_type)) : '',
239
+			'TITLE_EXPLAIN'		=> ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation).'_MEMBER') : '',
240 240
 		));
241 241
 	}
242 242
 
Please login to merge, or discard this patch.
services/poll.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 . '&amp;view=viewpoll',
103
+			'U_VIEW_RESULTS'	=> $viewtopic_url.'&amp;view=viewpoll',
104 104
 		));
105 105
 	}
106 106
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
model/base_mapper.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -336,8 +336,7 @@  discard block
 block discarded – undo
336 336
 		if ($this->settings['display_preview'])
337 337
 		{
338 338
 			$post_data = $this->forum->get_post_data($this->settings['display_preview']);
339
-		}
340
-		else
339
+		} else
341 340
 		{
342 341
 			$post_data = array_fill_keys(array_keys($topic_data), array(array('post_text' => '', 'bbcode_uid' => '', 'bbcode_bitfield' => '')));
343 342
 		}
@@ -360,8 +359,7 @@  discard block
 block discarded – undo
360 359
 				$this->fields['user_colour'] = 'topic_last_poster_colour';
361 360
 
362 361
 				$this->ptemplate->assign_var('L_POST_BY_AUTHOR', $this->user->lang('LAST_POST_BY_AUTHOR'));
363
-			}
364
-			else
362
+			} else
365 363
 			{
366 364
 				$this->fields['time'] = 'topic_time';
367 365
 				$this->fields['user_id'] = 'topic_poster';
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function save(\blitze\sitemaker\model\entity_interface $entity)
87 87
 	{
88
-		$accessor = 'get_' . $this->entity_pkey;
88
+		$accessor = 'get_'.$this->entity_pkey;
89 89
 		if (is_null($entity->$accessor()))
90 90
 		{
91 91
 			$entity = $this->insert($entity);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		{
108 108
 			if ($condition instanceof $this->entity_class)
109 109
 			{
110
-				$accessor = 'get_' . $this->entity_pkey;
110
+				$accessor = 'get_'.$this->entity_pkey;
111 111
 				$condition = array($this->entity_pkey, '=', $condition->$accessor());
112 112
 			}
113 113
 			else
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		}
118 118
 
119 119
 		$sql_where = $this->get_sql_condition($condition);
120
-		$this->db->sql_query('DELETE FROM ' . $this->entity_table . (sizeof($sql_where) ? ' WHERE ' . join(' AND ', $sql_where) : ''));
120
+		$this->db->sql_query('DELETE FROM '.$this->entity_table.(sizeof($sql_where) ? ' WHERE '.join(' AND ', $sql_where) : ''));
121 121
 	}
122 122
 
123 123
 	/**
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	protected function insert(\blitze\sitemaker\model\entity_interface $entity)
138 138
 	{
139
-		$this->db->sql_query('INSERT INTO ' . $this->entity_table . ' ' . $this->db->sql_build_array('INSERT', $entity->to_db()));
139
+		$this->db->sql_query('INSERT INTO '.$this->entity_table.' '.$this->db->sql_build_array('INSERT', $entity->to_db()));
140 140
 
141
-		$mutator = 'set_' . $this->entity_pkey;
141
+		$mutator = 'set_'.$this->entity_pkey;
142 142
 		$entity->$mutator((int) $this->db->sql_nextid());
143 143
 
144 144
 		return $entity;
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
 	 */
153 153
 	protected function update(\blitze\sitemaker\model\entity_interface $entity)
154 154
 	{
155
-		$accessor = 'get_' . $this->entity_pkey;
155
+		$accessor = 'get_'.$this->entity_pkey;
156 156
 
157
-		return $this->db->sql_query('UPDATE ' . $this->entity_table . '
158
-			SET ' . $this->db->sql_build_array('UPDATE', $entity->to_db()) . '
159
-			WHERE ' . $this->entity_pkey . ' = ' . (int) $entity->$accessor());
157
+		return $this->db->sql_query('UPDATE '.$this->entity_table.'
158
+			SET ' . $this->db->sql_build_array('UPDATE', $entity->to_db()).'
159
+			WHERE ' . $this->entity_pkey.' = '.(int) $entity->$accessor());
160 160
 	}
161 161
 
162 162
 	/**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	protected function find_sql(array $sql_where)
167 167
 	{
168
-		return 'SELECT * FROM ' . $this->entity_table .
169
-			(sizeof($sql_where) ? ' WHERE ' . join(' AND ', $sql_where) : '');
168
+		return 'SELECT * FROM '.$this->entity_table.
169
+			(sizeof($sql_where) ? ' WHERE '.join(' AND ', $sql_where) : '');
170 170
 	}
171 171
 
172 172
 	/**
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		{
183 183
 			list($field, $operator, $value) = $info;
184 184
 
185
-			$callable = 'get_sql_where_' . gettype($value);
185
+			$callable = 'get_sql_where_'.gettype($value);
186 186
 			if (is_callable(array($this, $callable)))
187 187
 			{
188 188
 				$sql_where[] = call_user_func_array(array($this, $callable), array($field, $value, $operator));
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 */
221 221
 	protected function get_sql_where_string($field, $value, $operator)
222 222
 	{
223
-		return $field . " $operator '" . $this->db->sql_escape($value) . "'";
223
+		return $field." $operator '".$this->db->sql_escape($value)."'";
224 224
 	}
225 225
 
226 226
 	/**
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	 */
232 232
 	protected function get_sql_where_integer($field, $value, $operator)
233 233
 	{
234
-		return $field . " $operator " . (int) $value;
234
+		return $field." $operator ".(int) $value;
235 235
 	}
236 236
 
237 237
 	/**
Please login to merge, or discard this patch.