@@ -825,8 +825,8 @@ |
||
825 | 825 | generate_smilies('inline', 0); |
826 | 826 | |
827 | 827 | /** |
828 | - * Rating-System: now you can comment and rate in one form |
|
829 | - */ |
|
828 | + * Rating-System: now you can comment and rate in one form |
|
829 | + */ |
|
830 | 830 | $s_user_rated = false; |
831 | 831 | if ($this->gallery_config->get('allow_rates')) |
832 | 832 | { |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | 'phpbbgallery/acpcleanup', |
15 | 15 | ); |
16 | 16 | /** |
17 | - * Single enable step that installs any included migrations |
|
18 | - * |
|
19 | - * @param mixed $old_state State returned by previous call of this method |
|
20 | - * @return mixed Returns false after last step, otherwise temporary state |
|
21 | - */ |
|
17 | + * Single enable step that installs any included migrations |
|
18 | + * |
|
19 | + * @param mixed $old_state State returned by previous call of this method |
|
20 | + * @return mixed Returns false after last step, otherwise temporary state |
|
21 | + */ |
|
22 | 22 | function enable_step($old_state) |
23 | 23 | { |
24 | 24 | switch ($old_state) |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * Single disable step that does nothing |
|
56 | - * |
|
57 | - * @param mixed $old_state State returned by previous call of this method |
|
58 | - * @return mixed Returns false after last step, otherwise temporary state |
|
59 | - */ |
|
55 | + * Single disable step that does nothing |
|
56 | + * |
|
57 | + * @param mixed $old_state State returned by previous call of this method |
|
58 | + * @return mixed Returns false after last step, otherwise temporary state |
|
59 | + */ |
|
60 | 60 | function disable_step($old_state) |
61 | 61 | { |
62 | 62 | switch ($old_state) |
@@ -87,21 +87,21 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * Single purge step that reverts any included and installed migrations |
|
91 | - * |
|
92 | - * @param mixed $old_state State returned by previous call of this method |
|
93 | - * @return mixed Returns false after last step, otherwise temporary state |
|
94 | - */ |
|
90 | + * Single purge step that reverts any included and installed migrations |
|
91 | + * |
|
92 | + * @param mixed $old_state State returned by previous call of this method |
|
93 | + * @return mixed Returns false after last step, otherwise temporary state |
|
94 | + */ |
|
95 | 95 | function purge_step($old_state) |
96 | 96 | { |
97 | 97 | switch ($old_state) |
98 | 98 | { |
99 | 99 | case '': // Empty means nothing has run yet |
100 | 100 | /** |
101 | - * @todo Remove this try/catch condition once purge_notifications is fixed |
|
102 | - * in the core to work with disabled extensions without fatal errors. |
|
103 | - * https://tracker.phpbb.com/browse/PHPBB3-12435 |
|
104 | - */ |
|
101 | + * @todo Remove this try/catch condition once purge_notifications is fixed |
|
102 | + * in the core to work with disabled extensions without fatal errors. |
|
103 | + * https://tracker.phpbb.com/browse/PHPBB3-12435 |
|
104 | + */ |
|
105 | 105 | try |
106 | 106 | { |
107 | 107 | // Purge board rules notifications |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * Load the data of an album |
|
44 | - * |
|
45 | - * @param int $album_id |
|
46 | - * @return bool True if the album was loaded |
|
47 | - * @throws \OutOfBoundsException if the album does not exist |
|
48 | - */ |
|
43 | + * Load the data of an album |
|
44 | + * |
|
45 | + * @param int $album_id |
|
46 | + * @return bool True if the album was loaded |
|
47 | + * @throws \OutOfBoundsException if the album does not exist |
|
48 | + */ |
|
49 | 49 | public function load($album_id) |
50 | 50 | { |
51 | 51 | $sql_array = array( |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * Check whether the album_user is the user who wants to do something |
|
111 | - * |
|
112 | - * @param int $album_id |
|
113 | - * @param mixed $user_id If false the current user will be compared |
|
114 | - * @return bool True if the user is the owner of the album |
|
115 | - * @throws \DomainException if the user is not the owner of the album |
|
116 | - */ |
|
110 | + * Check whether the album_user is the user who wants to do something |
|
111 | + * |
|
112 | + * @param int $album_id |
|
113 | + * @param mixed $user_id If false the current user will be compared |
|
114 | + * @return bool True if the user is the owner of the album |
|
115 | + * @throws \DomainException if the user is not the owner of the album |
|
116 | + */ |
|
117 | 117 | public function validate_owner($album_id, $user_id = false) |
118 | 118 | { |
119 | 119 | $album_id = (int) $album_id; |
@@ -751,8 +751,8 @@ discard block |
||
751 | 751 | $log_action = implode('_', array($log_action_images, $log_action_albums)); |
752 | 752 | |
753 | 753 | /** |
754 | - * Log what we did |
|
755 | - */ |
|
754 | + * Log what we did |
|
755 | + */ |
|
756 | 756 | switch ($log_action) |
757 | 757 | { |
758 | 758 | case 'MOVE_IMAGES_MOVE_ALBUMS': |
@@ -842,14 +842,14 @@ discard block |
||
842 | 842 | $this->gallery_notification->delete_albums($from_id); |
843 | 843 | |
844 | 844 | /** |
845 | - * Event related to moving album content |
|
846 | - * |
|
847 | - * @event phpbbgallery.core.album.manage.move_album_content |
|
848 | - * @var int from_id Album we are moving from |
|
849 | - * @var int to_id Album we are moving to |
|
850 | - * @var bool sync Should we sync the albums data |
|
851 | - * @since 1.2.0 |
|
852 | - */ |
|
845 | + * Event related to moving album content |
|
846 | + * |
|
847 | + * @event phpbbgallery.core.album.manage.move_album_content |
|
848 | + * @var int from_id Album we are moving from |
|
849 | + * @var int to_id Album we are moving to |
|
850 | + * @var bool sync Should we sync the albums data |
|
851 | + * @since 1.2.0 |
|
852 | + */ |
|
853 | 853 | $vars = array('from_id', 'to_id', 'sync'); |
854 | 854 | extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.move_album_content', compact($vars))); |
855 | 855 | |
@@ -951,12 +951,12 @@ discard block |
||
951 | 951 | $this->gallery_config->set('num_comments', $row['num_comments']); |
952 | 952 | |
953 | 953 | /** |
954 | - * Event delete album content |
|
955 | - * |
|
956 | - * @event phpbbgallery.core.album.manage.delete_album_content |
|
957 | - * @var int album_id Album we are deleting |
|
958 | - * @since 1.2.0 |
|
959 | - */ |
|
954 | + * Event delete album content |
|
955 | + * |
|
956 | + * @event phpbbgallery.core.album.manage.delete_album_content |
|
957 | + * @var int album_id Album we are deleting |
|
958 | + * @since 1.2.0 |
|
959 | + */ |
|
960 | 960 | $vars = array('album_id'); |
961 | 961 | extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.delete_album_content', compact($vars))); |
962 | 962 | |
@@ -979,11 +979,11 @@ discard block |
||
979 | 979 | public function move_album_by($album_row, $action = 'move_up', $steps = 1) |
980 | 980 | { |
981 | 981 | /** |
982 | - * Fetch all the siblings between the module's current spot |
|
983 | - * and where we want to move it to. If there are less than $steps |
|
984 | - * siblings between the current spot and the target then the |
|
985 | - * module will move as far as possible |
|
986 | - */ |
|
982 | + * Fetch all the siblings between the module's current spot |
|
983 | + * and where we want to move it to. If there are less than $steps |
|
984 | + * siblings between the current spot and the target then the |
|
985 | + * module will move as far as possible |
|
986 | + */ |
|
987 | 987 | $sql = 'SELECT album_id, album_name, left_id, right_id |
988 | 988 | FROM ' . $this->albums_table . ' |
989 | 989 | WHERE parent_id = ' . (int) $album_row['parent_id'] . ' |
@@ -1005,12 +1005,12 @@ discard block |
||
1005 | 1005 | } |
1006 | 1006 | |
1007 | 1007 | /** |
1008 | - * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
1009 | - * $diff_up and $diff_down are the values to substract or add to each node's left_id |
|
1010 | - * and right_id in order to move them up or down. |
|
1011 | - * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
1012 | - * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
1013 | - */ |
|
1008 | + * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
1009 | + * $diff_up and $diff_down are the values to substract or add to each node's left_id |
|
1010 | + * and right_id in order to move them up or down. |
|
1011 | + * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
1012 | + * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
1013 | + */ |
|
1014 | 1014 | if ($action == 'move_up') |
1015 | 1015 | { |
1016 | 1016 | $left_id = $target['left_id']; |
@@ -213,9 +213,9 @@ |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
216 | - * Get all recent images the user has access to |
|
217 | - * return (int) $images_count |
|
218 | - */ |
|
216 | + * Get all recent images the user has access to |
|
217 | + * return (int) $images_count |
|
218 | + */ |
|
219 | 219 | public function recent_count() |
220 | 220 | { |
221 | 221 | $this->gallery_auth->load_user_premissions($this->user->data['user_id']); |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
234 | - * We need to disable the "last-modified" caching for guests and in cases of image-errors, |
|
235 | - * so that they can view them, if they logged in or the error was fixed. |
|
236 | - */ |
|
234 | + * We need to disable the "last-modified" caching for guests and in cases of image-errors, |
|
235 | + * so that they can view them, if they logged in or the error was fixed. |
|
236 | + */ |
|
237 | 237 | public function disable_browser_cache() |
238 | 238 | { |
239 | 239 | $this->browser_cache = false; |
@@ -460,12 +460,12 @@ discard block |
||
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
463 | - * Delete file from disc. |
|
464 | - * |
|
465 | - * @param mixed $files String with filename or an array of filenames |
|
466 | - * Array-Format: $image_id => $filename |
|
467 | - * @param array $locations Array of valid url::path()s where the image should be deleted from |
|
468 | - */ |
|
463 | + * Delete file from disc. |
|
464 | + * |
|
465 | + * @param mixed $files String with filename or an array of filenames |
|
466 | + * Array-Format: $image_id => $filename |
|
467 | + * @param array $locations Array of valid url::path()s where the image should be deleted from |
|
468 | + */ |
|
469 | 469 | public function delete($files, $locations = array('thumbnail', 'medium', 'upload')) |
470 | 470 | { |
471 | 471 | if (!is_array($files)) |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
186 | - * Delete comments |
|
187 | - * |
|
188 | - * @param mixed $comment_ids Array or integer with comment_id we delete. |
|
189 | - */ |
|
186 | + * Delete comments |
|
187 | + * |
|
188 | + * @param mixed $comment_ids Array or integer with comment_id we delete. |
|
189 | + */ |
|
190 | 190 | public function delete_comments($comment_ids) |
191 | 191 | { |
192 | 192 | $comment_ids = $this->cast_mixed_int2array($comment_ids); |
@@ -216,11 +216,11 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * Delete comments for given image_ids |
|
220 | - * |
|
221 | - * @param mixed $image_ids Array or integer with image_id where we delete the comments. |
|
222 | - * @param bool $reset_stats Shall we also reset the statistics? We can save that query, when the images are deleted anyway. |
|
223 | - */ |
|
219 | + * Delete comments for given image_ids |
|
220 | + * |
|
221 | + * @param mixed $image_ids Array or integer with image_id where we delete the comments. |
|
222 | + * @param bool $reset_stats Shall we also reset the statistics? We can save that query, when the images are deleted anyway. |
|
223 | + */ |
|
224 | 224 | public function delete_images($image_ids, $reset_stats = false) |
225 | 225 | { |
226 | 226 | $image_ids = $this->cast_mixed_int2array($image_ids); |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * Remove images from watch-list |
|
99 | - * |
|
100 | - * @param mixed $image_ids Array or integer with image_id where we delete from the watch-list. |
|
101 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
102 | - */ |
|
98 | + * Remove images from watch-list |
|
99 | + * |
|
100 | + * @param mixed $image_ids Array or integer with image_id where we delete from the watch-list. |
|
101 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
102 | + */ |
|
103 | 103 | public function remove($image_ids, $user_ids = false) |
104 | 104 | { |
105 | 105 | $image_ids = self::cast_mixed_int2array($image_ids); |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
115 | - * Remove albums from watch-list |
|
116 | - * |
|
117 | - * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
118 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
119 | - */ |
|
115 | + * Remove albums from watch-list |
|
116 | + * |
|
117 | + * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
118 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
119 | + */ |
|
120 | 120 | public function remove_albums($album_ids, $user_ids = false) |
121 | 121 | { |
122 | 122 | $album_ids = self::cast_mixed_int2array($album_ids); |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * Delete given image_ids from watch-list |
|
133 | - * |
|
134 | - * @param mixed $image_ids Array or integer with image_id where we delete from watch-list. |
|
135 | - */ |
|
132 | + * Delete given image_ids from watch-list |
|
133 | + * |
|
134 | + * @param mixed $image_ids Array or integer with image_id where we delete from watch-list. |
|
135 | + */ |
|
136 | 136 | public function delete_images($image_ids) |
137 | 137 | { |
138 | 138 | $image_ids = self::cast_mixed_int2array($image_ids); |
@@ -144,10 +144,10 @@ discard block |
||
144 | 144 | |
145 | 145 | |
146 | 146 | /** |
147 | - * Delete given album_ids from watch-list |
|
148 | - * |
|
149 | - * @param mixed $album_ids Array or integer with album_id where we delete from watch-list. |
|
150 | - */ |
|
147 | + * Delete given album_ids from watch-list |
|
148 | + * |
|
149 | + * @param mixed $album_ids Array or integer with album_id where we delete from watch-list. |
|
150 | + */ |
|
151 | 151 | public function delete_albums($album_ids) |
152 | 152 | { |
153 | 153 | $album_ids = self::cast_mixed_int2array($album_ids); |
@@ -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; |