Commit 594d5ce3 authored by Dominik Hebeler's avatar Dominik Hebeler

Bugfixing

parent a31edb17
......@@ -4,15 +4,15 @@ update:
- triggers
before_script:
# Abhängigkeiten überprüfen
- which virtualbox
- which vagrant
- which composer
- which git
- which php
script:
# Pfad zum neu geklonten Repo
- path=`pwd`
- cd ~/
- $path/deploy/checkServerStatus.sh "$path"
- cd ~/MetaGer
- git pull "$path"
\ No newline at end of file
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer update
- cd ~/
- rm -rf MetaGer
- mv MetaGer_neu MetaGer
\ No newline at end of file
......@@ -87,27 +87,25 @@ class MetaGer
}
switch ($this->out) {
case 'html':
return view('metager3')
case 'results':
return view('metager3results')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('mobile', $this->mobile)
->with('warnings', $this->warnings)
->with('errors', $this->errors)
->with('metager', $this);
# code...
break;
default:
# code...
return view('metager3')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('mobile', $this->mobile)
->with('warnings', $this->warnings)
->with('errors', $this->errors)
->with('metager', $this);
break;
}
return view('metager3')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('warnings', $this->warnings)
->with('errors', $this->errors);
}
public function removeInvalids ()
......@@ -288,9 +286,6 @@ class MetaGer
if($tmp->enabled && isset($this->debug))
{
$this->warnings[] = $tmp->service . " Connection_Time: " . $tmp->connection_time . " Write_Time: " . $tmp->write_time . " Insgesamt:" . ((microtime()-$time)/1000);
}else
{
$this->warnings[] = "Suchmaschine " . $tmp->name . " nicht erreichbar" . " Insgesamt:" . ((microtime()-$time)/1000);
}
if($tmp->isEnabled())
......@@ -645,8 +640,10 @@ class MetaGer
public function generateSearchLink(String $fokus)
{
$link = action('MetaGerSearch@search', $this->request->all());
$link = preg_replace("/focus=[^&]*/si", "focus=$fokus", $link);
$requestData = $this->request->except('page');
$requestData['focus'] = $fokus;
$requestData['out'] = "results";
$link = action('MetaGerSearch@search', $requestData);
return $link;
}
......@@ -660,24 +657,28 @@ class MetaGer
public function generateSiteSearchLink(String $host)
{
$host = urlencode($host);
$link = action('MetaGerSearch@search', $this->request->all());
$link = preg_replace("/eingabe=([^&]*)/si", "eingabe=$1 site:$host", $link);
$requestData = $this->request->except('page');
$requestData['eingabe'] .= " site:$host";
$requestData['focus'] = "web";
$link = action('MetaGerSearch@search', $requestData);
return $link;
}
public function generateRemovedHostLink (String $host)
{
$host = urlencode($host);
$link = action('MetaGerSearch@search', $this->request->all());
$link = preg_replace("/eingabe=([^&]*)/si", "eingabe=$1 -host:$host", $link);
$requestData = $this->request->except('page');
$requestData['eingabe'] .= " -host:$host";
$link = action('MetaGerSearch@search', $requestData);
return $link;
}
public function generateRemovedDomainLink (String $domain)
{
$domain = urlencode($domain);
$link = action('MetaGerSearch@search', $this->request->all());
$link = preg_replace("/eingabe=([^&]*)/si", "eingabe=$1 -domain:$domain", $link);
$requestData = $this->request->except('page');
$requestData['eingabe'] .= " -domain:$domain";
$link = action('MetaGerSearch@search', $requestData);
return $link;
}
......
......@@ -165,12 +165,7 @@
@if( $metager->getFokus() === "web" )
<div role="tabpanel" class="tab-pane active" id="web">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
<iframe src="/qt/load.php?sprueche=&lang={{ $metager->getSprueche() }}&q={{ $metager->getQ() }}" class="col-md-4 hidden-xs hidden-sm"></iframe>
</div>
@yield('results')
</div>
</div>
@else
......@@ -186,12 +181,7 @@
@if( $metager->getFokus() === "bilder" )
<div role="tabpanel" class="tab-pane active" id="bilder">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
</div>
@yield('results')
</div>
</div>
@else
......@@ -207,12 +197,7 @@
@if( $metager->getFokus() === "nachrichten" )
<div role="tabpanel" class="tab-pane active" id="nachrichten">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
</div>
@yield('results')
</div>
</div>
@else
......@@ -223,17 +208,24 @@
</div>
@endif
@if( $metager->getFokus() === "wissenschaft" )
<div role="tabpanel" class="tab-pane active" id="wissenschaft">
<div class="row">
@yield('results')
</div>
</div>
@else
<div role="tabpanel" class="tab-pane" id="wissenschaft">
<div class="loader">
<img src="/img/ajax-loader.gif" alt="" />
</div>
</div>
@endif
@if( $metager->getFokus() === "produktsuche" )
<div role="tabpanel" class="tab-pane active" id="produktsuche">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
</div>
</div>
</div>
@else
......@@ -249,19 +241,11 @@
@if( $metager->getFokus() === "angepasst" )
<div role="tabpanel" class="tab-pane active" id="angepasst">
<div class="row">
<div class="col-md-8">
@yield('results')
</div>
<div class="col-md-4" id="quicktips">
<iframe src="{{ $metager->generateQuicktipLink() }}" class="col-md-4 hidden-xs hidden-sm"></iframe>
</div>
</div>
</div>
@endif
</div>
<nav class="pager">
{!! $metager->getResults()->links() !!}
</nav>
</div>
......
......@@ -2,17 +2,24 @@
@section('results')
{{-- 3-Mal Werbung --}}
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
<div class="col-md-8">
{{-- 3-Mal Werbung --}}
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
@foreach($metager->getResults()->items() as $result)
@if($result->number % 7 === 0)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endif
@include('layouts.result', ['result' => $result])
@endforeach
@foreach($metager->getResults()->items() as $result)
@if($result->number % 7 === 0)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endif
@include('layouts.result', ['result' => $result])
@endforeach
<nav class="pager">
{!! $metager->getResults()->links() !!}
</nav>
</div>
<div class="col-md-4" id="quicktips">
</div>
@endsection
<div class="col-md-8">
{{-- 3-Mal Werbung --}}
@for($i = 0; $i <= 2; $i++)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endfor
@foreach($metager->getResults()->items() as $result)
@if($result->number % 7 === 0)
@include('layouts.ad', ['ad' => $metager->popAd()])
@endif
@include('layouts.result', ['result' => $result])
@endforeach
</div>
<div class="col-md-4" id="quicktips">
</div>
\ No newline at end of file
Markdown is supported
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