Passed
Pull Request — master (#340)
by
unknown
02:34
created
exif/event/exif_listener.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,8 +146,7 @@
 block discarded – undo
146 146
 
147 147
 			$event['additional_sql_data'] = $additional_sql_data;
148 148
 			unset($exif);
149
-		}
150
-		else
149
+		} else
151 150
 		{
152 151
 			$additional_sql_data = $event['additional_sql_data'];
153 152
 			$additional_sql_data['image_exif_data'] = '';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		$this->user = $user;
71 71
 		$this->gallery_config = $gallery_config;
72 72
 		$this->gallery_auth = $gallery_auth;
73
-		$this->gallery_url	= $gallery_url;
73
+		$this->gallery_url = $gallery_url;
74 74
 		$this->gallery_user = $gallery_user;
75 75
 	}
76 76
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			{
84 84
 				$this->user->add_lang_ext('phpbbgallery/exif', 'info_exif');
85 85
 
86
-				$return_ary['vars']['IMAGE_SETTINGS']['disp_exifdata'] = array('lang' => 'DISP_EXIF_DATA',		'validate' => 'bool',	'type' => 'radio:yes_no');
86
+				$return_ary['vars']['IMAGE_SETTINGS']['disp_exifdata'] = array('lang' => 'DISP_EXIF_DATA', 'validate' => 'bool', 'type' => 'radio:yes_no');
87 87
 				$event['return_ary'] = $return_ary;
88 88
 			}
89 89
 		}
Please login to merge, or discard this patch.
core/report.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -249,8 +249,7 @@  discard block
 block discarded – undo
249 249
 			{
250 250
 				$mod_array[] = 0;
251 251
 			}
252
-		}
253
-		else
252
+		} else
254 253
 		{
255 254
 			$mod_array = array($album);
256 255
 		}
@@ -340,8 +339,7 @@  discard block
 block discarded – undo
340 339
 			$this->template->assign_vars(array(
341 340
 				'TOTAL_PAGES'				=> $this->language->lang('PAGE_TITLE_NUMBER', $page + 1),
342 341
 			));
343
-		}
344
-		else
342
+		} else
345 343
 		{
346 344
 			$this->pagination->generate_template_pagination(array(
347 345
 				'routes' => array(
@@ -396,8 +394,7 @@  discard block
 block discarded – undo
396 394
 		if (is_array($ids))
397 395
 		{
398 396
 			return array_map('intval', $ids);
399
-		}
400
-		else
397
+		} else
401 398
 		{
402 399
 			return array((int) $ids);
403 400
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	protected $reports_table;
65 65
 
66 66
 	public function __construct(\phpbbgallery\core\log $gallery_log, \phpbbgallery\core\auth\auth $gallery_auth, \phpbb\user $user,
67
-		\phpbb\language\language $language, \phpbb\db\driver\driver_interface $db,	\phpbb\user_loader $user_loader,
67
+		\phpbb\language\language $language, \phpbb\db\driver\driver_interface $db, \phpbb\user_loader $user_loader,
68 68
 		\phpbbgallery\core\album\album $album, \phpbb\template\template $template, \phpbb\controller\helper $helper,
69 69
 		\phpbbgallery\core\config $gallery_config, \phpbb\pagination $pagination, \phpbbgallery\core\notification\helper $notification_helper,
70 70
 		$images_table, $reports_table)
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 				'REPORT_TIME'	=> $this->user->format_date($VAR['report_time']),
364 364
 			));
365 365
 			unset($album_tmp);
366
-			$reported_images_count ++;
366
+			$reported_images_count++;
367 367
 		}
368 368
 		$this->template->assign_vars(array(
369 369
 			'TOTAL_IMAGES_REPORTED' => $status == 1 ? $this->language->lang('WAITING_REPORTED_IMAGE', (int) $count) : $this->language->lang('WAITING_REPORTED_DONE', (int) $count),
Please login to merge, or discard this patch.
core/upload.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			include_once($this->root_path . 'includes/message_parser.' . $this->php_ext);
280 280
 		}
281 281
 		$message_parser = new \parse_message();
282
-		$message_parser->message	= utf8_normalize_nfc($this->get_description());
282
+		$message_parser->message = utf8_normalize_nfc($this->get_description());
283 283
 		if ($message_parser->message)
284 284
 		{
285 285
 			$message_parser->parse(true, true, true, true, false, true, true, true);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
 		$sql_ary = array_merge($sql_ary, $additional_sql_data);
336 336
 
337
-		$sql = 'UPDATE ' . $this->images_table. ' 
337
+		$sql = 'UPDATE ' . $this->images_table . ' 
338 338
 			SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
339 339
 			WHERE image_id = ' . (int) $image_id;
340 340
 		$this->db->sql_query($sql);
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 		// Rotate the image
453 453
 		if ($this->gallery_config->get('allow_rotate') && $this->get_rotating())
454 454
 		{
455
-			$this->tools->rotate_image($this->get_rotating(),$this->gallery_config->get('allow_resize'));
455
+			$this->tools->rotate_image($this->get_rotating(), $this->gallery_config->get('allow_resize'));
456 456
 			if ($this->tools->rotated)
457 457
 			{
458 458
 				$this->tools->write_image($this->tools->image_source, $this->gallery_config->get('jpg_quality'), true);
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
 			{
145 145
 				$this->zip_file = $this->file;
146 146
 				$this->upload_zip();
147
-			}
148
-			else
147
+			} else
149 148
 			{
150 149
 				$image_id = $this->prepare_file();
151 150
 				if ($image_id)
@@ -210,8 +209,7 @@  discard block
 block discarded – undo
210 209
 			if (is_dir($current_dir . $file))
211 210
 			{
212 211
 				$this->read_zip_folder($current_dir . $file . '/');
213
-			}
214
-			else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true)))
212
+			} else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true)))
215 213
 			{
216 214
 				if (!$this->file_limit || ($this->uploaded_files < $this->file_limit))
217 215
 				{
@@ -231,23 +229,20 @@  discard block
 block discarded – undo
231 229
 					{
232 230
 						$this->uploaded_files++;
233 231
 						$this->images[] = (int) $image_id;
234
-					}
235
-					else
232
+					} else
236 233
 					{
237 234
 						if ($this->file->error)
238 235
 						{
239 236
 							$this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), implode('<br />&raquo; ', $this->file->error)));
240 237
 						}
241 238
 					}
242
-				}
243
-				else
239
+				} else
244 240
 				{
245 241
 					$this->quota_error();
246 242
 					@unlink($current_dir . $file);
247 243
 				}
248 244
 
249
-			}
250
-			else
245
+			} else
251 246
 			{
252 247
 				@unlink($current_dir . $file);
253 248
 			}
@@ -356,8 +351,7 @@  discard block
 block discarded – undo
356 351
 		{
357 352
 			$this->file->clean_filename('unique_ext');
358 353
 			$this->file->move_file(substr($this->gallery_url->path('upload'), 0, -1), false, false, CHMOD_ALL);
359
-		}
360
-		else
354
+		} else
361 355
 		{
362 356
 			// Okay, this looks hacky, but what we do here is, we store the directory name in the filename.
363 357
 			// However phpBB strips directories form the filename, when moving, so we need to specify that again.
@@ -411,8 +405,7 @@  discard block
 block discarded – undo
411 405
 					//$this->file->height = $this->tools->image_size['height'];
412 406
 					//$this->file->width = $this->tools->image_size['width'];
413 407
 				}
414
-			}
415
-			else
408
+			} else
416 409
 			{
417 410
 				$this->file->remove();
418 411
 				$this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), $this->language->lang('UPLOAD_IMAGE_SIZE_TOO_BIG')));
Please login to merge, or discard this patch.
core/contest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,9 +190,9 @@
 block discarded – undo
190 190
 		$this->db->sql_freeresult($result);
191 191
 
192 192
 		$sql = 'UPDATE ' . $this->contest_table . '
193
-			SET contest_first = ' . (int) $first .',
194
-				contest_second = ' . (int) $second .',
195
-				contest_third = ' . (int) $third .'
193
+			SET contest_first = ' . (int) $first . ',
194
+				contest_second = ' . (int) $second . ',
195
+				contest_third = ' . (int) $third . '
196 196
 			WHERE contest_album_id = ' . (int) $album_id;
197 197
 		$this->db->sql_query($sql);
198 198
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,8 +165,7 @@
 block discarded – undo
165 165
 			{
166 166
 				$this->resync($album_id);
167 167
 			}
168
-		}
169
-		else
168
+		} else
170 169
 		{
171 170
 			$this->resync((int) $album_ids);
172 171
 		}
Please login to merge, or discard this patch.
core/rating.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	*/
159 159
 	public function display_box()
160 160
 	{
161
-		$this->template->assign_var('GALLERY_RATING', self::MODE_SELECT);//@todo: phpbb_ext_gallery_core_config::get('rating_mode'));
161
+		$this->template->assign_var('GALLERY_RATING', self::MODE_SELECT); //@todo: phpbb_ext_gallery_core_config::get('rating_mode'));
162 162
 
163 163
 		switch (self::MODE_SELECT)//@todo: phpbb_ext_gallery_core_config::get('rating_mode'))
164 164
 		{
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 */
202 202
 	public function get_image_rating($user_rating = false, $display_contest_end = true)
203 203
 	{
204
-		$this->template->assign_var('GALLERY_RATING', self::MODE_SELECT);//@todo: phpbb_ext_gallery_core_config::get('rating_mode'));
204
+		$this->template->assign_var('GALLERY_RATING', self::MODE_SELECT); //@todo: phpbb_ext_gallery_core_config::get('rating_mode'));
205 205
 
206 206
 		switch (self::MODE_SELECT)//@todo: phpbb_ext_gallery_core_config::get('rating_mode'))
207 207
 		{
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -216,8 +216,7 @@  discard block
 block discarded – undo
216 216
 						return $this->language->lang('CONTEST_RATING_HIDDEN');
217 217
 					}
218 218
 					return $this->language->lang('CONTEST_RESULT_HIDDEN', $this->user->format_date(($this->album_data('contest_start') + $this->album_data('contest_end')), false, true));
219
-				}
220
-				else
219
+				} else
221 220
 				{
222 221
 					if ($user_rating)
223 222
 					{
@@ -364,8 +363,7 @@  discard block
 block discarded – undo
364 363
 		if (is_array($image_ids))
365 364
 		{
366 365
 			$image_ids = array_map('intval', $image_ids);
367
-		}
368
-		else
366
+		} else
369 367
 		{
370 368
 			$image_ids = (int) $image_ids;
371 369
 		}
@@ -399,8 +397,7 @@  discard block
 block discarded – undo
399 397
 		if (is_array($image_ids))
400 398
 		{
401 399
 			$image_ids = array_map('intval', $image_ids);
402
-		}
403
-		else
400
+		} else
404 401
 		{
405 402
 			$image_ids = (int) $image_ids;
406 403
 		}
Please login to merge, or discard this patch.
core/block.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	 *
24 24
 	 * Constants defining some album properties
25 25
 	 */
26
-	const PUBLIC_ALBUM		= 0;
26
+	const PUBLIC_ALBUM = 0;
27 27
 
28
-	const TYPE_CAT			= 0;
29
-	const TYPE_UPLOAD		= 1;
28
+	const TYPE_CAT = 0;
29
+	const TYPE_UPLOAD = 1;
30 30
 	const TYPE_CONTEST		= 2;
31 31
 
32
-	const ALBUM_OPEN		= 0;
32
+	const ALBUM_OPEN = 0;
33 33
 	const ALBUM_LOCKED		= 1;
34 34
 
35 35
 	/**
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 	/**
59 59
 	 * Only visible for moderators.
60 60
 	 */
61
-	const STATUS_UNAPPROVED	= 0;
61
+	const STATUS_UNAPPROVED = 0;
62 62
 
63 63
 	/**
64 64
 	 * Visible for everyone with the i_view-permissions
65 65
 	 */
66
-	const STATUS_APPROVED	= 1;
66
+	const STATUS_APPROVED = 1;
67 67
 
68 68
 	/**
69 69
 	 * Visible for everyone with the i_view-permissions, but only moderators can comment.
70 70
 	 */
71
-	const STATUS_LOCKED		= 2;
71
+	const STATUS_LOCKED = 2;
72 72
 
73 73
 	/**
74 74
 	 * Orphan files are only visible for their author, because they're not yet ready uploaded.
75 75
 	 */
76
-	const STATUS_ORPHAN		= 3;
76
+	const STATUS_ORPHAN = 3;
77 77
 
78 78
 	/**
79 79
 	 * Constants regarding the image contest relation
Please login to merge, or discard this patch.
core/controller/file.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@
 block discarded – undo
316 316
 
317 317
 	public function generate_image_src()
318 318
 	{
319
-		$this->image_src = $this->path  . $this->data['image_filename'];
319
+		$this->image_src = $this->path . $this->data['image_filename'];
320 320
 
321 321
 		if ($this->data['image_filemissing'] || !file_exists($this->path_source . $this->data['image_filename']))
322 322
 		{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@  discard block
 block discarded – undo
238 238
 			$this->data['album_user_id'] = 1;
239 239
 			$this->data['image_filemissing'] = 0;
240 240
 			$this->data['album_watermark'] = 0;
241
-		}
242
-		else
241
+		} else
243 242
 		{
244 243
 			$sql = 'SELECT *
245 244
 				FROM ' . $this->table_images . ' i
@@ -409,8 +408,7 @@  discard block
 block discarded – undo
409 408
 			{
410 409
 				$response->headers->set('expires', '-1');
411 410
 			}
412
-		}
413
-		else
411
+		} else
414 412
 		{
415 413
 			$response->headers->set('Content-Disposition', 'inline; ' . $this->tool->header_filename(htmlspecialchars_decode($this->tool->image_name) . '.' . $this->tool->image_type));
416 414
 			if ($this->tool->is_ie_greater7($this->user->browser))
Please login to merge, or discard this patch.
core/controller/upload.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -249,8 +249,7 @@  discard block
 block discarded – undo
249 249
 					'last_image'	=> end($process->images),
250 250
 				);
251 251
 				$this->notification_helper->new_image($data);
252
-			}
253
-			else
252
+			} else
254 253
 			{
255 254
 				$target = array(
256 255
 					'album_id'	=>	$album_id,
@@ -355,8 +354,7 @@  discard block
 block discarded – undo
355 354
 					{
356 355
 						$this->language->add_lang('ucp');
357 356
 						$error_array[] = $this->language->lang($result . '_USERNAME');
358
-					}
359
-					else
357
+					} else
360 358
 					{
361 359
 						$process->set_username($username);
362 360
 					}
@@ -375,8 +373,7 @@  discard block
 block discarded – undo
375 373
 				if (!$process->uploaded_files)
376 374
 				{
377 375
 					$process->new_error($this->language->lang('UPLOAD_NO_FILE'));
378
-				}
379
-				else
376
+				} else
380 377
 				{
381 378
 					$mode = 'upload_edit';
382 379
 					// Remove submit, so we get the first screen of step 2.
@@ -422,8 +419,7 @@  discard block
 block discarded – undo
422 419
 						if ($VAR == 'zip')
423 420
 						{
424 421
 							continue;
425
-						}
426
-						else
422
+						} else
427 423
 						{
428 424
 							$filetypes[] = $VAR;
429 425
 						}
@@ -523,8 +519,7 @@  discard block
 block discarded – undo
523 519
 						'last_image'	=> end($process->images),
524 520
 					);
525 521
 					$this->notification_helper->new_image($data);
526
-				}
527
-				else
522
+				} else
528 523
 				{
529 524
 					$target = array(
530 525
 						'album_id'	=>	(int) $album_id,
@@ -591,8 +586,7 @@  discard block
 block discarded – undo
591 586
 		if (file_exists($phpbbgallery_core_file) && is_writable($phpbbgallery_core_file) && file_exists($phpbbgallery_core_file_source) && is_writable($phpbbgallery_core_file_source) && file_exists($phpbbgallery_core_file_medium) && is_writable($phpbbgallery_core_file_medium) && file_exists($phpbbgallery_core_file_mini) && is_writable($phpbbgallery_core_file_mini))
592 587
 		{
593 588
 			return true;
594
-		}
595
-		else
589
+		} else
596 590
 		{
597 591
 			return false;
598 592
 		}
Please login to merge, or discard this patch.
core/controller/search.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
 				if ($search_terms == 'all')
233 233
 				{
234 234
 					$keywords .= ' ' . $add_keywords;
235
-				}
236
-				else
235
+				} else
237 236
 				{
238 237
 					$search_terms = 'all';
239 238
 					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords;
@@ -271,8 +270,7 @@  discard block
 block discarded – undo
271 270
 			if (empty($search_album))
272 271
 			{
273 272
 				$sql_where[] = $this->db->sql_in_set('i.image_album_id', $this->gallery_auth->acl_album_ids('i_view'));
274
-			}
275
-			else
273
+			} else
276 274
 			{
277 275
 				$sql_where[] = $this->db->sql_in_set('i.image_album_id', $search_album);
278 276
 			}
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
 
142 142
 	public function base($page = 1)
143 143
 	{
144
-		$search_id		= $this->request->variable('search_id', '');
144
+		$search_id = $this->request->variable('search_id', '');
145 145
 		$image_id		= $this->request->variable('image_id', 0);
146 146
 
147
-		$submit			= $this->request->variable('submit', false);
147
+		$submit = $this->request->variable('submit', false);
148 148
 		$keywords		= utf8_normalize_nfc($this->request->variable('keywords', '', true));
149 149
 		$add_keywords	= utf8_normalize_nfc($this->request->variable('add_keywords', '', true));
150 150
 		$username		= $this->request->variable('username', '', true);
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 		$search_terms	= $this->request->variable('terms', 'all');
153 153
 		$search_album	= $this->request->variable('aid', array(0));
154 154
 		$search_child	= $this->request->variable('sc', true);
155
-		$search_fields	= $this->request->variable('sf', 'all');
156
-		$sort_days		= $this->request->variable('st', 0);
155
+		$search_fields = $this->request->variable('sf', 'all');
156
+		$sort_days = $this->request->variable('st', 0);
157 157
 		$sort_key		= $this->request->variable('sk', 't');
158 158
 		$sort_dir		= $this->request->variable('sd', 'd');
159 159
 		$filtered		= $this->request->variable('filtered', false);
160 160
 
161
-		$start 			= ($page - 1) * $this->gallery_config->get('items_per_page');
161
+		$start = ($page - 1) * $this->gallery_config->get('items_per_page');
162 162
 		if ($filtered)
163 163
 		{
164 164
 			$submit = true;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		if ($this->gallery_config->get('allow_rates'))
176 176
 		{
177 177
 			$sort_by_text['ra'] = $this->language->lang('RATING');
178
-			$sort_by_sql['ra'] = 'image_rate_points';//@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg';
178
+			$sort_by_sql['ra'] = 'image_rate_points'; //@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg';
179 179
 			$sort_by_text['r'] = $this->language->lang('RATES_COUNT');
180 180
 			$sort_by_sql['r'] = 'image_rates';
181 181
 		}
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 				{
207 207
 					trigger_error(sprintf($this->language->lang('TOO_FEW_AUTHOR_CHARS'), $this->config['min_search_author_chars']));
208 208
 				}
209
-				$username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) .'\'';
209
+				$username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) . '\'';
210 210
 				$sql = 'SELECT user_id
211 211
 					FROM ' . USERS_TABLE . '
212 212
 					WHERE ' . $username_parsed . '
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 			if (!empty($user_id))
226 226
 			{
227
-				$sql_where[] =  $this->db->sql_in_set('i.image_user_id', $user_id);
227
+				$sql_where[] = $this->db->sql_in_set('i.image_user_id', $user_id);
228 228
 			}
229 229
 			// if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode
230 230
 			// so we can keep the old keywords in their old mode, but add the new ones as required words
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 				else
238 238
 				{
239 239
 					$search_terms = 'all';
240
-					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords;
240
+					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' . $add_keywords;
241 241
 				}
242 242
 			}
243 243
 			$keywords_ary = ($keywords) ? explode(' ', $keywords) : array();
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 				$match_search_query = '';
263 263
 				foreach ($matches as $match)
264 264
 				{
265
-					$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
265
+					$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER(' . $match . ') ';
266 266
 					$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . mb_strtolower($word) . $this->db->get_any_char()));
267 267
 				}
268 268
 				$search_query .= ((!$search_query) ? '' : (($search_terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 				trigger_error('NO_SEARCH_RESULTS');
292 292
 			}
293 293
 			$sql_array['SELECT'] = '*, a.album_name, a.album_status, a.album_user_id, a.album_id';
294
-			$sql_array['LEFT_JOIN']	= array(
294
+			$sql_array['LEFT_JOIN'] = array(
295 295
 				array(
296 296
 					'FROM'		=> array($this->albums_table => 'a'),
297 297
 					'ON'		=> 'a.album_id = i.image_album_id',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 			{
320 320
 				$this->image->assign_block('imageblock.image', $row, $show_options, $thumbnail_link, $imagename_link);
321 321
 			}
322
-			$current_page = $page*$this->gallery_config->get('items_per_page');
322
+			$current_page = $page * $this->gallery_config->get('items_per_page');
323 323
 			$this->pagination->generate_template_pagination(array(
324 324
 				'routes' => array(
325 325
 					'phpbbgallery_core_search',
Please login to merge, or discard this patch.