[MERGE] Branch 'master' of https://phabricator.glanzstueck.agency/source/typo3-template_aide
This commit is contained in:
commit
007c3368f7
@ -15,6 +15,7 @@ namespace Cjel\TemplatesAide\Utility;
|
|||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||||
|
use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility to work with site config
|
* Utility to work with site config
|
||||||
@ -35,20 +36,33 @@ class SiteConfigUtility
|
|||||||
$objectManager = GeneralUtility::makeInstance(
|
$objectManager = GeneralUtility::makeInstance(
|
||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
|
$typoScriptParser = GeneralUtility::makeInstance(
|
||||||
|
TypoScriptParser::class
|
||||||
|
);
|
||||||
$configurationManager = $objectManager->get(
|
$configurationManager = $objectManager->get(
|
||||||
ConfigurationManagerInterface::class
|
ConfigurationManagerInterface::class
|
||||||
);
|
);
|
||||||
$typoscript = $configurationManager->getConfiguration(
|
$typoscript = $configurationManager->getConfiguration(
|
||||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT
|
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT
|
||||||
);
|
);
|
||||||
$typoscript = GeneralUtility::removeDotsFromTS($typoscript);
|
|
||||||
$siteConfig = $typoscript;
|
$siteConfig = $typoscript;
|
||||||
if ($limitToSiteConfig) {
|
if ($limitToSiteConfig) {
|
||||||
$siteConfig = $typoscript['config']['site'];
|
$siteConfig = $typoscript['config.']['site.'];
|
||||||
}
|
}
|
||||||
$current = &$siteConfig;
|
$current = &$siteConfig;
|
||||||
foreach ($pathParts as $key) {
|
foreach ($pathParts as $key) {
|
||||||
|
if ($current[$key . '.']) {
|
||||||
|
$key .= '.';
|
||||||
|
}
|
||||||
$current = &$current[$key];
|
$current = &$current[$key];
|
||||||
|
if (isset($current[0]) && $current[0] === '<') {
|
||||||
|
$searchkey = trim(substr($current, 1));
|
||||||
|
list($name, $conf) = $typoScriptParser->getVal(
|
||||||
|
$searchkey,
|
||||||
|
$typoscript
|
||||||
|
);
|
||||||
|
$current = $conf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (is_array($current)
|
if (is_array($current)
|
||||||
&& array_key_exists('value', $current)
|
&& array_key_exists('value', $current)
|
||||||
|
@ -34,6 +34,13 @@ class SiteConfigViewHelper extends AbstractViewHelper
|
|||||||
'The config key to get',
|
'The config key to get',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$this->registerArgument(
|
||||||
|
'siteConfig',
|
||||||
|
'bool',
|
||||||
|
'Limit the typoscript to the config.site part',
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,7 +58,7 @@ class SiteConfigViewHelper extends AbstractViewHelper
|
|||||||
) {
|
) {
|
||||||
return SiteConfigUtility::getByPath(
|
return SiteConfigUtility::getByPath(
|
||||||
$arguments['key'],
|
$arguments['key'],
|
||||||
false
|
$arguments['siteConfig']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
Configuration/TCA/Overrides/be_users.php
Normal file
4
Configuration/TCA/Overrides/be_users.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
defined('TYPO3_MODE') || die('Access denied.');
|
||||||
|
|
||||||
|
$tca = &$GLOBALS['TCA']['be_users'];
|
3
Makefile
Normal file
3
Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
add_upstreams:
|
||||||
|
git remote add upstream-dt git@git.datentonne.net:typo3/template_aide.git
|
||||||
|
git remote add upstream-gs ssh://vcs@phabricator.glanzstueck.agency/source/typo3-template_aide.git
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<xliff version="1.0">
|
<xliff version="1.0">
|
||||||
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2020-07-16T21:32:04Z">
|
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2022-04-28T10:23:09Z">
|
||||||
<header>
|
<header>
|
||||||
<generator>LFEditor</generator>
|
<generator>LFEditor</generator>
|
||||||
</header>
|
</header>
|
||||||
@ -9,6 +9,10 @@
|
|||||||
<source><![CDATA[Default]]></source>
|
<source><![CDATA[Default]]></source>
|
||||||
<target><![CDATA[Standard]]></target>
|
<target><![CDATA[Standard]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="disableDragModal" approved="yes">
|
||||||
|
<source><![CDATA[Disable drag and drop confirmation in page tree]]></source>
|
||||||
|
<target><![CDATA[Drag & Drop-Bestätigung im Seitenbaum deaktivieren]]></target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="homepage" approved="yes">
|
<trans-unit id="homepage" approved="yes">
|
||||||
<source><![CDATA[Homepage]]></source>
|
<source><![CDATA[Homepage]]></source>
|
||||||
<target><![CDATA[Startseite]]></target>
|
<target><![CDATA[Startseite]]></target>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<xliff version="1.0">
|
<xliff version="1.0">
|
||||||
<file source-language="en" datatype="plaintext" original="messages" date="2020-07-16T21:32:04Z">
|
<file source-language="en" datatype="plaintext" original="messages" date="2022-04-28T10:23:09Z">
|
||||||
<header>
|
<header>
|
||||||
<generator>LFEditor</generator>
|
<generator>LFEditor</generator>
|
||||||
</header>
|
</header>
|
||||||
@ -8,6 +8,9 @@
|
|||||||
<trans-unit id="default">
|
<trans-unit id="default">
|
||||||
<source><![CDATA[Default]]></source>
|
<source><![CDATA[Default]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="disableDragModal">
|
||||||
|
<source><![CDATA[Disable drag and drop confirmation in page tree]]></source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="homepage">
|
<trans-unit id="homepage">
|
||||||
<source><![CDATA[Homepage]]></source>
|
<source><![CDATA[Homepage]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
37
build/dev/core_fail-fatally-on-failed-inserts.diff
Normal file
37
build/dev/core_fail-fatally-on-failed-inserts.diff
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
*** webroot/typo3/sysext/core/Classes/DataHandling/DataHandler.php.orig 2022-04-22 13:15:26.314780488 +0200
|
||||||
|
--- webroot/typo3/sysext/core/Classes/DataHandling/DataHandler.php 2022-04-22 13:15:39.018129312 +0200
|
||||||
|
*************** class DataHandler implements LoggerAware
|
||||||
|
*** 7431,7446 ****
|
||||||
|
}
|
||||||
|
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
|
||||||
|
$insertErrorMessage = '';
|
||||||
|
! try {
|
||||||
|
// Execute the INSERT query:
|
||||||
|
$connection->insert(
|
||||||
|
$table,
|
||||||
|
$fieldArray,
|
||||||
|
$typeArray
|
||||||
|
);
|
||||||
|
! } catch (DBALException $e) {
|
||||||
|
! $insertErrorMessage = $e->getPrevious()->getMessage();
|
||||||
|
! }
|
||||||
|
// If succees, do...:
|
||||||
|
if ($insertErrorMessage === '') {
|
||||||
|
// Set mapping for NEW... -> real uid:
|
||||||
|
--- 7431,7446 ----
|
||||||
|
}
|
||||||
|
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
|
||||||
|
$insertErrorMessage = '';
|
||||||
|
! //try {
|
||||||
|
// Execute the INSERT query:
|
||||||
|
$connection->insert(
|
||||||
|
$table,
|
||||||
|
$fieldArray,
|
||||||
|
$typeArray
|
||||||
|
);
|
||||||
|
! //} catch (DBALException $e) {
|
||||||
|
! // $insertErrorMessage = $e->getPrevious()->getMessage();
|
||||||
|
! //}
|
||||||
|
// If succees, do...:
|
||||||
|
if ($insertErrorMessage === '') {
|
||||||
|
// Set mapping for NEW... -> real uid:
|
12
build/dev/impexp_dont-fail-on-changed-image-hashes.diff
Normal file
12
build/dev/impexp_dont-fail-on-changed-image-hashes.diff
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- webroot/typo3/sysext/impexp/Classes/Import.php 2022-04-22 12:43:09.439221153 +0200
|
||||||
|
+++ webroot/typo3/sysext/impexp/Classes/Import.php 2022-04-22 12:43:27.169242298 +0200
|
||||||
|
@@ -446,7 +446,8 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($newFile->getSha1() !== $fileRecord['sha1']) {
|
||||||
|
- $this->error('Error: The hash of the written file is not identical to the import data! File could be corrupted! File: "' . $fileRecord['identifier'] . '" with storage uid "' . $fileRecord['storage'] . '"');
|
||||||
|
+ print('Error: The hash of the written file is not identical to the import data! File could be corrupted! File: "' . $fileRecord['identifier'] . '" with storage uid "' . $fileRecord['storage'] . '"');
|
||||||
|
+ print(PHP_EOL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
--- a/Resources/Public/JavaScript/SvgTree.js 2022-04-28 12:32:01.961189044 +0200
|
||||||
|
+++ b/Resources/Public/JavaScript/SvgTree.js 2022-04-28 12:32:06.047858227 +0200
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
showCheckboxes: false,
|
||||||
|
showIcons: false,
|
||||||
|
allowRecursiveDelete: false,
|
||||||
|
+ disableDragModal: false,
|
||||||
|
marginTop: 15,
|
||||||
|
nodeHeight: 20,
|
||||||
|
indentWidth: 16,
|
||||||
|
--- a/Resources/Public/JavaScript/PageTree/PageTreeDragDrop.js 2022-04-28 11:43:41.046705421 +0200
|
||||||
|
+++ b/Resources/Public/JavaScript/PageTree/PageTreeDragDrop.js 2022-04-28 12:30:40.741138721 +0200
|
||||||
|
@@ -275,6 +275,10 @@
|
||||||
|
var modalText = options.position === 'in' ? TYPO3.lang['mess.move_into'] : TYPO3.lang['mess.move_after'];
|
||||||
|
modalText = modalText.replace('%s', options.node.name).replace('%s', options.target.name);
|
||||||
|
|
||||||
|
+ if (tree.settings.disableDragModal) {
|
||||||
|
+ options.command = 'move';
|
||||||
|
+ tree.sendChangeCommand(options);
|
||||||
|
+ } else {
|
||||||
|
Modal.confirm(
|
||||||
|
TYPO3.lang.move_page,
|
||||||
|
modalText,
|
||||||
|
@@ -307,6 +311,7 @@
|
||||||
|
|
||||||
|
Modal.dismiss();
|
||||||
|
});
|
||||||
|
+ }
|
||||||
|
} else if (tree.nodeIsOverDelete) {
|
||||||
|
var options = _this.changeNodePosition({droppedNode: droppedNode, command: 'delete'});
|
||||||
|
if (tree.settings.displayDeleteConfirmation) {
|
||||||
|
--- a/Classes/Controller/Page/TreeController.php 2022-04-28 13:00:20.025466105 +0200
|
||||||
|
+++ b/Classes/Controller/Page/TreeController.php 2022-04-28 13:00:22.312133921 +0200
|
||||||
|
@@ -155,6 +155,7 @@
|
||||||
|
'doktypes' => $this->getDokTypes(),
|
||||||
|
'displayDeleteConfirmation' => $this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE),
|
||||||
|
'temporaryMountPoint' => $this->getMountPointPath((int)($this->getBackendUser()->uc['pageTree_temporaryMountPoint'] ?? 0)),
|
||||||
|
+ 'disableDragModal' => !empty($this->getBackendUser()->uc['disableDragModal'])
|
||||||
|
];
|
||||||
|
|
||||||
|
return new JsonResponse($configuration);
|
@ -65,3 +65,14 @@ call_user_func(
|
|||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['disableDragModal'] = [
|
||||||
|
'type' => 'check',
|
||||||
|
'label' => 'LLL:EXT:templates_aide/Resources/Private/Language/locallang.xlf:disableDragModal',
|
||||||
|
];
|
||||||
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||||
|
'recursiveDelete',
|
||||||
|
'recursiveDelete,disableDragModal',
|
||||||
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||||
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user