@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Plupload |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | - * @license GNU GPL v2, see license.txt |
|
8 | - */ |
|
3 | + * @package Plupload |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2016, Nazar Mokrynskyi |
|
7 | + * @license GNU GPL v2, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs; |
10 | 10 | use |
11 | 11 | Karwana\Mime\Mime; |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | return; |
30 | 30 | } |
31 | 31 | /** |
32 | - * Getting Plupload module configuration |
|
33 | - */ |
|
32 | + * Getting Plupload module configuration |
|
33 | + */ |
|
34 | 34 | $module_data = Config::instance()->module('Plupload'); |
35 | 35 | $max_file_size = trim(strtolower($module_data->max_file_size), 'b'); |
36 | 36 | switch (substr($max_file_size, -1)) { |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | return; |
75 | 75 | } |
76 | 76 | /** |
77 | - * Only registered users allowed |
|
78 | - */ |
|
77 | + * Only registered users allowed |
|
78 | + */ |
|
79 | 79 | if (!$User->user()) { |
80 | 80 | $Page->json( |
81 | 81 | [ |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | return; |
91 | 91 | } |
92 | 92 | /** |
93 | - * Getting instances of storage and database |
|
94 | - */ |
|
93 | + * Getting instances of storage and database |
|
94 | + */ |
|
95 | 95 | $storage = Storage::instance()->{$module_data->storage('files')}; |
96 | 96 | /** |
97 | - * @var DB\_Abstract $cdb |
|
98 | - */ |
|
97 | + * @var DB\_Abstract $cdb |
|
98 | + */ |
|
99 | 99 | $cdb = DB::instance()->db_prime($module_data->db('files')); |
100 | 100 | if (!$storage || !$cdb) { |
101 | 101 | $Page->json( |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | return; |
112 | 112 | } |
113 | 113 | /** |
114 | - * Moving file into storage |
|
115 | - */ |
|
114 | + * Moving file into storage |
|
115 | + */ |
|
116 | 116 | if (!$module_data->directory_created) { |
117 | 117 | $storage->mkdir('Plupload'); |
118 | 118 | $module_data->directory_created = 1; |
@@ -142,8 +142,8 @@ discard block |
||
142 | 142 | return; |
143 | 143 | } |
144 | 144 | /** |
145 | - * Registering file in database |
|
146 | - */ |
|
145 | + * Registering file in database |
|
146 | + */ |
|
147 | 147 | if (!$cdb->q( |
148 | 148 | "INSERT INTO `[prefix]plupload_files` |
149 | 149 | (`user`, `uploaded`, `source`, `url`) |