forked from Schweriner/tgm_copyright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
25 lines (22 loc) · 925 Bytes
/
ext_tables.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
<?php
use Psr\Http\Message\ServerRequestInterface;
if (!defined('TYPO3')) {
die('Access denied.');
}
(function() {
/** @var \TYPO3\CMS\Core\Context\Context $context */
$context = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Context\Context::class);
if(true === (bool) $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['tgm_copyright']['copyrightRequired']
&& (
!(($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface)
|| false === \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()
)
)
{
try {
$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
$pageRenderer->loadRequireJsModule('TYPO3/CMS/TgmCopyright/RequiredFileReferenceFields');
} catch (Exception $exc) {
}
}
})();