@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $this->user = $user; |
53 | 53 | $this->gallery_config = $gallery_config; |
54 | 54 | $this->gallery_auth = $gallery_auth; |
55 | - $this->gallery_url = $gallery_url; |
|
55 | + $this->gallery_url = $gallery_url; |
|
56 | 56 | $this->gallery_user = $gallery_user; |
57 | 57 | } |
58 | 58 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $this->user->add_lang_ext('phpbbgallery/exif', 'exif'); |
67 | 67 | |
68 | - $return_ary['vars']['IMAGE_SETTINGS']['disp_exifdata'] = array('lang' => 'DISP_EXIF_DATA', 'validate' => 'bool', 'type' => 'radio:yes_no'); |
|
68 | + $return_ary['vars']['IMAGE_SETTINGS']['disp_exifdata'] = array('lang' => 'DISP_EXIF_DATA', 'validate' => 'bool', 'type' => 'radio:yes_no'); |
|
69 | 69 | $event['return_ary'] = $return_ary; |
70 | 70 | } |
71 | 71 | } |
@@ -146,8 +146,7 @@ |
||
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'] = ''; |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | 'EXIF_CAM_MODEL' => 'Camera-model', |
31 | 31 | 'EXIF_DATE' => 'Image taken on', |
32 | 32 | 'EXIF_EXPOSURE' => 'Shutter speed', |
33 | - 'EXIF_EXPOSURE_EXP' => '%s Sec',// 'EXIF_EXPOSURE' unit |
|
33 | + 'EXIF_EXPOSURE_EXP' => '%s Sec', // 'EXIF_EXPOSURE' unit |
|
34 | 34 | 'EXIF_EXPOSURE_BIAS' => 'Exposure bias', |
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' => 'Exposure program', |
37 | 37 | 'EXIF_EXPOSURE_PROG_0' => 'Not defined', |
38 | 38 | 'EXIF_EXPOSURE_PROG_1' => 'Manual', |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'EXIF_FLASH_CASE_93' => 'Flash fired, auto mode, return light not detected, red-eye reduction mode', |
73 | 73 | 'EXIF_FLASH_CASE_95' => 'Flash fired, auto mode, return light detected, red-eye reduction mode', |
74 | 74 | 'EXIF_FOCAL' => 'Focus length', |
75 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
75 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
76 | 76 | 'EXIF_ISO' => 'ISO speed rating', |
77 | 77 | 'EXIF_METERING_MODE' => 'Metering mode', |
78 | 78 | 'EXIF_METERING_MODE_0' => 'Unknown', |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | 'EXIF_CAM_MODEL' => 'Модель камеры', |
32 | 32 | 'EXIF_DATE' => 'Изображение заснято', |
33 | 33 | 'EXIF_EXPOSURE' => 'Выдержка', |
34 | - 'EXIF_EXPOSURE_EXP' => '%s сек',// 'EXIF_EXPOSURE' unit |
|
34 | + 'EXIF_EXPOSURE_EXP' => '%s сек', // 'EXIF_EXPOSURE' unit |
|
35 | 35 | 'EXIF_EXPOSURE_BIAS' => 'Корректировка выдержки', |
36 | - 'EXIF_EXPOSURE_BIAS_EXP' => '%s LW',// 'EXIF_EXPOSURE_BIAS' unit |
|
36 | + 'EXIF_EXPOSURE_BIAS_EXP' => '%s LW', // 'EXIF_EXPOSURE_BIAS' unit |
|
37 | 37 | 'EXIF_EXPOSURE_PROG' => 'Программа экспозиции', |
38 | 38 | 'EXIF_EXPOSURE_PROG_0' => 'Неопределенно', |
39 | 39 | 'EXIF_EXPOSURE_PROG_1' => 'Вручную', |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'EXIF_FLASH_CASE_93' => 'Вспышка сработала, авторежим, нет отражателя вспышки, подавление эффекта красных глаз', |
74 | 74 | 'EXIF_FLASH_CASE_95' => 'Вспышка сработала, авторежим, отражатель вспышки сработал, подавление эффекта красных глаз', |
75 | 75 | 'EXIF_FOCAL' => 'Фокусное расстояние', |
76 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
76 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
77 | 77 | 'EXIF_ISO' => 'ISO-чувствительность', |
78 | 78 | 'EXIF_METERING_MODE' => 'Метод выдержки и измерения', |
79 | 79 | 'EXIF_METERING_MODE_0' => 'Неизвестно', |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | 'EXIF_CAM_MODEL' => 'Kamera-Modell', |
32 | 32 | 'EXIF_DATE' => 'Bild aufgenommen am', |
33 | 33 | 'EXIF_EXPOSURE' => 'Belichtungszeit', |
34 | - 'EXIF_EXPOSURE_EXP' => '%s Sek',// 'EXIF_EXPOSURE' unit |
|
34 | + 'EXIF_EXPOSURE_EXP' => '%s Sek', // 'EXIF_EXPOSURE' unit |
|
35 | 35 | 'EXIF_EXPOSURE_BIAS' => 'Belichtungskorrektur', |
36 | - 'EXIF_EXPOSURE_BIAS_EXP' => '%s LW',// 'EXIF_EXPOSURE_BIAS' unit |
|
36 | + 'EXIF_EXPOSURE_BIAS_EXP' => '%s LW', // 'EXIF_EXPOSURE_BIAS' unit |
|
37 | 37 | 'EXIF_EXPOSURE_PROG' => 'Belichtungsprogramm', |
38 | 38 | 'EXIF_EXPOSURE_PROG_0' => 'Nicht definiert', |
39 | 39 | 'EXIF_EXPOSURE_PROG_1' => 'Manuell', |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'EXIF_FLASH_CASE_93' => 'Blitz wurde ausgelöst, Automodus, kein Messblitz-Licht zurückgeworfen, Rote-Augen-Reduzierung', |
74 | 74 | 'EXIF_FLASH_CASE_95' => 'Blitz wurde ausgelöst, Automodus, Messblitz-Licht zurückgeworfen, Rote-Augen-Reduzierung', |
75 | 75 | 'EXIF_FOCAL' => 'Brennweite', |
76 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
76 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
77 | 77 | 'EXIF_ISO' => 'ISO-Empfindlichkeit', |
78 | 78 | 'EXIF_METERING_MODE' => 'Belichtungs- Messmethode', |
79 | 79 | 'EXIF_METERING_MODE_0' => 'Unbekannt', |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | 'EXIF_CAM_MODEL' => 'Modèle d’appareil photo', |
32 | 32 | 'EXIF_DATE' => 'Image prise le', |
33 | 33 | 'EXIF_EXPOSURE' => 'Vitesse d’obturation', |
34 | - 'EXIF_EXPOSURE_EXP' => '%s Sec',// 'EXIF_EXPOSURE' unit |
|
34 | + 'EXIF_EXPOSURE_EXP' => '%s Sec', // 'EXIF_EXPOSURE' unit |
|
35 | 35 | 'EXIF_EXPOSURE_BIAS' => 'Angle d’exposition', |
36 | - 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV',// 'EXIF_EXPOSURE_BIAS' unit |
|
36 | + 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV', // 'EXIF_EXPOSURE_BIAS' unit |
|
37 | 37 | 'EXIF_EXPOSURE_PROG' => 'Programme d’exposition', |
38 | 38 | 'EXIF_EXPOSURE_PROG_0' => 'Non défini', |
39 | 39 | 'EXIF_EXPOSURE_PROG_1' => 'Manuel', |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'EXIF_FLASH_CASE_93' => 'Flash déclenché, mode automatique, avec retour de lumière non détecté, yeux rouges réduits', |
74 | 74 | 'EXIF_FLASH_CASE_95' => 'Flash déclenché, mode automatique, avec retour de lumière détecté, yeux rouges réduits', |
75 | 75 | 'EXIF_FOCAL' => 'Longueur de focale', |
76 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
76 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
77 | 77 | 'EXIF_ISO' => 'Sensibilité ISO', |
78 | 78 | 'EXIF_METERING_MODE' => 'Mode de mesure', |
79 | 79 | 'EXIF_METERING_MODE_0' => 'Inconnu', |
@@ -249,8 +249,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -64,7 +64,7 @@ discard block |
||
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 |
||
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), |
@@ -279,7 +279,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -144,8 +144,7 @@ discard block |
||
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 |
||
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 |
||
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 />» ', $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 |
||
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 |
||
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'))); |
@@ -190,9 +190,9 @@ |
||
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 |
@@ -165,8 +165,7 @@ |
||
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 | } |
@@ -158,7 +158,7 @@ discard block |
||
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 |
||
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 | { |
@@ -216,8 +216,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |