@@ -235,11 +235,11 @@ |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
238 | - * Remove albums from watch-list |
|
239 | - * |
|
240 | - * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
241 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
242 | - */ |
|
238 | + * Remove albums from watch-list |
|
239 | + * |
|
240 | + * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
241 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
242 | + */ |
|
243 | 243 | public function remove_albums($album_ids, $user_ids = false) |
244 | 244 | { |
245 | 245 | $album_ids = $this->cast_mixed_int2array($album_ids); |
@@ -106,9 +106,9 @@ |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Delete logs |
|
110 | - * @param array $mark Logs selected for deletion |
|
111 | - **/ |
|
109 | + * Delete logs |
|
110 | + * @param array $mark Logs selected for deletion |
|
111 | + **/ |
|
112 | 112 | public function delete_logs($mark) |
113 | 113 | { |
114 | 114 | $sql = 'DELETE FROM ' . $this->log_table . ' WHERE ' . $this->db->sql_in_set('log_id', $mark); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | $additional_settings = array(); |
93 | 93 | |
94 | 94 | /** |
95 | - * Event set personal settings |
|
96 | - * |
|
97 | - * @event phpbbgallery.core.ucp.set_settings_submit |
|
98 | - * @var array additional_settings array of additional settings |
|
99 | - * @since 1.2.0 |
|
100 | - */ |
|
95 | + * Event set personal settings |
|
96 | + * |
|
97 | + * @event phpbbgallery.core.ucp.set_settings_submit |
|
98 | + * @var array additional_settings array of additional settings |
|
99 | + * @since 1.2.0 |
|
100 | + */ |
|
101 | 101 | $vars = array('additional_settings'); |
102 | 102 | extract($this->dispatcher->trigger_event('phpbbgallery.core.ucp.set_settings_submit', compact($vars))); |
103 | 103 | |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Event no submit personal settings |
|
122 | - * |
|
123 | - * @event phpbbgallery.core.ucp.set_settings_nosubmit |
|
124 | - * @since 1.2.0 |
|
125 | - */ |
|
121 | + * Event no submit personal settings |
|
122 | + * |
|
123 | + * @event phpbbgallery.core.ucp.set_settings_nosubmit |
|
124 | + * @since 1.2.0 |
|
125 | + */ |
|
126 | 126 | $this->dispatcher->dispatch('phpbbgallery.core.ucp.set_settings_nosubmit'); |
127 | 127 | |
128 | 128 | $this->template->assign_vars(array( |
@@ -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; |
@@ -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 | - * Basicly some tests fail due album cache not destroyed ... |
|
168 | - * So lets try it now? |
|
169 | - */ |
|
166 | + * Destroy album cache |
|
167 | + * Basicly 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'); |
@@ -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 | - * Intepret 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 | + * Intepret 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 Exifs 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 Exifs 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', |
@@ -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 & |