@@ -140,10 +140,10 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * Delete reports for given report_ids |
|
| 144 | - * |
|
| 145 | - * @param mixed $report_ids Array or integer with report_id. |
|
| 146 | - */ |
|
| 143 | + * Delete reports for given report_ids |
|
| 144 | + * |
|
| 145 | + * @param mixed $report_ids Array or integer with report_id. |
|
| 146 | + */ |
|
| 147 | 147 | public function delete($report_ids) |
| 148 | 148 | { |
| 149 | 149 | $report_ids = self::cast_mixed_int2array($report_ids); |
@@ -163,10 +163,10 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | |
| 165 | 165 | /** |
| 166 | - * Delete reports for given image_ids |
|
| 167 | - * |
|
| 168 | - * @param mixed $image_ids Array or integer with image_id. |
|
| 169 | - */ |
|
| 166 | + * Delete reports for given image_ids |
|
| 167 | + * |
|
| 168 | + * @param mixed $image_ids Array or integer with image_id. |
|
| 169 | + */ |
|
| 170 | 170 | public function delete_images($image_ids) |
| 171 | 171 | { |
| 172 | 172 | $image_ids = self::cast_mixed_int2array($image_ids); |
@@ -194,10 +194,10 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | |
| 196 | 196 | /** |
| 197 | - * Delete reports for given album_ids |
|
| 198 | - * |
|
| 199 | - * @param mixed $album_ids Array or integer with album_id. |
|
| 200 | - */ |
|
| 197 | + * Delete reports for given album_ids |
|
| 198 | + * |
|
| 199 | + * @param mixed $album_ids Array or integer with album_id. |
|
| 200 | + */ |
|
| 201 | 201 | public function delete_albums($album_ids) |
| 202 | 202 | { |
| 203 | 203 | $album_ids = self::cast_mixed_int2array($album_ids); |
@@ -34,18 +34,18 @@ discard block |
||
| 34 | 34 | const NUM_IMAGES = 3; |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * There are different modes to calculate who won the contest. |
|
| 38 | - * This value should be one of the constant-names below. |
|
| 39 | - */ |
|
| 37 | + * There are different modes to calculate who won the contest. |
|
| 38 | + * This value should be one of the constant-names below. |
|
| 39 | + */ |
|
| 40 | 40 | static public $mode = self::MODE_AVERAGE; |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * The image with the highest average wins. |
|
| 44 | - */ |
|
| 43 | + * The image with the highest average wins. |
|
| 44 | + */ |
|
| 45 | 45 | const MODE_AVERAGE = 1; |
| 46 | 46 | /** |
| 47 | - * The image with the highest number of total points wins. |
|
| 48 | - */ |
|
| 47 | + * The image with the highest number of total points wins. |
|
| 48 | + */ |
|
| 49 | 49 | const MODE_SUM = 2; |
| 50 | 50 | |
| 51 | 51 | public function __construct(\phpbb\db\driver\driver_interface $db, |
@@ -59,14 +59,14 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * Get the contest row from the table |
|
| 63 | - * |
|
| 64 | - * @param int $id ID of the contest or album, depending on second parameter |
|
| 65 | - * @param string $mode contest or album ID to get the contest. |
|
| 66 | - * @param bool $throw_error Shall we throw an error if the contest was not found? |
|
| 67 | - * |
|
| 68 | - * @return mixed Either the array or boolean false if contest does not exist |
|
| 69 | - */ |
|
| 62 | + * Get the contest row from the table |
|
| 63 | + * |
|
| 64 | + * @param int $id ID of the contest or album, depending on second parameter |
|
| 65 | + * @param string $mode contest or album ID to get the contest. |
|
| 66 | + * @param bool $throw_error Shall we throw an error if the contest was not found? |
|
| 67 | + * |
|
| 68 | + * @return mixed Either the array or boolean false if contest does not exist |
|
| 69 | + */ |
|
| 70 | 70 | public function get_contest($id, $mode = 'contest', $throw_error = true) |
| 71 | 71 | { |
| 72 | 72 | $sql = 'SELECT * |
@@ -165,8 +165,8 @@ discard block |
||
| 165 | 165 | $this->language->add_lang(array('gallery'), 'phpbbgallery/core'); |
| 166 | 166 | $this->language->add_lang('search'); |
| 167 | 167 | /** |
| 168 | - * Build the sort options |
|
| 169 | - */ |
|
| 168 | + * Build the sort options |
|
| 169 | + */ |
|
| 170 | 170 | $limit_days = array(0 => $this->language->lang('ALL_IMAGES'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR')); |
| 171 | 171 | $sort_by_text = array('t' => $this->language->lang('TIME'), 'n' => $this->language->lang('IMAGE_NAME'), 'u' => $this->language->lang('SORT_USERNAME'), 'vc' => $this->language->lang('GALLERY_VIEWS')); |
| 172 | 172 | $sort_by_sql = array('t' => 'image_time', 'n' => 'image_name_clean', 'u' => 'image_username_clean', 'vc' => 'image_view_count'); |
@@ -369,11 +369,11 @@ discard block |
||
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /** |
| 372 | - * Index Controller |
|
| 373 | - * Route: gallery/search/random |
|
| 374 | - * |
|
| 375 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 376 | - */ |
|
| 372 | + * Index Controller |
|
| 373 | + * Route: gallery/search/random |
|
| 374 | + * |
|
| 375 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 376 | + */ |
|
| 377 | 377 | public function random() |
| 378 | 378 | { |
| 379 | 379 | $this->language->add_lang(array('gallery'), 'phpbbgallery/core'); |
@@ -111,11 +111,11 @@ |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | - * Index Controller |
|
| 115 | - * Route: gallery |
|
| 116 | - * |
|
| 117 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 118 | - */ |
|
| 114 | + * Index Controller |
|
| 115 | + * Route: gallery |
|
| 116 | + * |
|
| 117 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 118 | + */ |
|
| 119 | 119 | public function base() |
| 120 | 120 | { |
| 121 | 121 | // Display login box for guests and an error for users |
@@ -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 | { |
@@ -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; |
@@ -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); |