@@ -33,8 +33,7 @@ |
||
33 | 33 | 'value' => $gallery['title'] |
34 | 34 | ] |
35 | 35 | ). |
36 | - ($Config->core['simple_admin_mode'] ? '' : |
|
37 | - h::label(h::info('photo_gallery_gallery_path')). |
|
36 | + ($Config->core['simple_admin_mode'] ? '' : h::label(h::info('photo_gallery_gallery_path')). |
|
38 | 37 | h::{'input[is=cs-input-text][name=edit[path]]'}( |
39 | 38 | [ |
40 | 39 | 'value' => $gallery['path'] |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Photo gallery |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | |
11 | 11 | use |
@@ -9,13 +9,13 @@ |
||
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | use |
11 | 11 | cs\Index; |
12 | -$Index = Index::instance(); |
|
13 | -$Photo_gallery = Photo_gallery::instance(); |
|
12 | +$Index = Index::instance(); |
|
13 | +$Photo_gallery = Photo_gallery::instance(); |
|
14 | 14 | if (isset($_POST['add'])) { |
15 | - $add = $_POST['add']; |
|
15 | + $add = $_POST['add']; |
|
16 | 16 | $Index->save($Photo_gallery->add_gallery($add['title'], isset($add['path']) ? $add['path'] : null, $add['description'], $add['active'], $add['preview_image'])); |
17 | 17 | } elseif (isset($_POST['edit'])) { |
18 | - $edit = $_POST['edit']; |
|
18 | + $edit = $_POST['edit']; |
|
19 | 19 | $Index->save($Photo_gallery->set_gallery($edit['id'], $edit['title'], isset($edit['path']) ? $edit['path'] : null, $edit['description'], $edit['active'], $edit['preview_image'])); |
20 | 20 | } elseif (isset($_POST['delete'])) { |
21 | 21 | $Index->save($Photo_gallery->del_gallery($_POST['delete'])); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Photo gallery |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | use |
11 | 11 | cs\Config, |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Photo gallery |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | |
11 | 11 | use |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Photo gallery |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | use |
11 | 11 | cs\Config, |
@@ -17,9 +17,9 @@ |
||
17 | 17 | if ($data['name'] != 'Photo_gallery') { |
18 | 18 | return; |
19 | 19 | } |
20 | - $module_data = Config::instance()->module('Photo_gallery'); |
|
21 | - $storage = Storage::instance()->{$module_data->storage('files')}; |
|
22 | - $Photo_gallery = Photo_gallery::instance(); |
|
20 | + $module_data = Config::instance()->module('Photo_gallery'); |
|
21 | + $storage = Storage::instance()->{$module_data->storage('files')}; |
|
22 | + $Photo_gallery = Photo_gallery::instance(); |
|
23 | 23 | foreach ($Photo_gallery->get_galleries_list() as $gallery) { |
24 | 24 | $Photo_gallery->del_gallery($gallery); |
25 | 25 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Photo gallery |
|
4 | - * @category modules |
|
5 | - * @author Nazar Mokrynskyi <[email protected]> |
|
6 | - * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | - * @license MIT License, see license.txt |
|
8 | - */ |
|
3 | + * @package Photo gallery |
|
4 | + * @category modules |
|
5 | + * @author Nazar Mokrynskyi <[email protected]> |
|
6 | + * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi |
|
7 | + * @license MIT License, see license.txt |
|
8 | + */ |
|
9 | 9 | namespace cs\modules\Photo_gallery; |
10 | 10 | |
11 | 11 | use |
@@ -9,8 +9,8 @@ |
||
9 | 9 | */ |
10 | 10 | namespace cs; |
11 | 11 | if (isset($_POST['save'])) { |
12 | - $module_data = Config::instance()->module('Plupload'); |
|
13 | - $module_data->max_file_size = xap($_POST['max_file_size']); |
|
14 | - $module_data->confirmation_time = (int)$_POST['confirmation_time']; |
|
12 | + $module_data = Config::instance()->module('Plupload'); |
|
13 | + $module_data->max_file_size = xap($_POST['max_file_size']); |
|
14 | + $module_data->confirmation_time = (int)$_POST['confirmation_time']; |
|
15 | 15 | Index::instance()->save(true); |
16 | 16 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Plupload |
|
4 | - * @category modules |
|
5 | - * @author Moxiecode Systems AB |
|
6 | - * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | - * @copyright Moxiecode Systems AB |
|
8 | - * @license GNU GPL v2, see license.txt |
|
9 | - */ |
|
3 | + * @package Plupload |
|
4 | + * @category modules |
|
5 | + * @author Moxiecode Systems AB |
|
6 | + * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | + * @copyright Moxiecode Systems AB |
|
8 | + * @license GNU GPL v2, see license.txt |
|
9 | + */ |
|
10 | 10 | namespace cs; |
11 | 11 | Event::instance()->on( |
12 | 12 | 'admin/System/components/modules/install/after', |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Plupload |
|
4 | - * @category modules |
|
5 | - * @author Moxiecode Systems AB |
|
6 | - * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | - * @copyright Moxiecode Systems AB |
|
8 | - * @license GNU GPL v2, see license.txt |
|
9 | - */ |
|
3 | + * @package Plupload |
|
4 | + * @category modules |
|
5 | + * @author Moxiecode Systems AB |
|
6 | + * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | + * @copyright Moxiecode Systems AB |
|
8 | + * @license GNU GPL v2, see license.txt |
|
9 | + */ |
|
10 | 10 | /** |
11 | - * Supports next events: |
|
12 | - * System/upload_files/add_tag |
|
13 | - * [ |
|
14 | - * 'url' => url //Required |
|
15 | - * 'tag' => tag //Required |
|
16 | - * ] |
|
17 | - * |
|
18 | - * System/upload_files/del_tag |
|
19 | - * [ |
|
20 | - * 'url' => url //Optional |
|
21 | - * 'tag' => tag //Optional ("%" symbol may be used at the end of string to delete all files, that starts from specified string) |
|
22 | - * ] |
|
23 | - */ |
|
11 | + * Supports next events: |
|
12 | + * System/upload_files/add_tag |
|
13 | + * [ |
|
14 | + * 'url' => url //Required |
|
15 | + * 'tag' => tag //Required |
|
16 | + * ] |
|
17 | + * |
|
18 | + * System/upload_files/del_tag |
|
19 | + * [ |
|
20 | + * 'url' => url //Optional |
|
21 | + * 'tag' => tag //Optional ("%" symbol may be used at the end of string to delete all files, that starts from specified string) |
|
22 | + * ] |
|
23 | + */ |
|
24 | 24 | namespace cs\modules\Plupload; |
25 | 25 | use |
26 | 26 | cs\Config, |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | ->on( |
33 | 33 | 'System/Page/display/before', |
34 | 34 | function () { |
35 | - $Config = Config::instance(); |
|
36 | - $Page = Page::instance(); |
|
35 | + $Config = Config::instance(); |
|
36 | + $Page = Page::instance(); |
|
37 | 37 | $Page->config([ |
38 | 38 | 'max_file_size' => $Config->module('Plupload')->max_file_size |
39 | 39 | ], 'cs.plupload'); |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | if (!isset($data['url'], $data['tag'])) { |
46 | 46 | return false; |
47 | 47 | } |
48 | - $module_data = Config::instance()->module('Plupload'); |
|
49 | - $storage = Storage::instance()->{$module_data->storage('files')}; |
|
48 | + $module_data = Config::instance()->module('Plupload'); |
|
49 | + $storage = Storage::instance()->{$module_data->storage('files')}; |
|
50 | 50 | if (mb_strpos($data['url'], $storage->base_url()) !== 0) { |
51 | 51 | return false; |
52 | 52 | } |
53 | - $cdb = DB::instance()->{$module_data->db('files')}(); |
|
54 | - $id = $cdb->qfs([ |
|
53 | + $cdb = DB::instance()->{$module_data->db('files')}(); |
|
54 | + $id = $cdb->qfs([ |
|
55 | 55 | "SELECT `id` |
56 | 56 | FROM `[prefix]plupload_files` |
57 | 57 | WHERE `url` = '%s' |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | if (!isset($data['url']) && !isset($data['tag'])) { |
78 | 78 | return false; |
79 | 79 | } |
80 | - $module_data = Config::instance()->module('Plupload'); |
|
81 | - $storage = Storage::instance()->{$module_data->storage('files')}; |
|
80 | + $module_data = Config::instance()->module('Plupload'); |
|
81 | + $storage = Storage::instance()->{$module_data->storage('files')}; |
|
82 | 82 | if (isset($data['url']) && mb_strpos($data['url'], $storage->base_url()) !== 0) { |
83 | 83 | return false; |
84 | 84 | } |
85 | - $cdb = DB::instance()->{$module_data->db('files')}(); |
|
85 | + $cdb = DB::instance()->{$module_data->db('files')}(); |
|
86 | 86 | if (isset($data['url']) && !isset($data['tag'])) { |
87 | 87 | return $cdb->q( |
88 | 88 | "DELETE FROM `[prefix]plupload_files_tags` |
@@ -19,14 +19,14 @@ |
||
19 | 19 | if ($data['name'] != 'Plupload') { |
20 | 20 | return; |
21 | 21 | } |
22 | - $module_data = Config::instance()->module('Plupload'); |
|
23 | - $storage = Storage::instance()->{$module_data->storage('files')}; |
|
24 | - $cdb = DB::instance()->{$module_data->db('files')}; |
|
22 | + $module_data = Config::instance()->module('Plupload'); |
|
23 | + $storage = Storage::instance()->{$module_data->storage('files')}; |
|
24 | + $cdb = DB::instance()->{$module_data->db('files')}; |
|
25 | 25 | unset($module_data); |
26 | 26 | if (!$storage || !$cdb) { |
27 | 27 | return; |
28 | 28 | } |
29 | - $files = $cdb->q( |
|
29 | + $files = $cdb->q( |
|
30 | 30 | "SELECT `source` |
31 | 31 | FROM `[prefix]plupload_files`" |
32 | 32 | ); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Plupload |
|
4 | - * @category modules |
|
5 | - * @author Moxiecode Systems AB |
|
6 | - * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | - * @copyright Moxiecode Systems AB |
|
8 | - * @license GNU GPL v2, see license.txt |
|
9 | - */ |
|
3 | + * @package Plupload |
|
4 | + * @category modules |
|
5 | + * @author Moxiecode Systems AB |
|
6 | + * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | + * @copyright Moxiecode Systems AB |
|
8 | + * @license GNU GPL v2, see license.txt |
|
9 | + */ |
|
10 | 10 | namespace cs; |
11 | 11 | Event::instance()->on( |
12 | 12 | 'admin/System/components/modules/install/after', |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package Plupload |
|
4 | - * @category modules |
|
5 | - * @author Moxiecode Systems AB |
|
6 | - * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | - * @copyright Moxiecode Systems AB |
|
8 | - * @license GNU GPL v2, see license.txt |
|
9 | - */ |
|
3 | + * @package Plupload |
|
4 | + * @category modules |
|
5 | + * @author Moxiecode Systems AB |
|
6 | + * @author Nazar Mokrynskyi <[email protected]> (integration with CleverStyle CMS) |
|
7 | + * @copyright Moxiecode Systems AB |
|
8 | + * @license GNU GPL v2, see license.txt |
|
9 | + */ |
|
10 | 10 | namespace cs; |
11 | 11 | Event::instance()->on( |
12 | 12 | 'admin/System/components/modules/install/after', |
@@ -12,9 +12,9 @@ |
||
12 | 12 | 'admin/System/components/modules/install/after', |
13 | 13 | function ($data) { |
14 | 14 | if ($data['name'] == 'Plupload') { |
15 | - $Config = Config::instance(); |
|
16 | - $Config->module('Plupload')->max_file_size = '5mb'; |
|
17 | - $Config->module('Plupload')->confirmation_time = '900'; |
|
15 | + $Config = Config::instance(); |
|
16 | + $Config->module('Plupload')->max_file_size = '5mb'; |
|
17 | + $Config->module('Plupload')->confirmation_time = '900'; |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | ); |