@@ -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 = array(); |
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 |
@@ -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']; |
@@ -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 authorization 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 authorization 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; |
@@ -15,74 +15,74 @@ discard block |
||
15 | 15 | class exif |
16 | 16 | { |
17 | 17 | /** |
18 | - * Default value for new users |
|
19 | - */ |
|
18 | + * Default value for new users |
|
19 | + */ |
|
20 | 20 | const DEFAULT_DISPLAY = true; |
21 | 21 | |
22 | 22 | /** |
23 | - * phpBB will treat the time from the Exif data like UTC. |
|
24 | - * If your images were taken with an other timezone, you can insert an offset here. |
|
25 | - * The offset is than added to the timestamp before it is converted into the users time. |
|
26 | - * |
|
27 | - * Offset must be set in seconds. |
|
28 | - */ |
|
23 | + * phpBB will treat the time from the Exif data like UTC. |
|
24 | + * If your images were taken with an other timezone, you can insert an offset here. |
|
25 | + * The offset is than added to the timestamp before it is converted into the users time. |
|
26 | + * |
|
27 | + * Offset must be set in seconds. |
|
28 | + */ |
|
29 | 29 | const TIME_OFFSET = 0; |
30 | 30 | |
31 | 31 | /** |
32 | - * Constants for the status of the Exif data. |
|
33 | - */ |
|
32 | + * Constants for the status of the Exif data. |
|
33 | + */ |
|
34 | 34 | const UNAVAILABLE = 0; |
35 | 35 | const AVAILABLE = 1; |
36 | 36 | const UNKNOWN = 2; |
37 | 37 | const DBSAVED = 3; |
38 | 38 | |
39 | 39 | /** |
40 | - * Is the function available? |
|
41 | - */ |
|
40 | + * Is the function available? |
|
41 | + */ |
|
42 | 42 | static public $function_exists = null; |
43 | 43 | |
44 | 44 | /** |
45 | - * Exif data array with all allowed groups and keys. |
|
46 | - */ |
|
45 | + * Exif data array with all allowed groups and keys. |
|
46 | + */ |
|
47 | 47 | public $data = array(); |
48 | 48 | |
49 | 49 | /** |
50 | - * Filtered data array. We don't have empty or invalid values here. |
|
51 | - */ |
|
50 | + * Filtered data array. We don't have empty or invalid values here. |
|
51 | + */ |
|
52 | 52 | public $prepared_data = array(); |
53 | 53 | |
54 | 54 | /** |
55 | - * Does the image have exif data? |
|
56 | - * Values see constant declaration at the beginning of the class. |
|
57 | - */ |
|
55 | + * Does the image have exif data? |
|
56 | + * Values see constant declaration at the beginning of the class. |
|
57 | + */ |
|
58 | 58 | public $status = 2; |
59 | 59 | |
60 | 60 | /** |
61 | - * Full data array, but serialized to a string |
|
62 | - */ |
|
61 | + * Full data array, but serialized to a string |
|
62 | + */ |
|
63 | 63 | public $serialized = ''; |
64 | 64 | |
65 | 65 | /** |
66 | - * Full link to the image-file |
|
67 | - */ |
|
66 | + * Full link to the image-file |
|
67 | + */ |
|
68 | 68 | public $file = ''; |
69 | 69 | |
70 | 70 | /** |
71 | - * Original status of the Exif data. |
|
72 | - */ |
|
71 | + * Original status of the Exif data. |
|
72 | + */ |
|
73 | 73 | public $orig_status = null; |
74 | 74 | |
75 | 75 | /** |
76 | - * Image-ID, just needed to update the Exif status |
|
77 | - */ |
|
76 | + * Image-ID, just needed to update the Exif status |
|
77 | + */ |
|
78 | 78 | public $image_id = false; |
79 | 79 | |
80 | 80 | /** |
81 | - * Constructor |
|
82 | - * |
|
83 | - * @param string $file Full link to the image-file |
|
84 | - * @param mixed $image_id False or integer |
|
85 | - */ |
|
81 | + * Constructor |
|
82 | + * |
|
83 | + * @param string $file Full link to the image-file |
|
84 | + * @param mixed $image_id False or integer |
|
85 | + */ |
|
86 | 86 | public function __construct($file, $image_id = false) |
87 | 87 | { |
88 | 88 | if (self::$function_exists === null) |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | - * Interpret the values from the database, and read the data if we don't have it. |
|
102 | - * |
|
103 | - * @param int $status Value of a status constant (see beginning of the class) |
|
104 | - * @param mixed $data Either an empty string or the serialized array of the Exif from the database |
|
105 | - */ |
|
101 | + * Interpret the values from the database, and read the data if we don't have it. |
|
102 | + * |
|
103 | + * @param int $status Value of a status constant (see beginning of the class) |
|
104 | + * @param mixed $data Either an empty string or the serialized array of the Exif from the database |
|
105 | + */ |
|
106 | 106 | public function interpret($status, $data) |
107 | 107 | { |
108 | 108 | $this->orig_status = $status; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Read Exif data from the image |
|
122 | - */ |
|
121 | + * Read Exif data from the image |
|
122 | + */ |
|
123 | 123 | public function read() |
124 | 124 | { |
125 | 125 | if (!self::$function_exists || !$this->file || !file_exists($this->file)) |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Validate and prepare the data, so we can send it into the template. |
|
169 | - */ |
|
168 | + * Validate and prepare the data, so we can send it into the template. |
|
169 | + */ |
|
170 | 170 | private function prepare_data() |
171 | 171 | { |
172 | 172 | global $user; |
@@ -273,11 +273,11 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
276 | - * Sends the Exif into the template |
|
277 | - * |
|
278 | - * @param bool $expand_view Shall we expand the Exif data on page view or collapse? |
|
279 | - * @param string $block Name of the template loop the Exif's are displayed in. |
|
280 | - */ |
|
276 | + * Sends the Exif into the template |
|
277 | + * |
|
278 | + * @param bool $expand_view Shall we expand the Exif data on page view or collapse? |
|
279 | + * @param string $block Name of the template loop the Exif's are displayed in. |
|
280 | + */ |
|
281 | 281 | public function send_to_template($expand_view = true, $block = 'exif_value') |
282 | 282 | { |
283 | 283 | $this->prepare_data(); |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
304 | - * Save the new Exif status in the database |
|
305 | - */ |
|
304 | + * Save the new Exif status in the database |
|
305 | + */ |
|
306 | 306 | public function set_status() |
307 | 307 | { |
308 | 308 | if (!$this->image_id || ($this->orig_status == $this->status)) |
@@ -320,9 +320,9 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | /** |
323 | - * There are lots of possible Exif Groups and Values. |
|
324 | - * But you will never heard of the missing ones. so we just allow the most common ones. |
|
325 | - */ |
|
323 | + * There are lots of possible Exif Groups and Values. |
|
324 | + * But you will never heard of the missing ones. so we just allow the most common ones. |
|
325 | + */ |
|
326 | 326 | static private $allowed_groups = array( |
327 | 327 | 'EXIF', |
328 | 328 | 'IFD0', |
@@ -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']); |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | protected $table_images; |
20 | 20 | |
21 | 21 | /** |
22 | - * cache constructor. |
|
23 | - * @param \phpbb\cache\service $cache |
|
24 | - * @param \phpbb\db\driver\driver_interface $db |
|
25 | - * @param $albums_table |
|
26 | - * @param $images_table |
|
27 | - */ |
|
22 | + * cache constructor. |
|
23 | + * @param \phpbb\cache\service $cache |
|
24 | + * @param \phpbb\db\driver\driver_interface $db |
|
25 | + * @param $albums_table |
|
26 | + * @param $images_table |
|
27 | + */ |
|
28 | 28 | public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, |
29 | 29 | $albums_table, $images_table) |
30 | 30 | { |
@@ -155,18 +155,18 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
159 | - */ |
|
158 | + * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
159 | + */ |
|
160 | 160 | public function destroy_images() |
161 | 161 | { |
162 | 162 | $this->phpbb_cache->destroy('_images'); |
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
166 | - * Destroy album cache |
|
167 | - * Basically some tests fail due album cache not destroyed ... |
|
168 | - * So lets try it now? |
|
169 | - */ |
|
166 | + * Destroy album cache |
|
167 | + * Basically some tests fail due album cache not destroyed ... |
|
168 | + * So lets try it now? |
|
169 | + */ |
|
170 | 170 | public function destroy_albums() |
171 | 171 | { |
172 | 172 | $this->phpbb_cache->destroy('_albums'); |