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

Bugfixing

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