@@ -48,11 +48,11 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * Perform additional tasks on extension enable |
|
52 | - * |
|
53 | - * @param mixed $old_state State returned by previous call of this method |
|
54 | - * @return mixed Returns false after last step, otherwise temporary state |
|
55 | - */ |
|
51 | + * Perform additional tasks on extension enable |
|
52 | + * |
|
53 | + * @param mixed $old_state State returned by previous call of this method |
|
54 | + * @return mixed Returns false after last step, otherwise temporary state |
|
55 | + */ |
|
56 | 56 | public function enable_step($old_state) |
57 | 57 | { |
58 | 58 | if (empty($old_state)) |
@@ -15,94 +15,94 @@ discard block |
||
15 | 15 | class upload |
16 | 16 | { |
17 | 17 | /** |
18 | - * @var \phpbb\user |
|
19 | - */ |
|
18 | + * @var \phpbb\user |
|
19 | + */ |
|
20 | 20 | protected $user; |
21 | 21 | |
22 | 22 | /** |
23 | - * @var \phpbb\language\language |
|
24 | - */ |
|
23 | + * @var \phpbb\language\language |
|
24 | + */ |
|
25 | 25 | protected $language; |
26 | 26 | |
27 | 27 | /** |
28 | - * @var \phpbb\db\driver\driver_interface |
|
29 | - */ |
|
28 | + * @var \phpbb\db\driver\driver_interface |
|
29 | + */ |
|
30 | 30 | protected $db; |
31 | 31 | |
32 | 32 | /** |
33 | - * @var \phpbb\event\dispatcher_interface |
|
34 | - */ |
|
33 | + * @var \phpbb\event\dispatcher_interface |
|
34 | + */ |
|
35 | 35 | protected $phpbb_dispatcher; |
36 | 36 | |
37 | 37 | /** |
38 | - * @var \phpbb\request\request |
|
39 | - */ |
|
38 | + * @var \phpbb\request\request |
|
39 | + */ |
|
40 | 40 | protected $request; |
41 | 41 | |
42 | 42 | /** |
43 | - * @var \phpbb\files\upload |
|
44 | - */ |
|
43 | + * @var \phpbb\files\upload |
|
44 | + */ |
|
45 | 45 | protected $file_upload; |
46 | 46 | |
47 | 47 | /** |
48 | - * @var \phpbbgallery\core\image\image |
|
49 | - */ |
|
48 | + * @var \phpbbgallery\core\image\image |
|
49 | + */ |
|
50 | 50 | protected $gallery_image; |
51 | 51 | |
52 | 52 | /** |
53 | - * @var \phpbbgallery\core\config |
|
54 | - */ |
|
53 | + * @var \phpbbgallery\core\config |
|
54 | + */ |
|
55 | 55 | protected $gallery_config; |
56 | 56 | |
57 | 57 | /** |
58 | - * @var \phpbbgallery\core\url |
|
59 | - */ |
|
58 | + * @var \phpbbgallery\core\url |
|
59 | + */ |
|
60 | 60 | protected $gallery_url; |
61 | 61 | |
62 | 62 | /** |
63 | - * @var \phpbbgallery\core\block |
|
64 | - */ |
|
63 | + * @var \phpbbgallery\core\block |
|
64 | + */ |
|
65 | 65 | protected $block; |
66 | 66 | |
67 | 67 | /** |
68 | - * @var \phpbbgallery\core\file\file |
|
69 | - */ |
|
68 | + * @var \phpbbgallery\core\file\file |
|
69 | + */ |
|
70 | 70 | protected $tools; |
71 | 71 | |
72 | 72 | /** |
73 | - * @var string |
|
74 | - */ |
|
73 | + * @var string |
|
74 | + */ |
|
75 | 75 | protected $images_table; |
76 | 76 | |
77 | 77 | /** |
78 | - * @var string |
|
79 | - */ |
|
78 | + * @var string |
|
79 | + */ |
|
80 | 80 | protected $root_path; |
81 | 81 | |
82 | 82 | /** |
83 | - * @var string |
|
84 | - */ |
|
83 | + * @var string |
|
84 | + */ |
|
85 | 85 | protected $php_ext; |
86 | 86 | |
87 | 87 | /** |
88 | - * Number of Files per Directory |
|
89 | - * |
|
90 | - * If this constant is set to a value >0 the gallery will create a new directory, |
|
91 | - * when the current directory has more files in it than set here. |
|
92 | - */ |
|
88 | + * Number of Files per Directory |
|
89 | + * |
|
90 | + * If this constant is set to a value >0 the gallery will create a new directory, |
|
91 | + * when the current directory has more files in it than set here. |
|
92 | + */ |
|
93 | 93 | const NUM_FILES_PER_DIR = 0; |
94 | 94 | |
95 | 95 | /** |
96 | - * Objects: phpBB Upload, 2 Files and Image-Functions |
|
97 | - */ |
|
96 | + * Objects: phpBB Upload, 2 Files and Image-Functions |
|
97 | + */ |
|
98 | 98 | private $upload = null; |
99 | 99 | private $file = null; |
100 | 100 | private $zip_file = null; |
101 | 101 | //private $tools = null; |
102 | 102 | |
103 | 103 | /** |
104 | - * Basic variables... |
|
105 | - */ |
|
104 | + * Basic variables... |
|
105 | + */ |
|
106 | 106 | public $loaded_files = 0; |
107 | 107 | public $uploaded_files = 0; |
108 | 108 | public $errors = array(); |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
233 | - * Upload a zip file and save the images into the import/ directory. |
|
234 | - */ |
|
233 | + * Upload a zip file and save the images into the import/ directory. |
|
234 | + */ |
|
235 | 235 | public function upload_zip() |
236 | 236 | { |
237 | 237 | if (!class_exists('compress_zip')) |
@@ -379,14 +379,14 @@ discard block |
||
379 | 379 | $file_link = $this->gallery_url->path('upload') . $this->image_data[$image_id]['image_filename']; |
380 | 380 | |
381 | 381 | /** |
382 | - * Event upload image before |
|
383 | - * |
|
384 | - * @event phpbbgallery.core.upload.update_image_before |
|
385 | - * @var array additional_sql_data array of additional settings |
|
386 | - * @var array image_data array of image_data |
|
387 | - * @var string file_link link to file |
|
388 | - * @since 1.2.0 |
|
389 | - */ |
|
382 | + * Event upload image before |
|
383 | + * |
|
384 | + * @event phpbbgallery.core.upload.update_image_before |
|
385 | + * @var array additional_sql_data array of additional settings |
|
386 | + * @var array image_data array of image_data |
|
387 | + * @var string file_link link to file |
|
388 | + * @since 1.2.0 |
|
389 | + */ |
|
390 | 390 | $vars = array('additional_sql_data', 'image_data', 'file_link'); |
391 | 391 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.upload.update_image_before', compact($vars))); |
392 | 392 | |
@@ -394,12 +394,12 @@ discard block |
||
394 | 394 | if (!$this->prepare_file_update($image_id)) |
395 | 395 | { |
396 | 396 | /** |
397 | - * Event upload image update |
|
398 | - * |
|
399 | - * @event phpbbgallery.core.upload.update_image_nofilechange |
|
400 | - * @var array additional_sql_data array of additional settings |
|
401 | - * @since 1.2.0 |
|
402 | - */ |
|
397 | + * Event upload image update |
|
398 | + * |
|
399 | + * @event phpbbgallery.core.upload.update_image_nofilechange |
|
400 | + * @var array additional_sql_data array of additional settings |
|
401 | + * @since 1.2.0 |
|
402 | + */ |
|
403 | 403 | $vars = array('additional_sql_data'); |
404 | 404 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.upload.update_image_nofilechange', compact($vars))); |
405 | 405 | } |
@@ -415,8 +415,8 @@ discard block |
||
415 | 415 | } |
416 | 416 | |
417 | 417 | /** |
418 | - * Prepare file on upload: rotate and resize |
|
419 | - */ |
|
418 | + * Prepare file on upload: rotate and resize |
|
419 | + */ |
|
420 | 420 | public function prepare_file() |
421 | 421 | { |
422 | 422 | $upload_dir = $this->get_current_upload_dir(); |
@@ -446,13 +446,13 @@ discard block |
||
446 | 446 | $file = $this->file; |
447 | 447 | |
448 | 448 | /** |
449 | - * Event upload image update |
|
450 | - * |
|
451 | - * @event phpbbgallery.core.upload.prepare_file_before |
|
452 | - * @var array additional_sql_data array of additional settings |
|
453 | - * @var array file File object |
|
454 | - * @since 1.2.0 |
|
455 | - */ |
|
449 | + * Event upload image update |
|
450 | + * |
|
451 | + * @event phpbbgallery.core.upload.prepare_file_before |
|
452 | + * @var array additional_sql_data array of additional settings |
|
453 | + * @var array file File object |
|
454 | + * @since 1.2.0 |
|
455 | + */ |
|
456 | 456 | $vars = array('additional_sql_data', 'file'); |
457 | 457 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.upload.prepare_file_before', compact($vars))); |
458 | 458 | |
@@ -804,8 +804,8 @@ discard block |
||
804 | 804 | } |
805 | 805 | |
806 | 806 | /** |
807 | - * Generate some kind of check so users only complete the upload for their images |
|
808 | - */ |
|
807 | + * Generate some kind of check so users only complete the upload for their images |
|
808 | + */ |
|
809 | 809 | public function generate_hidden_fields() |
810 | 810 | { |
811 | 811 | $checks = array(); |