@@ -389,10 +389,10 @@ discard block |
||
389 | 389 | generate_text_for_storage($album_data['album_desc'], $album_data['album_desc_uid'], $album_data['album_desc_bitfield'], $album_data['album_desc_options'], $request->variable('desc_parse_bbcode', false), $request->variable('desc_parse_urls', false), $request->variable('desc_parse_smilies', false)); |
390 | 390 | |
391 | 391 | /** |
392 | - * borrowed from phpBB3 |
|
393 | - * @author: phpBB Group |
|
394 | - * @location: acp_forums->manage_forums |
|
395 | - */ |
|
392 | + * borrowed from phpBB3 |
|
393 | + * @author: phpBB Group |
|
394 | + * @location: acp_forums->manage_forums |
|
395 | + */ |
|
396 | 396 | // Parent should always be filled otherwise we use initialise_album() |
397 | 397 | if ($album_data['parent_id']) |
398 | 398 | { |
@@ -833,13 +833,13 @@ discard block |
||
833 | 833 | } |
834 | 834 | |
835 | 835 | /** |
836 | - * Event delete user albums |
|
837 | - * |
|
838 | - * @event phpbbgallery.core.ucp.delete_album |
|
839 | - * @var int album_id Album ID |
|
840 | - * @var array deleted_albums Deleted album IDs |
|
841 | - * @since 1.2.0 |
|
842 | - */ |
|
836 | + * Event delete user albums |
|
837 | + * |
|
838 | + * @event phpbbgallery.core.ucp.delete_album |
|
839 | + * @var int album_id Album ID |
|
840 | + * @var array deleted_albums Deleted album IDs |
|
841 | + * @since 1.2.0 |
|
842 | + */ |
|
843 | 843 | $vars = array('album_id', 'deleted_albums'); |
844 | 844 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.ucp.delete_album', compact($vars))); |
845 | 845 |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $action = $request->variable('action', ''); |
52 | 52 | |
53 | 53 | /** |
54 | - * All our beautiful permissions |
|
55 | - */ |
|
54 | + * All our beautiful permissions |
|
55 | + */ |
|
56 | 56 | if (!isset($permissions)) |
57 | 57 | { |
58 | 58 | $permissions = new \stdClass(); |
@@ -703,12 +703,12 @@ discard block |
||
703 | 703 | $coal = $gallery_cache->get('albums'); |
704 | 704 | |
705 | 705 | /** |
706 | - * Grab the permissions |
|
707 | - * |
|
708 | - * includes/acp/acp_permissions.php says: |
|
709 | - * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
710 | - * // currently does not support the amount of dimensions required. ;) |
|
711 | - */ |
|
706 | + * Grab the permissions |
|
707 | + * |
|
708 | + * includes/acp/acp_permissions.php says: |
|
709 | + * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
710 | + * // currently does not support the amount of dimensions required. ;) |
|
711 | + */ |
|
712 | 712 | // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0)))); |
713 | 713 | $requests = $request->variable('setting', array(0 => array(0 => array('' => 0)))); |
714 | 714 | $p_mask_count = 0; |
@@ -762,8 +762,8 @@ discard block |
||
762 | 762 | } |
763 | 763 | } |
764 | 764 | /** |
765 | - * Inherit the permissions |
|
766 | - */ |
|
765 | + * Inherit the permissions |
|
766 | + */ |
|
767 | 767 | $inherit = $request->variable('setting', array(0 => array('' => 0))); |
768 | 768 | foreach ($inherit as $c_mask => $v_sets) |
769 | 769 | { |
@@ -993,8 +993,8 @@ discard block |
||
993 | 993 | } |
994 | 994 | |
995 | 995 | /** |
996 | - * Handles copying permissions from one album to others |
|
997 | - */ |
|
996 | + * Handles copying permissions from one album to others |
|
997 | + */ |
|
998 | 998 | private function copy_album_permissions() |
999 | 999 | { |
1000 | 1000 | global $cache, $db, $template, $user, $table_prefix, $phpbb_dispatcher, $table_name, $users_table, $phpbb_container; |
@@ -13,91 +13,91 @@ discard block |
||
13 | 13 | class rating |
14 | 14 | { |
15 | 15 | /** |
16 | - * @var \phpbb\db\driver\driver_interface |
|
17 | - */ |
|
16 | + * @var \phpbb\db\driver\driver_interface |
|
17 | + */ |
|
18 | 18 | protected $db; |
19 | 19 | |
20 | 20 | /** |
21 | - * @var \phpbb\template\template |
|
22 | - */ |
|
21 | + * @var \phpbb\template\template |
|
22 | + */ |
|
23 | 23 | protected $template; |
24 | 24 | |
25 | 25 | /** |
26 | - * @var \phpbb\user |
|
27 | - */ |
|
26 | + * @var \phpbb\user |
|
27 | + */ |
|
28 | 28 | protected $user; |
29 | 29 | |
30 | 30 | /** |
31 | - * @var \phpbb\language\language |
|
32 | - */ |
|
31 | + * @var \phpbb\language\language |
|
32 | + */ |
|
33 | 33 | protected $language; |
34 | 34 | |
35 | 35 | /** |
36 | - * @var \phpbb\request\request |
|
37 | - */ |
|
36 | + * @var \phpbb\request\request |
|
37 | + */ |
|
38 | 38 | protected $request; |
39 | 39 | |
40 | 40 | /** |
41 | - * @var \phpbbgallery\core\config |
|
42 | - */ |
|
41 | + * @var \phpbbgallery\core\config |
|
42 | + */ |
|
43 | 43 | protected $gallery_config; |
44 | 44 | |
45 | 45 | /** |
46 | - * @var \phpbbgallery\core\auth\auth |
|
47 | - */ |
|
46 | + * @var \phpbbgallery\core\auth\auth |
|
47 | + */ |
|
48 | 48 | protected $gallery_auth; |
49 | 49 | |
50 | 50 | /** |
51 | - * @var string |
|
52 | - */ |
|
51 | + * @var string |
|
52 | + */ |
|
53 | 53 | protected $images_table; |
54 | 54 | |
55 | 55 | /** |
56 | - * @var string |
|
57 | - */ |
|
56 | + * @var string |
|
57 | + */ |
|
58 | 58 | protected $albums_table; |
59 | 59 | |
60 | 60 | /** |
61 | - * @var string |
|
62 | - */ |
|
61 | + * @var string |
|
62 | + */ |
|
63 | 63 | protected $rates_table; |
64 | 64 | |
65 | 65 | /** |
66 | - * The image ID we want to rate |
|
67 | - */ |
|
66 | + * The image ID we want to rate |
|
67 | + */ |
|
68 | 68 | public $image_id = 0; |
69 | 69 | |
70 | 70 | /** |
71 | - * Private objects with the values for the image/album from the database |
|
72 | - */ |
|
71 | + * Private objects with the values for the image/album from the database |
|
72 | + */ |
|
73 | 73 | private $image_data = null; |
74 | 74 | private $album_data = null; |
75 | 75 | |
76 | 76 | /** |
77 | - * Rating the user gave the image. |
|
78 | - */ |
|
77 | + * Rating the user gave the image. |
|
78 | + */ |
|
79 | 79 | public $user_rating = null; |
80 | 80 | |
81 | 81 | /** |
82 | - * Is rating currently possible? |
|
83 | - * Might be blocked because of contest-settings. |
|
84 | - */ |
|
82 | + * Is rating currently possible? |
|
83 | + * Might be blocked because of contest-settings. |
|
84 | + */ |
|
85 | 85 | public $rating_enabled = false; |
86 | 86 | |
87 | 87 | /** |
88 | - * Classic-rating box with a dropdown. |
|
89 | - */ |
|
88 | + * Classic-rating box with a dropdown. |
|
89 | + */ |
|
90 | 90 | const MODE_SELECT = 1; |
91 | 91 | |
92 | 92 | /** |
93 | - * Rating with stars, like the old-system from youtube. |
|
93 | + * Rating with stars, like the old-system from youtube. |
|
94 | 94 | //@todo: const MODE_STARS = 2; |
95 | - */ |
|
95 | + */ |
|
96 | 96 | |
97 | 97 | /** |
98 | - * Simple thumbs up or down. |
|
98 | + * Simple thumbs up or down. |
|
99 | 99 | //@todo: const MODE_THUMB = 3; |
100 | - */ |
|
100 | + */ |
|
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Constructor |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
207 | - * Displays the box where the user can rate the image. |
|
208 | - */ |
|
207 | + * Displays the box where the user can rate the image. |
|
208 | + */ |
|
209 | 209 | public function display_box() |
210 | 210 | { |
211 | 211 | $this->template->assign_var('GALLERY_RATING', self::MODE_SELECT);//@todo: phpbb_ext_gallery_core_config::get('rating_mode')); |
@@ -280,8 +280,8 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
283 | - * Get rated value for a image |
|
284 | - */ |
|
283 | + * Get rated value for a image |
|
284 | + */ |
|
285 | 285 | private function get_image_rating_value() |
286 | 286 | { |
287 | 287 | /*if (phpbb_ext_gallery_core_contest::$mode == phpbb_ext_gallery_core_contest::MODE_SUM) |
@@ -295,14 +295,14 @@ discard block |
||
295 | 295 | } |
296 | 296 | |
297 | 297 | /** |
298 | - * Is the user allowed to rate? |
|
299 | - * Following statements must be true: |
|
300 | - * - User must have permissions. |
|
301 | - * - User is neither owner of the image nor guest. |
|
302 | - * - Album and image are not locked. |
|
303 | - * |
|
304 | - * @return bool |
|
305 | - */ |
|
298 | + * Is the user allowed to rate? |
|
299 | + * Following statements must be true: |
|
300 | + * - User must have permissions. |
|
301 | + * - User is neither owner of the image nor guest. |
|
302 | + * - Album and image are not locked. |
|
303 | + * |
|
304 | + * @return bool |
|
305 | + */ |
|
306 | 306 | public function is_allowed() |
307 | 307 | { |
308 | 308 | return $this->gallery_auth->acl_check('i_rate', $this->album_data('album_id'), $this->album_data('album_user_id')) && |
@@ -311,25 +311,25 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
314 | - * Is the user able to rate? |
|
315 | - * Following statements must be true: |
|
316 | - * - User must be allowed to rate |
|
317 | - * - If the image is in a contest, it must be in the rating timespan |
|
318 | - * |
|
319 | - * @return bool |
|
320 | - */ |
|
314 | + * Is the user able to rate? |
|
315 | + * Following statements must be true: |
|
316 | + * - User must be allowed to rate |
|
317 | + * - If the image is in a contest, it must be in the rating timespan |
|
318 | + * |
|
319 | + * @return bool |
|
320 | + */ |
|
321 | 321 | public function is_able() |
322 | 322 | { |
323 | 323 | return $this->is_allowed(); //&& phpbb_ext_gallery_core_contest::is_step('rate', $this->album_data(true)); |
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
327 | - * Get rating from a user for a given image |
|
328 | - * |
|
329 | - * @param int $user_id |
|
330 | - * |
|
331 | - * @return mixed False if the user did not rate or is guest, otherwise int the points. |
|
332 | - */ |
|
327 | + * Get rating from a user for a given image |
|
328 | + * |
|
329 | + * @param int $user_id |
|
330 | + * |
|
331 | + * @return mixed False if the user did not rate or is guest, otherwise int the points. |
|
332 | + */ |
|
333 | 333 | public function get_user_rating($user_id) |
334 | 334 | { |
335 | 335 | if (isset($this->user_rating[$user_id])) |
@@ -405,10 +405,10 @@ discard block |
||
405 | 405 | } |
406 | 406 | |
407 | 407 | /** |
408 | - * Recalculate the average image-rating and such stuff. |
|
409 | - * |
|
410 | - * @param mixed $image_ids Array or integer with image_id where we recalculate the rating. |
|
411 | - */ |
|
408 | + * Recalculate the average image-rating and such stuff. |
|
409 | + * |
|
410 | + * @param mixed $image_ids Array or integer with image_id where we recalculate the rating. |
|
411 | + */ |
|
412 | 412 | public function recalc_image_rating($image_ids) |
413 | 413 | { |
414 | 414 | if (is_array($image_ids)) |
@@ -439,11 +439,11 @@ discard block |
||
439 | 439 | } |
440 | 440 | |
441 | 441 | /** |
442 | - * Delete all ratings for given image_ids |
|
443 | - * |
|
444 | - * @param mixed $image_ids Array or integer with image_id where we delete the rating. |
|
445 | - * @param bool $reset_average Shall we also reset the average? We can save that query, when the images are deleted anyway. |
|
446 | - */ |
|
442 | + * Delete all ratings for given image_ids |
|
443 | + * |
|
444 | + * @param mixed $image_ids Array or integer with image_id where we delete the rating. |
|
445 | + * @param bool $reset_average Shall we also reset the average? We can save that query, when the images are deleted anyway. |
|
446 | + */ |
|
447 | 447 | public function delete_ratings($image_ids, $reset_average = false) |
448 | 448 | { |
449 | 449 | if (is_array($image_ids)) |
@@ -22,28 +22,28 @@ discard block |
||
22 | 22 | private $config; |
23 | 23 | |
24 | 24 | /** |
25 | - * Path from the gallery root, back to phpbb's root |
|
26 | - */ |
|
25 | + * Path from the gallery root, back to phpbb's root |
|
26 | + */ |
|
27 | 27 | private $phpbb_root_path = '../'; |
28 | 28 | |
29 | 29 | /** |
30 | - * Path from the phpbb root, into admin's root |
|
31 | - */ |
|
30 | + * Path from the phpbb root, into admin's root |
|
31 | + */ |
|
32 | 32 | private $phpbb_admin_path = 'adm/'; |
33 | 33 | |
34 | 34 | /** |
35 | - * Path from the phpbb root, into gallery's file root |
|
36 | - */ |
|
35 | + * Path from the phpbb root, into gallery's file root |
|
36 | + */ |
|
37 | 37 | private $phpbb_gallery_file_path = 'files/phpbbgallery/'; |
38 | 38 | |
39 | 39 | /** |
40 | - * Path from the phpbb root, into gallery's root |
|
41 | - */ |
|
40 | + * Path from the phpbb root, into gallery's root |
|
41 | + */ |
|
42 | 42 | private $phpbb_gallery_path = 'gallery/'; |
43 | 43 | |
44 | 44 | /** |
45 | - * PHP file extension (e.g. .php) |
|
46 | - */ |
|
45 | + * PHP file extension (e.g. .php) |
|
46 | + */ |
|
47 | 47 | private $php_ext; |
48 | 48 | |
49 | 49 | const IMAGE_PATH = 'images/'; |
@@ -237,16 +237,16 @@ discard block |
||
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
240 | - * Creates beautiful relative path from ugly relative path |
|
241 | - * Resolves .. (up directory) |
|
242 | - * |
|
243 | - * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
244 | - * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
245 | - * |
|
246 | - * @param string ugly path e.g. "../community/../gallery/" |
|
247 | - * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
248 | - * @return string beautiful path e.g. "../gallery/" |
|
249 | - */ |
|
240 | + * Creates beautiful relative path from ugly relative path |
|
241 | + * Resolves .. (up directory) |
|
242 | + * |
|
243 | + * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
244 | + * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
245 | + * |
|
246 | + * @param string ugly path e.g. "../community/../gallery/" |
|
247 | + * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
248 | + * @return string beautiful path e.g. "../gallery/" |
|
249 | + */ |
|
250 | 250 | static public function beautiful_path($path, $is_full_url = false) |
251 | 251 | { |
252 | 252 | // Remove any repeated slashes |
@@ -288,10 +288,10 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | /** |
291 | - * Custom meta_refresh implementation |
|
292 | - * @param int $time Time in seconds. |
|
293 | - * @param string $route Route generated by $helper->route |
|
294 | - */ |
|
291 | + * Custom meta_refresh implementation |
|
292 | + * @param int $time Time in seconds. |
|
293 | + * @param string $route Route generated by $helper->route |
|
294 | + */ |
|
295 | 295 | public function meta_refresh($time, $route) |
296 | 296 | { |
297 | 297 | // For XHTML compatibility we change back & to & |
@@ -41,57 +41,57 @@ discard block |
||
41 | 41 | protected $acl_cache = array(); |
42 | 42 | |
43 | 43 | /** |
44 | - * Cache object |
|
45 | - * @var \phpbbgallery\core\cache |
|
46 | - */ |
|
44 | + * Cache object |
|
45 | + * @var \phpbbgallery\core\cache |
|
46 | + */ |
|
47 | 47 | protected $cache; |
48 | 48 | |
49 | 49 | /** |
50 | - * Database object |
|
51 | - * @var \phpbb\db\driver\driver |
|
52 | - */ |
|
50 | + * Database object |
|
51 | + * @var \phpbb\db\driver\driver |
|
52 | + */ |
|
53 | 53 | protected $db; |
54 | 54 | |
55 | 55 | /** |
56 | - * Gallery user object |
|
57 | - * @var \phpbbgallery\core\user |
|
58 | - */ |
|
56 | + * Gallery user object |
|
57 | + * @var \phpbbgallery\core\user |
|
58 | + */ |
|
59 | 59 | protected $user; |
60 | 60 | |
61 | 61 | /** |
62 | - * phpBB user object |
|
63 | - * @var \phpbb\user |
|
64 | - */ |
|
62 | + * phpBB user object |
|
63 | + * @var \phpbb\user |
|
64 | + */ |
|
65 | 65 | protected $phpbb_user; |
66 | 66 | |
67 | 67 | /** |
68 | - * phpBB auth object |
|
69 | - * @var \phpbb\auth\auth |
|
70 | - */ |
|
68 | + * phpBB auth object |
|
69 | + * @var \phpbb\auth\auth |
|
70 | + */ |
|
71 | 71 | protected $auth; |
72 | 72 | |
73 | 73 | /** |
74 | - * Gallery permissions table |
|
75 | - * @var string |
|
76 | - */ |
|
74 | + * Gallery permissions table |
|
75 | + * @var string |
|
76 | + */ |
|
77 | 77 | protected $table_permissions; |
78 | 78 | |
79 | 79 | /** |
80 | - * Gallery permission roles table |
|
81 | - * @var string |
|
82 | - */ |
|
80 | + * Gallery permission roles table |
|
81 | + * @var string |
|
82 | + */ |
|
83 | 83 | protected $table_roles; |
84 | 84 | |
85 | 85 | /** |
86 | - * Gallery users table |
|
87 | - * @var string |
|
88 | - */ |
|
86 | + * Gallery users table |
|
87 | + * @var string |
|
88 | + */ |
|
89 | 89 | protected $table_users; |
90 | 90 | |
91 | 91 | /** |
92 | - * Gallery albums table |
|
93 | - * @var string |
|
94 | - */ |
|
92 | + * Gallery albums table |
|
93 | + * @var string |
|
94 | + */ |
|
95 | 95 | protected $table_albums; |
96 | 96 | |
97 | 97 | /** |
@@ -339,8 +339,8 @@ discard block |
||
339 | 339 | } |
340 | 340 | |
341 | 341 | /** |
342 | - * Merge the NEVER-options into the YES-options by removing the YES, if it is set. |
|
343 | - */ |
|
342 | + * Merge the NEVER-options into the YES-options by removing the YES, if it is set. |
|
343 | + */ |
|
344 | 344 | protected function merge_acl_row() |
345 | 345 | { |
346 | 346 | foreach ($this->_auth_data as $album_id => $obj) |
@@ -585,14 +585,14 @@ discard block |
||
585 | 585 | } |
586 | 586 | |
587 | 587 | /** |
588 | - * Get permission |
|
589 | - * |
|
590 | - * @param string $acl One of the permissions, Exp: i_view |
|
591 | - * @param int $a_id The album_id, from which we want to have the permissions |
|
592 | - * @param int $u_id The user_id from the album-owner. If not specified we need to get it from the cache. |
|
593 | - * |
|
594 | - * @return bool Is the user allowed to do the $acl? |
|
595 | - */ |
|
588 | + * Get permission |
|
589 | + * |
|
590 | + * @param string $acl One of the permissions, Exp: i_view |
|
591 | + * @param int $a_id The album_id, from which we want to have the permissions |
|
592 | + * @param int $u_id The user_id from the album-owner. If not specified we need to get it from the cache. |
|
593 | + * |
|
594 | + * @return bool Is the user allowed to do the $acl? |
|
595 | + */ |
|
596 | 596 | public function acl_check($acl, $a_id, $u_id = -1) |
597 | 597 | { |
598 | 598 | $bit = self::$_permissions_flipped[$acl]; |
@@ -655,12 +655,12 @@ discard block |
||
655 | 655 | } |
656 | 656 | |
657 | 657 | /** |
658 | - * Does the user have the permission for any album? |
|
659 | - * |
|
660 | - * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
661 | - * |
|
662 | - * @return bool Is the user allowed to do the $acl? |
|
663 | - */ |
|
658 | + * Does the user have the permission for any album? |
|
659 | + * |
|
660 | + * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
661 | + * |
|
662 | + * @return bool Is the user allowed to do the $acl? |
|
663 | + */ |
|
664 | 664 | public function acl_check_global($acl) |
665 | 665 | { |
666 | 666 | $bit = self::$_permissions_flipped[$acl]; |
@@ -692,16 +692,16 @@ discard block |
||
692 | 692 | } |
693 | 693 | |
694 | 694 | /** |
695 | - * Get albums by permission |
|
696 | - * |
|
697 | - * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
698 | - * @param string $return Type of the return value. array returns an array, else it's a string. |
|
699 | - * bool means it only checks whether the user has the permission anywhere. |
|
700 | - * @param bool $display_in_rrc Only return albums, that have the display_in_rrc-flag set. |
|
701 | - * @param bool $display_pegas Include personal galleries in the list. |
|
702 | - * |
|
703 | - * @return mixed $album_ids, either as list or array. |
|
704 | - */ |
|
695 | + * Get albums by permission |
|
696 | + * |
|
697 | + * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
698 | + * @param string $return Type of the return value. array returns an array, else it's a string. |
|
699 | + * bool means it only checks whether the user has the permission anywhere. |
|
700 | + * @param bool $display_in_rrc Only return albums, that have the display_in_rrc-flag set. |
|
701 | + * @param bool $display_pegas Include personal galleries in the list. |
|
702 | + * |
|
703 | + * @return mixed $album_ids, either as list or array. |
|
704 | + */ |
|
705 | 705 | public function acl_album_ids($acl, $return = 'array', $display_in_rrc = false, $display_pegas = true) |
706 | 706 | { |
707 | 707 | $bit = self::$_permissions_flipped[$acl]; |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
107 | - * Image File Controller |
|
108 | - * Route: gallery/image/{image_id}/source |
|
109 | - * |
|
110 | - * @param int $image_id |
|
111 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
112 | - */ |
|
107 | + * Image File Controller |
|
108 | + * Route: gallery/image/{image_id}/source |
|
109 | + * |
|
110 | + * @param int $image_id |
|
111 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
112 | + */ |
|
113 | 113 | public function source($image_id) |
114 | 114 | { |
115 | 115 | $this->auth->load_user_permissions($this->user->data['user_id']); |
@@ -160,12 +160,12 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * Image File Controller |
|
164 | - * Route: gallery/image/{image_id}/medium |
|
165 | - * |
|
166 | - * @param int $image_id |
|
167 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
168 | - */ |
|
163 | + * Image File Controller |
|
164 | + * Route: gallery/image/{image_id}/medium |
|
165 | + * |
|
166 | + * @param int $image_id |
|
167 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
168 | + */ |
|
169 | 169 | public function medium($image_id) |
170 | 170 | { |
171 | 171 | |
@@ -195,12 +195,12 @@ discard block |
||
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
198 | - * Image File Controller |
|
199 | - * Route: gallery/image/{image_id}/mini |
|
200 | - * |
|
201 | - * @param int $image_id |
|
202 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
203 | - */ |
|
198 | + * Image File Controller |
|
199 | + * Route: gallery/image/{image_id}/mini |
|
200 | + * |
|
201 | + * @param int $image_id |
|
202 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
203 | + */ |
|
204 | 204 | public function mini($image_id) |
205 | 205 | { |
206 | 206 | $this->path = $this->path_mini; |
@@ -356,11 +356,11 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | /** |
359 | - * Image File Controller |
|
360 | - * Route: gallery/image/{image_id}/x |
|
361 | - * |
|
362 | - * @return \Symfony\Component\HttpFoundation\BinaryFileResponseResponse A Symfony Response object |
|
363 | - */ |
|
359 | + * Image File Controller |
|
360 | + * Route: gallery/image/{image_id}/x |
|
361 | + * |
|
362 | + * @return \Symfony\Component\HttpFoundation\BinaryFileResponseResponse A Symfony Response object |
|
363 | + */ |
|
364 | 364 | public function display() |
365 | 365 | { |
366 | 366 | $this->tool->set_last_modified($this->gallery_user->get_data('user_permissions_changed')); |
@@ -243,9 +243,9 @@ |
||
243 | 243 | } |
244 | 244 | |
245 | 245 | /** |
246 | - * Get all recent images the user has access to |
|
247 | - * return (int) $images_count |
|
248 | - */ |
|
246 | + * Get all recent images the user has access to |
|
247 | + * return (int) $images_count |
|
248 | + */ |
|
249 | 249 | public function recent_count() |
250 | 250 | { |
251 | 251 | $this->gallery_auth->load_user_permissions($this->user->data['user_id']); |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * Delete source files without a database entry. |
|
89 | - * |
|
90 | - * @param array $filenames An array of filenames |
|
91 | - * @return string Language key for the success message. |
|
92 | - */ |
|
88 | + * Delete source files without a database entry. |
|
89 | + * |
|
90 | + * @param array $filenames An array of filenames |
|
91 | + * @return string Language key for the success message. |
|
92 | + */ |
|
93 | 93 | public function delete_files($filenames) |
94 | 94 | { |
95 | 95 | foreach ($filenames as $file) |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
105 | - * Delete images, where the source file is missing. |
|
106 | - * |
|
107 | - * @param mixed $image_ids Either an array of integers or an integer. |
|
108 | - * @return string Language key for the success message. |
|
109 | - */ |
|
105 | + * Delete images, where the source file is missing. |
|
106 | + * |
|
107 | + * @param mixed $image_ids Either an array of integers or an integer. |
|
108 | + * @return string Language key for the success message. |
|
109 | + */ |
|
110 | 110 | public function delete_images($image_ids) |
111 | 111 | { |
112 | 112 | $this->log->add_log('admin', 'clean_deleteentries', 0, 0, array('LOG_CLEANUP_DELETE_ENTRIES', count($image_ids))); |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * Delete images, where the author is missing. |
|
120 | - * |
|
121 | - * @param mixed $image_ids Either an array of integers or an integer. |
|
122 | - * @return string Language key for the success message. |
|
123 | - */ |
|
119 | + * Delete images, where the author is missing. |
|
120 | + * |
|
121 | + * @param mixed $image_ids Either an array of integers or an integer. |
|
122 | + * @return string Language key for the success message. |
|
123 | + */ |
|
124 | 124 | public function delete_author_images($image_ids) |
125 | 125 | { |
126 | 126 | $this->log->add_log('admin', 'clean_deletenoauthors', 0, 0, array('LOG_CLEANUP_DELETE_NO_AUTHOR', count($image_ids))); |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * Delete comments, where the author is missing. |
|
134 | - * |
|
135 | - * @param mixed $comment_ids Either an array of integers or an integer. |
|
136 | - * @return string Language key for the success message. |
|
137 | - */ |
|
133 | + * Delete comments, where the author is missing. |
|
134 | + * |
|
135 | + * @param mixed $comment_ids Either an array of integers or an integer. |
|
136 | + * @return string Language key for the success message. |
|
137 | + */ |
|
138 | 138 | public function delete_author_comments($comment_ids) |
139 | 139 | { |
140 | 140 | $this->log->add_log('admin', 'clean_deletecna', 0, 0, array('LOG_CLEANUP_COMMENT_DELETE_NO_AUTHOR', count($comment_ids))); |
@@ -144,12 +144,12 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * Delete unwanted and obsolete personal galleries. |
|
148 | - * |
|
149 | - * @param array $unwanted_pegas User IDs we want to delete the pegas. |
|
150 | - * @param array $obsolete_pegas User IDs we want to delete the pegas. |
|
151 | - * @return array Language keys for the success messages. |
|
152 | - */ |
|
147 | + * Delete unwanted and obsolete personal galleries. |
|
148 | + * |
|
149 | + * @param array $unwanted_pegas User IDs we want to delete the pegas. |
|
150 | + * @param array $obsolete_pegas User IDs we want to delete the pegas. |
|
151 | + * @return array Language keys for the success messages. |
|
152 | + */ |
|
153 | 153 | public function delete_pegas($unwanted_pegas, $obsolete_pegas) |
154 | 154 | { |
155 | 155 | |
@@ -280,8 +280,8 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
283 | - * |
|
284 | - */ |
|
283 | + * |
|
284 | + */ |
|
285 | 285 | public function prune($pattern) |
286 | 286 | { |
287 | 287 | $sql_where = ''; |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
328 | - * |
|
329 | - */ |
|
328 | + * |
|
329 | + */ |
|
330 | 330 | public function lang_prune_pattern($pattern) |
331 | 331 | { |
332 | 332 | if (isset($pattern['image_album_id'])) |
@@ -817,8 +817,8 @@ discard block |
||
817 | 817 | $log_action = implode('_', array($log_action_images, $log_action_albums)); |
818 | 818 | |
819 | 819 | /** |
820 | - * Log what we did |
|
821 | - */ |
|
820 | + * Log what we did |
|
821 | + */ |
|
822 | 822 | switch ($log_action) |
823 | 823 | { |
824 | 824 | case 'MOVE_IMAGES_MOVE_ALBUMS': |
@@ -908,14 +908,14 @@ discard block |
||
908 | 908 | $this->gallery_notification->delete_albums($from_id); |
909 | 909 | |
910 | 910 | /** |
911 | - * Event related to moving album content |
|
912 | - * |
|
913 | - * @event phpbbgallery.core.album.manage.move_album_content |
|
914 | - * @var int from_id Album we are moving from |
|
915 | - * @var int to_id Album we are moving to |
|
916 | - * @var bool sync Should we sync the albums data |
|
917 | - * @since 1.2.0 |
|
918 | - */ |
|
911 | + * Event related to moving album content |
|
912 | + * |
|
913 | + * @event phpbbgallery.core.album.manage.move_album_content |
|
914 | + * @var int from_id Album we are moving from |
|
915 | + * @var int to_id Album we are moving to |
|
916 | + * @var bool sync Should we sync the albums data |
|
917 | + * @since 1.2.0 |
|
918 | + */ |
|
919 | 919 | $vars = array('from_id', 'to_id', 'sync'); |
920 | 920 | extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.move_album_content', compact($vars))); |
921 | 921 | |
@@ -1017,12 +1017,12 @@ discard block |
||
1017 | 1017 | $this->gallery_config->set('num_comments', (int) $row['num_comments']); |
1018 | 1018 | |
1019 | 1019 | /** |
1020 | - * Event delete album content |
|
1021 | - * |
|
1022 | - * @event phpbbgallery.core.album.manage.delete_album_content |
|
1023 | - * @var int album_id Album we are deleting |
|
1024 | - * @since 1.2.0 |
|
1025 | - */ |
|
1020 | + * Event delete album content |
|
1021 | + * |
|
1022 | + * @event phpbbgallery.core.album.manage.delete_album_content |
|
1023 | + * @var int album_id Album we are deleting |
|
1024 | + * @since 1.2.0 |
|
1025 | + */ |
|
1026 | 1026 | $vars = array('album_id'); |
1027 | 1027 | extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.delete_album_content', compact($vars))); |
1028 | 1028 | |
@@ -1045,11 +1045,11 @@ discard block |
||
1045 | 1045 | public function move_album_by($album_row, $action = 'move_up', $steps = 1) |
1046 | 1046 | { |
1047 | 1047 | /** |
1048 | - * Fetch all the siblings between the module's current spot |
|
1049 | - * and where we want to move it to. If there are less than $steps |
|
1050 | - * siblings between the current spot and the target then the |
|
1051 | - * module will move as far as possible |
|
1052 | - */ |
|
1048 | + * Fetch all the siblings between the module's current spot |
|
1049 | + * and where we want to move it to. If there are less than $steps |
|
1050 | + * siblings between the current spot and the target then the |
|
1051 | + * module will move as far as possible |
|
1052 | + */ |
|
1053 | 1053 | $sql = 'SELECT album_id, album_name, left_id, right_id |
1054 | 1054 | FROM ' . $this->albums_table . ' |
1055 | 1055 | WHERE parent_id = ' . (int) $album_row['parent_id'] . ' |
@@ -1071,12 +1071,12 @@ discard block |
||
1071 | 1071 | } |
1072 | 1072 | |
1073 | 1073 | /** |
1074 | - * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
1075 | - * $diff_up and $diff_down are the values to subtract or add to each node's left_id |
|
1076 | - * and right_id in order to move them up or down. |
|
1077 | - * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
1078 | - * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
1079 | - */ |
|
1074 | + * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
1075 | + * $diff_up and $diff_down are the values to subtract or add to each node's left_id |
|
1076 | + * and right_id in order to move them up or down. |
|
1077 | + * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
1078 | + * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
1079 | + */ |
|
1080 | 1080 | if ($action == 'move_up') |
1081 | 1081 | { |
1082 | 1082 | $left_id = $target['left_id']; |