@@ -14,27 +14,27 @@ discard block |
||
14 | 14 | { |
15 | 15 | |
16 | 16 | /** |
17 | - * Gallery Auth Object |
|
18 | - * @var \phpbbgallery\core\auth\auth |
|
19 | - */ |
|
17 | + * Gallery Auth Object |
|
18 | + * @var \phpbbgallery\core\auth\auth |
|
19 | + */ |
|
20 | 20 | protected $auth; |
21 | 21 | |
22 | 22 | /** |
23 | - * Config Object |
|
24 | - * @var \phpbb\config\config |
|
25 | - */ |
|
23 | + * Config Object |
|
24 | + * @var \phpbb\config\config |
|
25 | + */ |
|
26 | 26 | protected $config; |
27 | 27 | |
28 | 28 | /** |
29 | - * Template Object |
|
30 | - * @var \phpbb\template\template |
|
31 | - */ |
|
29 | + * Template Object |
|
30 | + * @var \phpbb\template\template |
|
31 | + */ |
|
32 | 32 | protected $template; |
33 | 33 | |
34 | 34 | /** |
35 | - * User Object |
|
36 | - * @var \phpbb\user |
|
37 | - */ |
|
35 | + * User Object |
|
36 | + * @var \phpbb\user |
|
37 | + */ |
|
38 | 38 | protected $user; |
39 | 39 | |
40 | 40 | /** |
@@ -62,17 +62,17 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * User authorisation levels output |
|
66 | - * |
|
67 | - * @param int $album_id The current album the user is in. |
|
68 | - * @param int $album_status The albums status bit. |
|
69 | - * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
70 | - * @return null |
|
71 | - * |
|
72 | - * borrowed from phpBB3 |
|
73 | - * @author: phpBB Group |
|
74 | - * @function: gen_forum_auth_level |
|
75 | - */ |
|
65 | + * User authorisation levels output |
|
66 | + * |
|
67 | + * @param int $album_id The current album the user is in. |
|
68 | + * @param int $album_status The albums status bit. |
|
69 | + * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
70 | + * @return null |
|
71 | + * |
|
72 | + * borrowed from phpBB3 |
|
73 | + * @author: phpBB Group |
|
74 | + * @function: gen_forum_auth_level |
|
75 | + */ |
|
76 | 76 | public function display($album_id, $album_status, $album_user_id = -1) |
77 | 77 | { |
78 | 78 | $locked = ($album_status == ITEM_LOCKED && !$this->auth->acl_check('m_', $album_id, $album_user_id)) ? true : false; |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | foreach ($images as $image_src) |
59 | 59 | { |
60 | 60 | /** |
61 | - * Import the images |
|
62 | - */ |
|
61 | + * Import the images |
|
62 | + */ |
|
63 | 63 | |
64 | 64 | $image_src = str_replace("{{$import_schema}}", "'", $image_src); |
65 | 65 | $image_src_full = $gallery_url->path('import') . utf8_decode($image_src); |
@@ -160,21 +160,21 @@ discard block |
||
160 | 160 | $additional_sql_data = []; |
161 | 161 | |
162 | 162 | /** |
163 | - * Event to trigger before mass update |
|
164 | - * |
|
165 | - * @event phpbbgallery.acpimport.update_image_before |
|
166 | - * @var array additional_sql_data array of additional sql_data |
|
167 | - * @var string file_link String with real file link |
|
168 | - * @since 1.2.0 |
|
169 | - */ |
|
163 | + * Event to trigger before mass update |
|
164 | + * |
|
165 | + * @event phpbbgallery.acpimport.update_image_before |
|
166 | + * @var array additional_sql_data array of additional sql_data |
|
167 | + * @var string file_link String with real file link |
|
168 | + * @since 1.2.0 |
|
169 | + */ |
|
170 | 170 | $vars = array('additional_sql_data', 'file_link'); |
171 | 171 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image_before', compact($vars))); |
172 | 172 | |
173 | 173 | if (($filetype[0] > $gallery_config->get('max_width')) || ($filetype[1] > $gallery_config->get('max_height'))) |
174 | 174 | { |
175 | 175 | /** |
176 | - * Resize oversize images |
|
177 | - */ |
|
176 | + * Resize oversize images |
|
177 | + */ |
|
178 | 178 | if ($gallery_config->get('allow_resize')) |
179 | 179 | { |
180 | 180 | $image_tools->resize_image($gallery_config->get('max_width'), $gallery_config->get('max_height')); |
@@ -187,13 +187,13 @@ discard block |
||
187 | 187 | $file_updated = (bool) $image_tools->resized; |
188 | 188 | |
189 | 189 | /** |
190 | - * Event to trigger before mass update |
|
191 | - * |
|
192 | - * @event phpbbgallery.acpimport.update_image |
|
193 | - * @var array additional_sql_data array of additional sql_data |
|
194 | - * @var bool file_updated is file resized |
|
195 | - * @since 1.2.0 |
|
196 | - */ |
|
190 | + * Event to trigger before mass update |
|
191 | + * |
|
192 | + * @event phpbbgallery.acpimport.update_image |
|
193 | + * @var array additional_sql_data array of additional sql_data |
|
194 | + * @var bool file_updated is file resized |
|
195 | + * @since 1.2.0 |
|
196 | + */ |
|
197 | 197 | $vars = array('additional_sql_data', 'file_updated'); |
198 | 198 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image', compact($vars))); |
199 | 199 |
@@ -190,13 +190,13 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
193 | - * Event delete images |
|
194 | - * |
|
195 | - * @event phpbbgallery.core.image.delete_images |
|
196 | - * @var array images array of the image ids we are deleting |
|
197 | - * @var array filenames array of the image filenames |
|
198 | - * @since 1.2.0 |
|
199 | - */ |
|
193 | + * Event delete images |
|
194 | + * |
|
195 | + * @event phpbbgallery.core.image.delete_images |
|
196 | + * @var array images array of the image ids we are deleting |
|
197 | + * @var array filenames array of the image filenames |
|
198 | + * @since 1.2.0 |
|
199 | + */ |
|
200 | 200 | $vars = array('images', 'filenames'); |
201 | 201 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.delete_images', compact($vars))); |
202 | 202 | |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
259 | - * Get the real filenames, so we can load/delete/edit the image-file. |
|
260 | - * |
|
261 | - * @param mixed $images Array or integer with the image_id(s) |
|
262 | - * @return array Format: $image_id => $filename |
|
263 | - */ |
|
259 | + * Get the real filenames, so we can load/delete/edit the image-file. |
|
260 | + * |
|
261 | + * @param mixed $images Array or integer with the image_id(s) |
|
262 | + * @return array Format: $image_id => $filename |
|
263 | + */ |
|
264 | 264 | public function get_filenames($images) |
265 | 265 | { |
266 | 266 | if (empty($images)) |
@@ -375,13 +375,13 @@ discard block |
||
375 | 375 | $tpl = '{CONTENT}'; |
376 | 376 | |
377 | 377 | /** |
378 | - * Event generate link |
|
379 | - * |
|
380 | - * @event phpbbgallery.core.image.generate_link |
|
381 | - * @var string mode type of link |
|
382 | - * @var string tpl html to be outputted |
|
383 | - * @since 1.2.0 |
|
384 | - */ |
|
378 | + * Event generate link |
|
379 | + * |
|
380 | + * @event phpbbgallery.core.image.generate_link |
|
381 | + * @var string mode type of link |
|
382 | + * @var string tpl html to be outputted |
|
383 | + * @since 1.2.0 |
|
384 | + */ |
|
385 | 385 | $vars = array('mode', 'tpl'); |
386 | 386 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars)));//@todo: Correctly identify the event |
387 | 387 | break; |
@@ -391,12 +391,12 @@ discard block |
||
391 | 391 | } |
392 | 392 | |
393 | 393 | /** |
394 | - * Handle user- & total image_counter |
|
395 | - * |
|
396 | - * @param array $image_id_ary array with the image_ids which changed their status |
|
397 | - * @param bool $add are we adding or removing the images |
|
398 | - * @param bool $readd is it possible that there are images which aren't really changed |
|
399 | - */ |
|
394 | + * Handle user- & total image_counter |
|
395 | + * |
|
396 | + * @param array $image_id_ary array with the image_ids which changed their status |
|
397 | + * @param bool $add are we adding or removing the images |
|
398 | + * @param bool $readd is it possible that there are images which aren't really changed |
|
399 | + */ |
|
400 | 400 | public function handle_counter($image_id_ary, $add, $readd = false) |
401 | 401 | { |
402 | 402 | if (empty($image_id_ary)) |
@@ -467,11 +467,11 @@ discard block |
||
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
470 | - * Approve image |
|
471 | - * @param (array) $image_id_ary The image ID array to be approved |
|
472 | - * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
473 | - * return 0 on success |
|
474 | - */ |
|
470 | + * Approve image |
|
471 | + * @param (array) $image_id_ary The image ID array to be approved |
|
472 | + * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
473 | + * return 0 on success |
|
474 | + */ |
|
475 | 475 | public function approve_images($image_id_ary, $album_id) |
476 | 476 | { |
477 | 477 | $sql = 'SELECT image_id, image_name, image_user_id |
@@ -507,10 +507,10 @@ discard block |
||
507 | 507 | } |
508 | 508 | |
509 | 509 | /** |
510 | - * UnApprove image |
|
511 | - * @param (array) $image_id_ary The image ID array to be unapproved |
|
512 | - * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
513 | - */ |
|
510 | + * UnApprove image |
|
511 | + * @param (array) $image_id_ary The image ID array to be unapproved |
|
512 | + * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
513 | + */ |
|
514 | 514 | public function unapprove_images($image_id_ary, $album_id) |
515 | 515 | { |
516 | 516 | self::handle_counter($image_id_ary, false); |
@@ -563,10 +563,10 @@ discard block |
||
563 | 563 | } |
564 | 564 | |
565 | 565 | /** |
566 | - * Lock images |
|
567 | - * @param (array) $image_id_ary Array of images we want to lock |
|
568 | - * @param (int) $album_id Album id, so we can log the action |
|
569 | - */ |
|
566 | + * Lock images |
|
567 | + * @param (array) $image_id_ary Array of images we want to lock |
|
568 | + * @param (int) $album_id Album id, so we can log the action |
|
569 | + */ |
|
570 | 570 | public function lock_images($image_id_ary, $album_id) |
571 | 571 | { |
572 | 572 | self::handle_counter($image_id_ary, false); |
@@ -590,9 +590,9 @@ discard block |
||
590 | 590 | } |
591 | 591 | |
592 | 592 | /** |
593 | - * Get last image id |
|
594 | - * Return (int) image_id |
|
595 | - **/ |
|
593 | + * Get last image id |
|
594 | + * Return (int) image_id |
|
595 | + **/ |
|
596 | 596 | public function get_last_image() |
597 | 597 | { |
598 | 598 | $this->gallery_auth->load_user_permissions($this->user->data['user_id']); |