Skip to content

Commit

Permalink
Merge pull request #159 from albig/fix-deprecations
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
Alexander Bigga authored Jul 30, 2020
2 parents 9d43e31 + ee9acec commit b8d6a33
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions Classes/Plugins/GridPager.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function main($content, $conf)

// Link to first page.
if ($this->piVars['pointer'] > 0) {
$markerArray['###FIRST###'] = $this->pi_linkTP_keepPIvars($this->pi_getLL('firstPage', '', TRUE),
$markerArray['###FIRST###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('firstPage', '')),
array(
'pointer' => 0,
'page' => NULL
Expand All @@ -106,57 +106,57 @@ public function main($content, $conf)

// Link back X pages.
if ($this->piVars['pointer'] >= $this->conf['pageStep']) {
$markerArray['###BACK###'] = $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('backXPages', '', TRUE), $this->conf['pageStep']),
$markerArray['###BACK###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $this->conf['pageStep'])),
array(
'pointer' => $this->piVars['pointer'] - $this->conf['pageStep'],
'page' => ($this->piVars['pointer'] - $this->conf['pageStep']) * $this->conf['limit'] + 1
), TRUE);
} else {
$markerArray['###BACK###'] = '<span>' . sprintf($this->pi_getLL('backXPages', '', TRUE), $this->conf['pageStep']) . '</span>';
$markerArray['###BACK###'] = '<span>' . htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $this->conf['pageStep'])) . '</span>';
}

// Link to previous page.
if ($this->piVars['pointer'] > 0) {
$markerArray['###PREVIOUS###'] = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '', TRUE),
$markerArray['###PREVIOUS###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '')),
array(
'pointer' => $this->piVars['pointer'] - 1,
'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1
), TRUE);
} else {
$markerArray['###PREVIOUS###'] = '<span>' . $this->pi_getLL('prevPage', '', TRUE) . '</span>';
$markerArray['###PREVIOUS###'] = '<span>' . htmlspecialchars($this->pi_getLL('prevPage', '')) . '</span>';
}

// Link to next page.
if ($this->piVars['pointer'] < $maxPointer) {
$markerArray['###NEXT###'] = $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '', TRUE),
$markerArray['###NEXT###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '')),
array(
'pointer' => $this->piVars['pointer'] + 1,
'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1
), TRUE);
} else {
$markerArray['###NEXT###'] = '<span>' . $this->pi_getLL('nextPage', '', TRUE) . '</span>';
$markerArray['###NEXT###'] = '<span>' . htmlspecialchars($this->pi_getLL('nextPage', '')) . '</span>';
}

// Link forward X pages.
if ($this->piVars['pointer'] < $maxPointer - $this->conf['pageStep']) {
$markerArray['###FORWARD###'] = $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('forwardXPages', '', TRUE), $this->conf['pageStep']),
$markerArray['###FORWARD###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $this->conf['pageStep'])),
array(
'pointer' => $this->piVars['pointer'] + $this->conf['pageStep'],
'page' => ($this->piVars['pointer'] + $this->conf['pageStep']) * $this->conf['limit'] + 1
), TRUE);
} else {
$markerArray['###FORWARD###'] = '<span>' . sprintf($this->pi_getLL('forwardXPages', '', TRUE), $this->conf['pageStep']) . '</span>';
$markerArray['###FORWARD###'] = '<span>' . htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $this->conf['pageStep'])) . '</span>';
}

// Link to last page.
if ($this->piVars['pointer'] < $maxPointer) {
$markerArray['###LAST###'] = $this->pi_linkTP_keepPIvars($this->pi_getLL('lastPage', '', TRUE),
$markerArray['###LAST###'] = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('lastPage', '')),
array(
'pointer' => $maxPointer,
'page' => $maxPointer * $this->conf['limit'] + 1
), TRUE);
} else {
$markerArray['###LAST###'] = '<span>' . $this->pi_getLL('lastPage', '', TRUE) . '</span>';
$markerArray['###LAST###'] = '<span>' . htmlspecialchars($this->pi_getLL('lastPage', '')) . '</span>';
}

$content .= $this->templateService->substituteMarkerArray($this->template, $markerArray);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Plugins/NewspaperCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private function getTemplateForYear($subparts, $toc, $year, $months, $firstMonth
'parameter' => $this->conf['targetPid'],
'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($toc[0]['points']),
);
$allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' .$toc[0][self::LABEL], $linkConf);
$allYearsLink = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('allYears', '')) . ' ' .$toc[0][self::LABEL], $linkConf);

// link to this year itself
$linkConf = array (
Expand Down
4 changes: 2 additions & 2 deletions Classes/Plugins/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function main($content, $conf)
$uris = array();

foreach ($uriBook as $uri) {
$piUriBook = $this->pi_getLL('uriBook', '', TRUE);
$piUriBook = htmlspecialchars($this->pi_getLL('uriBook', ''));

if (strpos($uri, 'http:') === 0 || strpos($uri, 'https:') === 0) {
$uris[] = '<a class="persistence-document" href="' . htmlspecialchars($uri) . '">' . $piUriBook . '</a>';
Expand All @@ -126,7 +126,7 @@ public function main($content, $conf)
$uris = array();

foreach ($uriPage as $uri) {
$piUriPage = $this->pi_getLL('uriPage', '', TRUE);
$piUriPage = htmlspecialchars($this->pi_getLL('uriPage', ''));

if (strpos($uri, 'http:') === 0 || strpos($uri, 'https:') === 0) {
$uris[] = '<a class="persistence-page" href="' . htmlspecialchars($uri) . '">' . $piUriPage . '</a>';
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/TitleTagViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
],
"license": "GPL-3.0-or-later",
"require": {
"typo3/cms-core": "^8.7|~9.5.17",
"kitodo/presentation": "~3.1.1",
"typo3/cms-core": "^8.7|~9.5.20",
"kitodo/presentation": "~3.1.2",
"slub/slub-digitalcollections": "~1.1.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'constraints' => [
'depends' => [
'typo3' => '8.7.0-9.5.99',
'dlf' => '3.1.1-',
'dlf' => '3.1.2-',
],
'conflicts' => [
],
Expand Down

0 comments on commit b8d6a33

Please sign in to comment.