From c9398ca8e817c44d0807024e5e524c2f089bb496 Mon Sep 17 00:00:00 2001 From: Kurt Gusbeth Date: Mon, 10 May 2021 16:56:25 +0200 Subject: [PATCH] version 2.1.0: Bugfix for redirect import. --- Classes/Controller/SessionController.php | 18 ++++++++++++------ Documentation/Changelog/Index.rst | 3 ++- README.md | 4 ++-- ext_emconf.php | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Classes/Controller/SessionController.php b/Classes/Controller/SessionController.php index 5e74dc1..109584f 100644 --- a/Classes/Controller/SessionController.php +++ b/Classes/Controller/SessionController.php @@ -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)) { diff --git a/Documentation/Changelog/Index.rst b/Documentation/Changelog/Index.rst index eed7eda..ae28f1a 100644 --- a/Documentation/Changelog/Index.rst +++ b/Documentation/Changelog/Index.rst @@ -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. diff --git a/README.md b/README.md index 3fe4c60..a3de484 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php index 690ab38..e9707c5 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -21,7 +21,7 @@ 'uploadfolder' => false, 'createDirs' => '', 'clearCacheOnLoad' => false, - 'version' => '2.0.11', + 'version' => '2.1.0', 'constraints' => array ( 'depends' => array (