Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Update TYPO3 12 #94

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Classes/ViewHelpers/XpathViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
***************************************************************/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;

use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
Expand Down Expand Up @@ -144,10 +143,7 @@ public static function renderStatic(
private static function getDocumentRepository()
{
if (null === static::$documentRepository) {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
static::$documentRepository = $objectManager->get(
DocumentRepository::class
);
static::$documentRepository = GeneralUtility::makeInstance(DocumentRepository::class);
}

return static::$documentRepository;
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die('Access denied.');

call_user_func(function()
{
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die('Access denied.');

// Add default Typoscript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die('Access denied.');

TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'SlubDigitalcollections',
Expand Down
3 changes: 2 additions & 1 deletion Configuration/TsConfig/All.tsconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#
# PageTS for SLUB Digitalcollections
#
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:slub_digitalcollections/Configuration/TsConfig/Mod/" extensions="tsconfig">
@import 'EXT:slub_digitalcollections/Configuration/TsConfig/Mod/WebLayout/BackendLayouts/*.tsconfig'
@import 'EXT:slub_digitalcollections/Configuration/TsConfig/Mod/Wizards/NewContentElement/*.tsconfig'
2 changes: 1 addition & 1 deletion Configuration/TypoScript/Plugin/Kitodo/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/Kitodo/common.typoscript">
@import 'EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/Kitodo/common.typoscript'

plugin.tx_dlf {
persistence {
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TypoScript/SitePackage/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ page {

}

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:slub_digitalcollections/Configuration/TypoScript/SitePackage/navigation.typoscript">
@import 'EXT:slub_digitalcollections/Configuration/TypoScript/SitePackage/navigation.typoscript'
6 changes: 2 additions & 4 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ page {
# --------------------------------------------------------------------------------------------------------------------
# The condition is necessary because you cannot nest TypoScript conditions. But inside the included TypoScript files,
# more conditions appear.

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/Kitodo/setup.typoscript">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/singleCollection.typoscript">

@import 'EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/Kitodo/setup.typoscript'
@import 'EXT:slub_digitalcollections/Configuration/TypoScript/Plugin/singleCollection.typoscript'
# --------------------------------------------------------------------------------------------------------------------
# body class overrides
# --------------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
pageUid="{settings.targetPid}"
additionalParams="{f:if(condition:'{child.id}', then:'{\'tx_dlf[id]\':child.id, \'tx_dlf[page]\':child.page}', else: '{\'tx_dlf[page]\':child.page}')}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}"
addQueryString="1"
addQueryStringMethod="GET"
addQueryString="untrusted"
title="{f:if(condition:'{child.title}', then: '{child.title}', else: '{child.type}')}">
<f:render partial="TableOfContents/Title" arguments="{child: child}"/>
</f:link.action>
Expand All @@ -61,7 +60,7 @@
action="main"
controller="Basket"
additionalParams="{'tx_dlf[addToBasket]':'toc', 'tx_dlf[logId]':child.basketButton.logId, 'tx_dlf[startpage]':child.basketButton.startpage, 'tx_dlf_basket[action]':'add', 'tx_dlf_basket[controller]':'Basket'}"
addQueryString="1">
addQueryString="untrusted">
<f:translate key="AddToBasket" />
</f:link.action>
</span>
Expand Down
24 changes: 12 additions & 12 deletions Resources/Private/Plugins/Kitodo/Templates/Navigation/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<f:if condition="{viewData.requestData.double}">
<f:then>
<div class="tx-dlf-navigation-double">
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[double]':'0'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[double]':'0'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="doublePageOn"/>
</f:link.action>
</div>
<div class="tx-dlf-navigation-double+">
<f:if condition="{viewData.requestData.double} && ({viewData.requestData.page} < {numPages})">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + 1}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + 1}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="doublePage+1"/>
</f:link.action>
Expand All @@ -47,7 +47,7 @@
</div>
</f:then>
<f:else>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[double]':'1'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[double]':'1'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="doublePageOn"/>
</f:link.action>
Expand All @@ -69,7 +69,7 @@
<span class="first">
<f:if condition="{viewData.requestData.page} > 1">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'1'}" class="first"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'1'}" class="first"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="firstPage"/>
</f:link.action>
Expand All @@ -87,7 +87,7 @@
<span class="rwnd">
<f:if condition="{viewData.requestData.page} > {pageSteps}">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page - pageSteps}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page - pageSteps}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="backXPages" arguments="{0: '{pageSteps}'}"/>
</f:link.action>
Expand All @@ -105,7 +105,7 @@
<span class="prev">
<f:if condition="{viewData.requestData.page} > {viewData.requestData.double + 1}">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page - 1 - viewData.requestData.double}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page - 1 - viewData.requestData.double}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="prevPage"/>
</f:link.action>
Expand Down Expand Up @@ -149,7 +149,7 @@
<span class="next">
<f:if condition="{viewData.requestData.page + viewData.requestData.double} < {numPages}">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + 1 + viewData.requestData.double}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + 1 + viewData.requestData.double}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="nextPage"/>
</f:link.action>
Expand All @@ -167,7 +167,7 @@
<span class="fwd">
<f:if condition="{viewData.requestData.page} <= {numPages - pageSteps}">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + pageSteps}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{viewData.requestData.page + pageSteps}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="forwardXPages" arguments="{0: '{pageSteps}'}"/>
</f:link.action>
Expand All @@ -185,7 +185,7 @@
<span class="last">
<f:if condition="{viewData.requestData.page} < {numPages - viewData.requestData.double}">
<f:then>
<f:link.action addQueryString="1" addQueryStringMethod="GET" additionalParams="{'tx_dlf[page]':'{numPages - viewData.requestData.double}'}"
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[page]':'{numPages - viewData.requestData.double}'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}">
<f:translate key="lastPage"/>
</f:link.action>
Expand Down Expand Up @@ -244,7 +244,7 @@
<f:if condition="{currentMeasure} > 1">
<f:then>
<f:variable name="prevMeasure" value="{currentMeasure - 1}" />
<f:link.action addQueryString="1" additionalParams="{'tx_dlf[measure]':'{currentMeasure - 1}', 'tx_dlf[page]':'{measurePages.{prevMeasure}}'}">
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[measure]':'{currentMeasure - 1}', 'tx_dlf[page]':'{measurePages.{prevMeasure}}'}">
<f:translate key="prevMeasure"/>
</f:link.action>
</f:then>
Expand All @@ -270,13 +270,13 @@
<f:if condition="{currentMeasure} > 0">
<f:then>
<f:variable name="nextMeasure" value="{currentMeasure + 1}" />
<f:link.action addQueryString="1" additionalParams="{'tx_dlf[measure]':'{currentMeasure + 1}', 'tx_dlf[page]':'{measurePages.{nextMeasure}}'}">
<f:link.action addQueryString="untrusted" additionalParams="{'tx_dlf[measure]':'{currentMeasure + 1}', 'tx_dlf[page]':'{measurePages.{nextMeasure}}'}">
<f:translate key="nextMeasure"/>
</f:link.action>
</f:then>
<f:else>
<f:link.action
addQueryString="1" additionalParams="{'tx_dlf[measure]':'1', 'tx_dlf[page]':'{measurePages.1}'}">
addQueryString="untrusted" additionalParams="{'tx_dlf[measure]':'1', 'tx_dlf[page]':'{measurePages.1}'}">
<f:translate key="nextMeasure"/>
</f:link.action>
</f:else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<f:if condition="{pagination.previousPageNumberG} && {pagination.previousPageNumberG} >= {pagination.firstPageNumber}">
<f:then>
<li class="first">
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': 1}" arguments="{searchParameter: lastSearch}" title="1">1</f:link.action>
<f:link.action action="{action}" addQueryString="untrusted" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': 1}" arguments="{searchParameter: lastSearch}" title="1">1</f:link.action>
</li>
<li class="previous">
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.previousPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'pagination.previous')}">{f:translate(key: 'prevPage')}</f:link.action>
<f:link.action action="{action}" addQueryString="untrusted" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.previousPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'pagination.previous')}">{f:translate(key: 'prevPage')}</f:link.action>
</li>
</f:then>
<f:else>
Expand Down Expand Up @@ -43,7 +43,7 @@
</f:case>
<f:defaultCase>
<li class="{f:if(condition: '{page.label} == {paginator.currentPageNumber}', then:'current')}">
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': page.startRecordNumber}" arguments="{searchParameter: lastSearch}">{page.label}</f:link.action>
<f:link.action action="{action}" addQueryString="untrusted" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': page.startRecordNumber}" arguments="{searchParameter: lastSearch}">{page.label}</f:link.action>
</li>
</f:defaultCase>
</f:switch>
Expand All @@ -53,10 +53,10 @@
<f:if condition="{pagination.nextPageNumberG} && {pagination.nextPageNumberG} <= {pagination.lastPageNumber}">
<f:then>
<li class="last">
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.lastPageNumberG}" arguments="{searchParameter: lastSearch}" title="{pagination.lastPageNumber}">{pagination.lastPageNumber}</f:link.action>
<f:link.action action="{action}" addQueryString="untrusted" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.lastPageNumberG}" arguments="{searchParameter: lastSearch}" title="{pagination.lastPageNumber}">{pagination.lastPageNumber}</f:link.action>
</li>
<li class="next">
<f:link.action action="{action}" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.nextPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'nextPage')}">{f:translate(key: 'nextPage')}</f:link.action>
<f:link.action action="{action}" addQueryString="untrusted" argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[page]'}" additionalParams="{'tx_dlf[page]': pagination.nextPageNumber}" arguments="{searchParameter: lastSearch}" title="{f:translate(key: 'nextPage')}">{f:translate(key: 'nextPage')}</f:link.action>
</li>
</f:then>
<f:else>
Expand Down
Binary file added Resources/Public/Icons/Extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
],
"license": "GPL-3.0-or-later",
"require": {
"typo3/cms-core": "^10.4|^11.5",
"kitodo/presentation": "^5.0|dev-master"
"php": "7.4 - 8.3",
"typo3/cms-core": "^11.5.40|^12.4.21",
"kitodo/presentation": "@dev"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die('Access denied.');

// plugins
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
Expand Down Expand Up @@ -34,3 +34,4 @@
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections']['options']['defaultLifeTime'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections']['options']['defaultLifeTime'] = 3600; // 3600 = 1 hour
}