-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathboot.php
More file actions
28 lines (21 loc) · 778 Bytes
/
boot.php
File metadata and controls
28 lines (21 loc) · 778 Bytes
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
<?php
if (rex::isBackend() && rex::getUser() instanceof rex_user) {
if ($this->getConfig('patches_applied') == 0) {
// apply patches
rex_ckeditor::applyPatches();
$this->setConfig('patches_applied', 1);
}
if (!file_exists(rex_ckeditor::getAbsoluteProfileJSFile())) {
rex_ckeditor::writeProfileJSFile();
}
rex_view::addJsFile($this->getAssetsUrl('vendor/ckeditor.js'));
rex_view::addJsFile(rex_ckeditor::getRelativeProfileJSFile());
rex_view::addJsFile($this->getAssetsUrl('redaxo.js'));
rex_view::addCssFile($this->getAssetsUrl('backend.css'));
rex_extension::register('CACHE_DELETED', function () {
rex_ckeditor::writeProfileJSFile();
});
rex_extension::register('BACKUP_AFTER_DB_IMPORT', function () {
rex_ckeditor::writeProfileJSFile();
});
}