Commit 36a2051f authored by Christian Kuhn's avatar Christian Kuhn Committed by Anja Leichsenring
Browse files

[TASK] Use constant 'TYPO3' in global script files

Avoid usage of constant 'TYPO3_MODE' as security gate
in script files that don't run in class or callable context.
Use new constant 'TYPO3' instead.

Resolves: #92949
Related: #92947
Related: #92948
Releases: master
Change-Id: I95618793ed29b4b71e9e97ea8da124924d6753fc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66938

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Daniel Haupt's avatarDaniel Haupt <mail@danielhaupt.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Daniel Haupt's avatarDaniel Haupt <mail@danielhaupt.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent aa4bd8ad
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [
'preview' => [
......
<?php
declare(strict_types=1);
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
$GLOBALS['SiteConfiguration']['site']['columns']['tx_a_a'] = [
'label' => 'a',
......
<?php
declare(strict_types=1);
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
$GLOBALS['SiteConfiguration']['site']['columns']['tx_b_a'] = [
'label' => 'a',
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433106] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::class;
$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433107] = \TYPO3\CMS\Backend\Backend\ToolbarItems\HelpToolbarItem::class;
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
// Register as a skin
$GLOBALS['TBE_STYLES']['skins']['backend'] = [
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
// Module Web->Info->Log
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][] = \TYPO3\CMS\Beuser\Hook\SwitchBackUserHook::class . '->switchBack';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Beuser\Hook\BackendControllerHook::class . '->addJavaScript';
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
// Module System > Backend Users
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
// Populate available languages
/** @var \TYPO3\CMS\Core\Localization\Locales $locales */
......
<?php
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
'core',
'pages',
......
<?php
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
'core',
'sys_file_metadata',
......
<?php
defined('TYPO3_MODE') || die();
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Driver\DriverRegistry::class)->addDriversToTCA();
<?php
defined('TYPO3') or die();
// Show copied pages records in frontend request
$GLOBALS['TCA']['pages']['ctrl']['hideAtCopy'] = false;
......
<?php
defined('TYPO3') or die();
// Prepend label for copied sys_category records
$GLOBALS['TCA']['sys_category']['ctrl']['prependAtCopy'] = 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy';
// Prepend label for localized sys_category records
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('irre_tutorial', 'Configuration/TypoScript', 'IRRE Tutorial');
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
// Show copied tt_content records in frontend request
$GLOBALS['TCA']['tt_content']['ctrl']['hideAtCopy'] = false;
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'IrreTutorial',
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
'tx_irretutorial_1nff_hotel,tx_irretutorial_1nff_offer,tx_irretutorial_1nff_price,tx_irretutorial_mnasym_hotel,tx_irretutorial_mnasym_hotel_offer_rel,tx_irretutorial_1ncsv_hotel,tx_irretutorial_1ncsv_offer'
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'tt_content',
......
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_testdatahandler_element');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment