Skip to content

Commit

Permalink
version 2.1.0:
Browse files Browse the repository at this point in the history
Bugfix for redirect import.
  • Loading branch information
bihor committed May 10, 2021
1 parent 92bfefe commit c9398ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
18 changes: 12 additions & 6 deletions Classes/Controller/SessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,19 @@ public function redirectsAction()
$rewrites = explode(' ', $row);
preg_match('/R=(\d+)/', $rewrites[3], $treffer);
$statuscode = $treffer[1];
if (!$statuscode) $statuscode = intval($defaultstatuscode);
if ($rewrites[1] && substr($rewrites[1], 0, 2) != '^/') {
$rewrites[1] = '^/' . substr($rewrites[1], 1); // ein / wird am Anfang benötigt
}
if ($rewrites[1] && $regexp) {
$rewrites[1] = '#' . $rewrites[1] . '#'; // TYPO3 will das so
if (!$statuscode) {
$statuscode = intval($defaultstatuscode);
}
if ($rewrites[1] && (substr($rewrites[1], 0, 2) != '^/') && (substr($rewrites[1], 0, 1) == '^')) {
if ($regexp) {
$rewrites[1] = '^/' . substr($rewrites[1], 1); // aus ^xyz wird ^/xyz
} else {
$rewrites[1] = '/' . substr($rewrites[1], 1); // aus ^xyz wird /xyz
}
}
if ($regexp) {
$rewrites[1] = '#' . $rewrites[1] . '#'; // TYPO3 will das so
}
if ($rewrites[1] && $rewrites[2] && (strlen($rewrites[1])>2)) {
if ($method) {
if ($this->sessionRepository->addRedirect($rewrites[1], $rewrites[2], $regexp, $statuscode, $beuser_id)) {
Expand Down
3 changes: 2 additions & 1 deletion Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

Changelog
=========
Version 2.0.8:
Version 2.1.0:
Redirects check tool added.
misc field added in the list of used extensions.
Bugfix: Redirects import.

Version 2.0.6:
Order by added to the extension list view.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# backendtools

version 2.0.11
version 2.1.0

8 admin tools for extensions, slug, redirects, files, images and links:
extensionlist, Slug vs. RealURL, import redirects, check redirects, delete unused files, images with no title, unzip and linklist.
Expand All @@ -11,5 +11,5 @@ https://docs.typo3.org/p/fixpunkt/backendtools/master/en-us/
Version 2.0.0: refactoring. See changelog:
https://docs.typo3.org/p/fixpunkt/backendtools/master/en-us/Changelog/Index.html

Version 2.0.11: redirects check tool added.
Version 2.1.0: redirects check tool added. Bugfix for redirect imports.
Gridelements infos added to the extension list view.
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'uploadfolder' => false,
'createDirs' => '',
'clearCacheOnLoad' => false,
'version' => '2.0.11',
'version' => '2.1.0',
'constraints' =>
array (
'depends' => array (
Expand Down

0 comments on commit c9398ca

Please sign in to comment.