Skip to content

Commit

Permalink
Merge pull request #370 from tyrant88/tyrant88-patch-126
Browse files Browse the repository at this point in the history
Fix incorrect new scanurl in redirect
  • Loading branch information
tyrant88 authored Apr 6, 2023
2 parents 04cd71b + 095abaa commit df062b2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## Version 6.9.8 (2023-04-06)
- Fix incorrect new scanurl in redirect
- Fix Warnings wenn Config noch nicht gespeichert

## Version 6.9.7 (2023-03-02)
Expand Down
8 changes: 4 additions & 4 deletions lib/search_it.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ public function indexArticle($_id, $_clang = false, $clearCache = false)
$scanurl = str_replace(array('../', './'), '/',$response->getHeader('location'));

$scanparts = parse_url($scanurl);
if (in_array('query',$scanparts)) {
if (array_key_exists('query', $scanparts)) {
list($scanurl, $parameters) = explode('?', $scanurl);
parse_str($parameters, $output);
unset($output['search_it_build_index']);
$scanurl = $scanurl . '?' . http_build_query($output);
}
if (!in_array('host',$scanparts)) {
if (!array_key_exists('host', $scanparts)) {
$lastparts = parse_url($lastscanurl);
if ( isset($lastparts['scheme']) && isset($lastparts['host']) ) {
$scanurl = $lastparts['scheme'] . '://' . $lastparts['host'] .
Expand Down Expand Up @@ -462,13 +462,13 @@ public function indexURL($url_hash, $article_id, $clang_id, $profile_id, $data_i
$scanurl = str_replace(array('../', './'), '/',$response->getHeader('location'));

$scanparts = parse_url($scanurl);
if (in_array('query',$scanparts)) {
if (array_key_exists('query', $scanparts)) {
list($scanurl, $parameters) = explode('?', $scanurl);
parse_str($parameters, $output);
unset($output['search_it_build_index']);
$scanurl = $scanurl . '?' . http_build_query($output);
}
if (!in_array('host',$scanparts)) {
if (!array_key_exists('host', $scanparts)) {
$lastparts = parse_url($lastscanurl);
if ( isset($lastparts['scheme']) && isset($lastparts['host']) ) {
$scanurl = $lastparts['scheme'] . '://' . $lastparts['host'] .
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: search_it
version: '6.9.7'
version: '6.9.8'
author: Friends Of REDAXO
supportpage: https://github.com/FriendsOfREDAXO/search_it

Expand Down
2 changes: 1 addition & 1 deletion plugins/autocomplete/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: search_it/autocomplete
version: '6.9.7'
version: '6.9.8'
author: Manétage

title: 'translate:search_it_autocomplete_plugin_title'
Expand Down
2 changes: 1 addition & 1 deletion plugins/documentation/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: search_it/documentation
version: '6.9.7'
version: '6.9.8'
author: Friends Of REDAXO

title: 'translate:search_it_documentation_title'
Expand Down
2 changes: 1 addition & 1 deletion plugins/plaintext/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: search_it/plaintext
version: '6.9.7'
version: '6.9.8'
author: Friends Of REDAXO

title: 'translate:search_it_plaintext_title'
Expand Down
2 changes: 1 addition & 1 deletion plugins/stats/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: search_it/stats
version: '6.9.7'
version: '6.9.8'
author: Friends Of REDAXO

title: 'translate:search_it_stats_plugin_title'
Expand Down

0 comments on commit df062b2

Please sign in to comment.