Passed
Pull Request — master (#316)
by
unknown
13:36
created
exif/exif.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	/**
18 18
 	* Default value for new users
19 19
 	*/
20
-	const DEFAULT_DISPLAY	= true;
20
+	const DEFAULT_DISPLAY = true;
21 21
 
22 22
 	/**
23 23
 	* phpBB will treat the time from the Exif data like UTC.
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	*
27 27
 	* Offset must be set in seconds.
28 28
 	*/
29
-	const TIME_OFFSET	= 0;
29
+	const TIME_OFFSET = 0;
30 30
 
31 31
 	/**
32 32
 	* Constants for the status of the Exif data.
33 33
 	*/
34
-	const UNAVAILABLE	= 0;
35
-	const AVAILABLE		= 1;
34
+	const UNAVAILABLE = 0;
35
+	const AVAILABLE = 1;
36 36
 	const UNKNOWN		= 2;
37 37
 	const DBSAVED		= 3;
38 38
 
@@ -44,28 +44,28 @@  discard block
 block discarded – undo
44 44
 	/**
45 45
 	* Exif data array with all allowed groups and keys.
46 46
 	*/
47
-	public $data		= array();
47
+	public $data = array();
48 48
 
49 49
 	/**
50 50
 	* Filtered data array. We don't have empty or invalid values here.
51 51
 	*/
52
-	public $prepared_data	= array();
52
+	public $prepared_data = array();
53 53
 
54 54
 	/**
55 55
 	* Does the image have exif data?
56 56
 	* Values see constant declaration at the beginning of the class.
57 57
 	*/
58
-	public $status		= 2;
58
+	public $status = 2;
59 59
 
60 60
 	/**
61 61
 	* Full data array, but serialized to a string
62 62
 	*/
63
-	public $serialized	= '';
63
+	public $serialized = '';
64 64
 
65 65
 	/**
66 66
 	* Full link to the image-file
67 67
 	*/
68
-	public $file		= '';
68
+	public $file = '';
69 69
 
70 70
 	/**
71 71
 	* Original status of the Exif data.
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	/**
76 76
 	* Image-ID, just needed to update the Exif status
77 77
 	*/
78
-	public $image_id	= false;
78
+	public $image_id = false;
79 79
 
80 80
 	/**
81 81
 	* Constructor
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			}
207 207
 			else if ($num)
208 208
 			{
209
-				$exif_exposure = ' 1/' . $den / $num ;
209
+				$exif_exposure = ' 1/' . $den / $num;
210 210
 			}
211 211
 			if ($exif_exposure)
212 212
 			{
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		}
250 250
 		if (isset($this->data["EXIF"]["ExposureBiasValue"]))
251 251
 		{
252
-			list($num,$den) = explode("/", $this->data["EXIF"]["ExposureBiasValue"]);
252
+			list($num, $den) = explode("/", $this->data["EXIF"]["ExposureBiasValue"]);
253 253
 			if ($den)
254 254
 			{
255 255
 				if (($num / $den) == 0)
@@ -323,12 +323,12 @@  discard block
 block discarded – undo
323 323
 	* There are lots of possible Exif Groups and Values.
324 324
 	* But you will never heard of the missing ones. so we just allow the most common ones.
325 325
 	*/
326
-	static private $allowed_groups		= array(
326
+	static private $allowed_groups = array(
327 327
 		'EXIF',
328 328
 		'IFD0',
329 329
 	);
330 330
 
331
-	static private $allowed_keys		= array(
331
+	static private $allowed_keys = array(
332 332
 		'DateTimeOriginal',
333 333
 		'FocalLength',
334 334
 		'ExposureTime',
Please login to merge, or discard this patch.
core/report.php 1 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.
exif/language/it/exif.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 	'EXIF_CAM_MODEL'			=> 'Modello Camera',
31 31
 	'EXIF_DATE'					=> 'Immagine scattata il',
32 32
 	'EXIF_EXPOSURE'				=> 'Velocita\' otturatore',
33
-	'EXIF_EXPOSURE_EXP'			=> '%s Sec',// 'EXIF_EXPOSURE' unit
33
+	'EXIF_EXPOSURE_EXP'			=> '%s Sec', // 'EXIF_EXPOSURE' unit
34 34
 	'EXIF_EXPOSURE_BIAS'		=> 'Inclinazione di esposizione',
35
-	'EXIF_EXPOSURE_BIAS_EXP'	=> '%s EV',// 'EXIF_EXPOSURE_BIAS' unit
35
+	'EXIF_EXPOSURE_BIAS_EXP'	=> '%s EV', // 'EXIF_EXPOSURE_BIAS' unit
36 36
 	'EXIF_EXPOSURE_PROG'		=> 'Programma di esposizione',
37 37
 	'EXIF_EXPOSURE_PROG_0'		=> 'Non definito',
38 38
 	'EXIF_EXPOSURE_PROG_1'		=> 'Manuale',
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	'EXIF_FLASH_CASE_93'		=> 'Il flash e\' scattato, modalita\' automatica, luce di ritorno non rilevata, modalita\' riduzione occhi rossi',
73 73
 	'EXIF_FLASH_CASE_95'		=> 'Il flash e\' scattato, modalita\' automatica, luce di ritorno rilevata, modalita\' riduzione occhi rossi',
74 74
 	'EXIF_FOCAL'				=> 'Lunghezza di Focus',
75
-	'EXIF_FOCAL_EXP'			=> '%s mm',// 'EXIF_FOCAL' unit
75
+	'EXIF_FOCAL_EXP'			=> '%s mm', // 'EXIF_FOCAL' unit
76 76
 	'EXIF_ISO'					=> 'Valore di velocita\' ISO',
77 77
 	'EXIF_METERING_MODE'		=> 'Modalita\' di metratura',
78 78
 	'EXIF_METERING_MODE_0'		=> 'Sconosciuta',
Please login to merge, or discard this patch.
core/controller/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 				'U_IMAGENAME'	=> ($last_image['image_id'] > 0) ? $last_image['image_name'] : false,
168 168
 				'U_IMAGE_ACTION'	=> $action_image,
169 169
 				'U_IMAGENAME_ACTION'	=> $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])),
170
-				'U_TIME'	=> ($last_image['image_id'] > 0) ?  $this->user->format_date($last_image['image_time']) : false,
170
+				'U_TIME'	=> ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false,
171 171
 				'U_UPLOADER'	=> ($last_image['image_id'] > 0) ? get_username_string('full', $last_image['image_user_id'], $last_image['image_username'], $last_image['image_user_colour']) : false,
172 172
 				'ALPHABET_NAVIGATION' => implode(' ', $alpha_links),
173 173
 			));
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 			'TOTAL_IMAGES'		=> ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '',
328 328
 			'TOTAL_COMMENTS'	=> ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '',
329 329
 			'TOTAL_PGALLERIES'	=> ($this->gallery_auth->acl_check('a_list', \phpbbgallery\core\auth\auth::PERSONAL_ALBUM)) ? $this->language->lang('TOTAL_PEGAS_SPRINTF', $this->gallery_config->get('num_pegas')) : '',
330
-			'NEWEST_PGALLERIES'	=> ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" '. ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '',
330
+			'NEWEST_PGALLERIES'	=> ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" ' . ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '',
331 331
 		));
332 332
 
333 333
 		$this->template->assign_vars(array(
@@ -425,9 +425,9 @@  discard block
 block discarded – undo
425 425
 
426 426
 			while ($row = $this->db->sql_fetchrow($result))
427 427
 			{
428
-				$birthday_username	= get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
429
-				$birthday_year		= (int) substr($row['user_birthday'], -4);
430
-				$birthday_age		= ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
428
+				$birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
429
+				$birthday_year = (int) substr($row['user_birthday'], -4);
430
+				$birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
431 431
 
432 432
 				$this->template->assign_block_vars('birthdays', array(
433 433
 					'USERNAME'	=> $birthday_username,
Please login to merge, or discard this patch.
core/controller/search.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -141,24 +141,24 @@  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);
151
-		$user_id		= $this->request->variable('user_id', array(0));
151
+		$user_id = $this->request->variable('user_id', array(0));
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.
core/album/display.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$sql = 'SELECT a2.*
98 98
 			FROM ' . $this->table_albums . ' a1
99
-			LEFT JOIN ' . $this->table_albums . ' a2 ON (' . $condition .') AND a2.album_user_id = ' . (int) $branch_user_id .'
99
+			LEFT JOIN ' . $this->table_albums . ' a2 ON (' . $condition . ') AND a2.album_user_id = ' . (int) $branch_user_id . '
100 100
 			WHERE a1.album_id = ' . (int) $album_id . '
101 101
 				AND a1.album_user_id = ' . (int) $branch_user_id . '
102 102
 			ORDER BY a2.left_id ' . (($order == 'descending') ? 'ASC' : 'DESC');
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 			'ALBUM_ID' 		=> $album_data['album_id'],
180 180
 			'ALBUM_NAME'	=> $album_data['album_name'],
181 181
 			'ALBUM_DESC'	=> generate_text_for_display($album_data['album_desc'], $album_data['album_desc_uid'], $album_data['album_desc_bitfield'], $album_data['album_desc_options']),
182
-			'ALBUM_CONTEST_START'	=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '',
183
-			'ALBUM_CONTEST_RATING'	=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '',
184
-			'ALBUM_CONTEST_END'		=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '',
182
+			'ALBUM_CONTEST_START'	=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '',
183
+			'ALBUM_CONTEST_RATING'	=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '',
184
+			'ALBUM_CONTEST_END'		=> ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '',
185 185
 			'U_VIEW_ALBUM'	=> $this->helper->route('phpbbgallery_core_album', array('album_id' => (int) $album_data['album_id'])),
186 186
 		));
187 187
 
@@ -696,9 +696,9 @@  discard block
 block discarded – undo
696 696
 				// phpbb_ext_gallery_core_image::generate_link('thumbnail', $phpbb_ext_gallery->config->get('link_thumbnail'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
697 697
 				$lastimage_uc_thumbnail = $row['album_image'] ? generate_board_url() . '/' . $row['album_image'] : $this->helper->route('phpbbgallery_core_image_file_mini', array('image_id' => $row['album_last_image_id']));
698 698
 				// phpbb_ext_gallery_core_image::generate_link('image_name', $phpbb_ext_gallery->config->get('link_image_name'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
699
-				$lastimage_uc_name = '';//@todo phpbb_ext_gallery_core_image::generate_link('image_name', $phpbb_ext_gallery->config->get('link_image_name'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
699
+				$lastimage_uc_name = ''; //@todo phpbb_ext_gallery_core_image::generate_link('image_name', $phpbb_ext_gallery->config->get('link_image_name'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
700 700
 				// phpbb_ext_gallery_core_image::generate_link('lastimage_icon', $phpbb_ext_gallery->config->get('link_image_icon'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
701
-				$lastimage_uc_icon = '';//@todo phpbb_ext_gallery_core_image::generate_link('lastimage_icon', $phpbb_ext_gallery->config->get('link_image_icon'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
701
+				$lastimage_uc_icon = ''; //@todo phpbb_ext_gallery_core_image::generate_link('lastimage_icon', $phpbb_ext_gallery->config->get('link_image_icon'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
702 702
 			}
703 703
 			else
704 704
 			{
Please login to merge, or discard this patch.
core/image/image.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 				* @since 1.2.0
384 384
 				*/
385 385
 				$vars = array('mode', 'tpl');
386
-				extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars)));//@todo: Correctly identify the event
386
+				extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars))); //@todo: Correctly identify the event
387 387
 			break;
388 388
 		}
389 389
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
 		$num_images = $num_comments = 0;
408 408
 		$sql = 'SELECT SUM(image_comments) as comments
409
-			FROM ' . $this->table_images .'
409
+			FROM ' . $this->table_images . '
410 410
 			WHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . '
411 411
 				AND ' . $this->db->sql_in_set('image_id', $image_id_ary) . '
412 412
 			GROUP BY image_user_id';
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 		$this->db->sql_freeresult($result);
416 416
 
417 417
 		$sql = 'SELECT COUNT(image_id) images, image_user_id
418
-			FROM ' . $this->table_images .' 
418
+			FROM ' . $this->table_images . ' 
419 419
 			WHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . '
420 420
 				AND ' . $this->db->sql_in_set('image_id', $image_id_ary) . '
421 421
 			GROUP BY image_user_id';
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 			return;
456 456
 		}
457 457
 
458
-		$sql = 'SELECT * FROM ' . $this->table_images .' WHERE image_id = ' . (int) $image_id;
458
+		$sql = 'SELECT * FROM ' . $this->table_images . ' WHERE image_id = ' . (int) $image_id;
459 459
 		$result = $this->db->sql_query($sql);
460 460
 		$row = $this->db->sql_fetchrow($result);
461 461
 		$this->db->sql_freeresult($result);
@@ -515,14 +515,14 @@  discard block
 block discarded – undo
515 515
 	{
516 516
 		self::handle_counter($image_id_ary, false);
517 517
 
518
-		$sql = 'UPDATE ' . $this->table_images .' 
518
+		$sql = 'UPDATE ' . $this->table_images . ' 
519 519
 			SET image_status = ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . '
520 520
 			WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . '
521 521
 				AND ' . $this->db->sql_in_set('image_id', $image_id_ary);
522 522
 		$this->db->sql_query($sql);
523 523
 
524 524
 		$sql = 'SELECT image_id, image_name
525
-			FROM ' . $this->table_images .' 
525
+			FROM ' . $this->table_images . ' 
526 526
 			WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . '
527 527
 				AND ' . $this->db->sql_in_set('image_id', $image_id_ary);
528 528
 		$result = $this->db->sql_query($sql);
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 			'U_USER_IP'		=> $show_ip && $this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $image_data['album_user_id']) ? $image_data['image_user_ip'] : false,
685 685
 
686 686
 			'S_IMAGE_REPORTED'		=> $image_data['image_reported'],
687
-			'U_IMAGE_REPORTED'		=> '',//($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
687
+			'U_IMAGE_REPORTED'		=> '', //($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
688 688
 			'S_STATUS_APPROVED'		=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? true : false,
689 689
 			'S_STATUS_UNAPPROVED'	=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false,
690 690
 			'S_STATUS_UNAPPROVED_ACTION'	=> ($this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $image_data['album_user_id']) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => (int) $image_data['image_id'])) : '',
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 			'S_STATUS_LOCKED'		=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED),
693 693
 
694 694
 			'U_REPORT'	=> ($this->gallery_auth->acl_check('m_report', $image_data['image_album_id'], $image_data['album_user_id']) && $image_data['image_reported']) ? '123'/*$this->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported'])*/ : '',
695
-			'U_STATUS'	=> '',//($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
695
+			'U_STATUS'	=> '', //($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
696 696
 			'L_STATUS'	=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')),
697 697
 		));
698 698
 	}
Please login to merge, or discard this patch.
core/controller/album.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 			$album_user_id = $image_data['album_user_id'];
371 371
 
372 372
 			//@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data);
373
-			$image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false);
373
+			$image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false);
374 374
 			//@todo: unset($rating);
375 375
 
376 376
 			$s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != \phpbbgallery\core\block::ALBUM_LOCKED));
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
 				'U_USER_IP'                  => $show_ip && $this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) ? $image_data['image_user_ip'] : false,
430 430
 				'S_IMAGE_REPORTED'           => $image_data['image_reported'],
431
-				'U_IMAGE_REPORTED'           => '',//($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
431
+				'U_IMAGE_REPORTED'           => '', //($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
432 432
 				'S_STATUS_APPROVED'          => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? true : false,
433 433
 				'S_STATUS_UNAPPROVED'        => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false,
434 434
 				'S_STATUS_UNAPPROVED_ACTION' => ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => $image_data['image_id'])) : '',
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 				'S_STATUS_LOCKED'            => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED),
437 437
 
438 438
 				'U_REPORT' => ($this->auth->acl_check('m_report', $image_data['image_album_id'], $album_user_id) && $image_data['image_reported']) ? '123'/*$this->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported'])*/ : '',
439
-				'U_STATUS' => '',//($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
439
+				'U_STATUS' => '', //($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
440 440
 				'L_STATUS' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')),
441 441
 
442 442
 				'S_CONTEST_RANK' => $image_data['image_contest_rank'],
Please login to merge, or discard this patch.