This repository has been archived by the owner on Dec 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
boot.php
71 lines (58 loc) · 1.92 KB
/
boot.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* multiupload Addon.
* @author Friends Of REDAXO
* @package redaxo
* @var rex_addon $this
*/
$addon = rex_addon::get('multiupload');
// --- DYN
$properties = array (
'folder' => rex_path::media(),
'sync_cats' => '1',
'instant_upload_start' => '1',
'upload_simultaneously' => '5',
'clear_uploadlist_automatically' => '0',
'clear_file_after_finish' => '1',
'show_footnote' => '0',
'php_debug' => '0',
'javascript_debug' => '0',
);
foreach($properties as $key => $val) {
$addon->setProperty($key,$val);
}
// --- /DYN
// --- HEADER
if (rex::isBackend() && rex::getUser()) {
rex_view::addCssFile($addon->getAssetsUrl('fileuploader.css'));
rex_view::addJSFile($addon->getAssetsUrl('fileuploader.js'));
$_REX_HACK_OPENER = "";
$_REX_HACK_OPENER = rex_request('opener_input_field', 'string');
$header =
PHP_EOL.' '.
PHP_EOL.' <!-- multiupload -->'.
PHP_EOL.' <script type="text/javascript">var lastMediaPoolOpener = "'.$_REX_HACK_OPENER.'";</script>'.
PHP_EOL.' <!-- ###MULTIUPLOAD_EP_REPLACE### -->'.
PHP_EOL.' <!-- /multiupload -->'.PHP_EOL;
rex_extension::register('OUTPUT_FILTER', function(rex_extension_point $ep) use ($header){
$suchmuster = '</head>';
$ersetzen = $header ."\n</head>";
$ep->setSubject(str_replace($suchmuster, $ersetzen, $ep->getSubject()));
});
// Medienpool upload + sync Page deaktivieren
rex_extension::register('PAGES_PREPARED', function () {
/*
$page = rex_be_controller::getPageObject('mediapool/upload');
if ($page) {
$page->setHidden(true);
$page->setHasLayout(true);
$page->setSubPath($this->getPath("pages/mediapool.multiupload.quickupload.php"));
}
$page = rex_be_controller::getPageObject('mediapool/sync');
if ($page) {
$page->setHidden(true);
}
*/
});
}
// --- /HEADER