Commit 33b88247 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Sitesearch Link ist nun Klickbar

parent 27111d7e
...@@ -398,7 +398,7 @@ class MetaGer ...@@ -398,7 +398,7 @@ class MetaGer
$siteSearchFailed = true; $siteSearchFailed = true;
}else }else
{ {
$this->warnings[] = "Sie führen eine Sitesearch durch. Es werden nur Ergebnisse von der Seite: <a href=\"http://www." . $this->site . "\">\"" . $this->site . "\"</a> angezeigt."; $this->warnings[] = "Sie führen eine Sitesearch durch. Es werden nur Ergebnisse von der Seite: <a href=\"http://" . $this->site . "\" target=\"_blank\">\"" . $this->site . "\"</a> angezeigt.";
} }
} }
...@@ -634,9 +634,7 @@ class MetaGer ...@@ -634,9 +634,7 @@ class MetaGer
public function checkSpecialSearches (Request $request) public function checkSpecialSearches (Request $request)
{ {
# Site Search: # Site Search:
# (.*)\bsite:(?:http:\/\/)?(?:www\.)?(\S+)(.*) if(preg_match("/(.*)\bsite:(\S+)(.*)/si", $this->q, $match))
# gibt als Seite nur den Teil nach eventuellem "Http://" und "www." aus.
if(preg_match("/(.*)\bsite:(?:http:\/\/)?(?:www\.)?(\S+)(.*)/si", $this->q, $match))
{ {
$this->site = $match[2]; $this->site = $match[2];
$this->q = $match[1] . $match[3]; $this->q = $match[1] . $match[3];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment