Commit 9bb46051 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch 'development' into 'master'

Development



See merge request !202
parents 5d67ba5c 95527e66
......@@ -17,11 +17,11 @@ update(144.76.113.134):
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer install
- scp metager@metager3.de:~/.env .
- scp metager@metager3.de:~/sumas.xml config/
- scp metager@metager3.de:~/sumasEn.xml config/
- scp metager@metager3.de:~/blacklistUrl.txt config/
- scp metager@metager3.de:~/blacklistDomains.txt config/
- scp -P 63824 metager@metager3.de:~/.env .
- scp -P 63824 metager@metager3.de:~/sumas.xml config/
- scp -P 63824 metager@metager3.de:~/sumasEn.xml config/
- scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
- touch storage/logs/laravel.log
- touch storage/logs/worker.log
- chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
......@@ -54,11 +54,11 @@ update(metager2):
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer install
- scp metager@metager3.de:~/.env .
- scp metager@metager3.de:~/sumas.xml config/
- scp metager@metager3.de:~/sumasEn.xml config/
- scp metager@metager3.de:~/blacklistUrl.txt config/
- scp metager@metager3.de:~/blacklistDomains.txt config/
- scp -P 63824 metager@metager3.de:~/.env .
- scp -P 63824 metager@metager3.de:~/sumas.xml config/
- scp -P 63824 metager@metager3.de:~/sumasEn.xml config/
- scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
- touch storage/logs/laravel.log
- touch storage/logs/worker.log
- chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
......@@ -91,11 +91,11 @@ update(metager3.de):
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer install
- scp metager@metager3.de:~/.env .
- scp metager@metager3.de:~/sumas.xml config/
- scp metager@metager3.de:~/sumasEn.xml config/
- scp metager@metager3.de:~/blacklistUrl.txt config/
- scp metager@metager3.de:~/blacklistDomains.txt config/
- scp -P 63824 metager@metager3.de:~/.env .
- scp -P 63824 metager@metager3.de:~/sumas.xml config/
- scp -P 63824 metager@metager3.de:~/sumasEn.xml config/
- scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
- touch storage/logs/laravel.log
- touch storage/logs/worker.log
- chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
......
......@@ -32,12 +32,12 @@ class MailController extends Controller
}else{
# Wir versenden die Mail des Benutzers an uns:
$message = $request->input('message');
if( Mail::send(['text' => 'kontakt.mail'], ['messageText'=>$message], function($message) use($replyTo){
$subject = "[Ticket " . date("Y") . date("d") . date("m") . date("H") . date("i") . date("s") . "] MetaGer - Kontaktanfrage";
if( Mail::send(['text' => 'kontakt.mail'], ['messageText'=>$message], function($message) use($replyTo, $subject){
$message->to("office@suma-ev.de", $name = null);
$message->from($replyTo, $name = null);
$message->replyTo($replyTo, $name = null);
$message->subject("MetaGer - Kontaktanfrage");
$message->subject($subject);
}) ){
# Mail erfolgreich gesendet
$messageType = "success";
......
......@@ -83,7 +83,7 @@ class Search extends Job implements ShouldQueue
break;
}
if( sizeof(($tmp = explode(": ", $data))) === 2 )
$headers[trim($tmp[0])] = trim($tmp[1]);
$headers[strtolower(trim($tmp[0]))] = trim($tmp[1]);
$c++;
}
while (true);
......@@ -91,13 +91,13 @@ class Search extends Job implements ShouldQueue
// end of headers
if(sizeof($headers) > 1){
$bodySize = 0;
if( isset($headers["Transfer-Encoding"]) && $headers["Transfer-Encoding"] === "chunked" )
if( isset($headers["transfer-encoding"]) && $headers["transfer-encoding"] === "chunked" )
{
$body = $this->readChunked();
}elseif( isset($headers['Content-Length']) )
}elseif( isset($headers['content-length']) )
{
$length = trim($headers['Content-Length']);
$length = trim($headers['content-length']);
if(is_numeric($length) && $length >= 1)
$body = $this->readBody($length);
$bodySize = strlen($body);
......@@ -111,7 +111,7 @@ class Search extends Job implements ShouldQueue
}
Redis::del($this->host . "." . $this->socketNumber);
if( isset($headers["Content-Encoding"]) && $headers['Content-Encoding'] === "gzip")
if( isset($headers["content-encoding"]) && $headers['content-encoding'] === "gzip")
{
$body = $this->gunzip($body);
}
......
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
use Symfony\Component\DomCrawler\Crawler;
class Europeana extends Searchengine
{
public $results = [];
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
$result = preg_replace("/\r\n/si", "", $result);
try {
$content = json_decode($result);
} catch (\Exception $e) {
abort(500, "$result is not a valid json string");
}
if(!$content)
{
return;
}
$results = $content->items;
foreach($results as $result)
{
if(isset($result->edmPreview)) {
$title = $result->title[0];
if (preg_match("/(.+)\?.*/si", $result->guid, $match)){
$link = $match[1];
} else {
$link = "";
}
$anzeigeLink = $link;
$descr = "";
/*if (preg_match("/(?:uri=)(.+)/si", urldecode($result->edmPreview[0]), $match)){
$image = $match[1];
} else {
$image = "";
}
echo $image . "
";*/
$image = urldecode($result->edmPreview[0]);
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter,
false,
$image
);
}
}
}
}
\ No newline at end of file
......@@ -343,6 +343,7 @@ header ul li{
.mg-panel {
margin: 0 auto;
margin-top:7%;
padding: 10px 20px;
margin-bottom: 0;
background-color: white;
......
User-agent: *
Disallow: /klassik/meta/
Disallow: /en/klassik/meta/
Disallow: /meta/
Disallow: /en/meta/
Disallow: /qt
Disallow: /en/qt
Disallow: /domains/
Disallow: /metager3/
Disallow: /alpha/
\ No newline at end of file
......@@ -24,5 +24,8 @@ return [
'navigationToggle' => 'Navigation anzeigen',
'sumaev.1' => 'MetaGer wird entwickelt und betrieben vom ',
'sumaev.2' => 'SUMA-EV - Verein für freien Wissenszugang.'
'sumaev.2' => 'SUMA-EV - Verein für freien Wissenszugang.',
'meta.Description' => 'Sicher suchen und finden unter Wahrung der Privatsphäre. Das digitale Wissen der Welt muss ohne Bevormundung durch Staaten oder Konzerne frei zugänglich sein und bleiben.',
'meta.Keywords' => 'Internetsuche, privatsphäre, privacy, Suchmaschine, Datenschutz, Anonproxy, anonym suchen, Bildersuche, Suchmaschine, anonym, MetaGer, metager, metager.de',
'meta.language' => 'de'
];
\ No newline at end of file
......@@ -24,5 +24,8 @@ return [
'navigationToggle' => 'show navigation',
'sumaev.1' => 'MetaGer is developed and run by ',
'sumaev.2' => 'SUMA-EV - Association for Free Access to Knowledge.'
'sumaev.2' => 'SUMA-EV - Association for Free Access to Knowledge.',
'meta.Description' => 'Search safely while having your privacy respected. The digital knowledge of the world must be freely accessible without paternalism and abide by states or corporations.',
'meta.Keywords' => 'Internet Search, privacy, searchengine, data protection, Anonproxy, anonymous proxy, search anonymous, image search, anonymous, MetaGer, metager, metager.de, metager.net',
'meta.language' => 'en'
];
......@@ -4,8 +4,9 @@
<title>@yield('title')</title>
<!-- TradeDoubler site verification 2866738 -->
<meta charset="utf-8" />
<meta name="description" content="Sicher suchen und finden unter Wahrung der Privatsph&auml;re. Das digitale Wissen der Welt muss ohne Bevormundung durch Staaten oder Konzerne frei zug&auml;nglich sein und bleiben." />
<meta name="keywords" content="Internetsuche, privatsph&auml;re, privacy, Suchmaschine, Datenschutz, Anonproxy, anonym suchen, Bildersuche, Suchmaschine, anonym, MetaGer, metager, metager.de" />
<meta name="description" content="{!! trans('staticPages.meta.Description') !!}" />
<meta name="keywords" content="{!! trans('staticPages.meta.Keywords') !!}" />
<meta http-equiv=”language” content="{!! trans('staticPages.meta.language') !!}" />
<meta name="page-topic" content="Dienstleistung" />
<meta name="robots" content="index,follow" />
<meta name="revisit-after" content="7 days" />
......@@ -87,11 +88,13 @@
</nav>
</header>
<div class="wrapper">
<div class="mg-panel container" id="spendenaufruf" style="margin-bottom:20px;max-height:126px;text-align:center;padding:0px;margin-top:0px">
@if( App::isLocale('de') )
<div class="mg-panel container" id="spendenaufruf" style="margin-bottom:-6%;max-height:126px;text-align:center;padding:0px;margin-top:0px">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spendenaufruf") }}">
<img src="/img/aufruf.png" style="max-width:100%;max-height:126px;">
</a>
</div>
@endif
<main class="mg-panel container">
@if (isset($success))
<div class="alert alert-success" role="alert">{{ $success }}</div>
......
......@@ -24,7 +24,7 @@
@else
<div class="col-xs-12 col-md-12 resultContainer">
@endif
@if( !$metager->validated)
@if( !$metager->validated && App::isLocale('de') )
<div class="mg-panel container" style="margin-bottom:20px;max-height:90px;text-align:left; max-width:100%; padding:0px;margin-top:0px">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spendenaufruf") }}" target="_blank">
<img src="/img/aufruf.png" style="max-width:100%;max-height:90px;">
......
......@@ -19,7 +19,7 @@
</ul>
</div>
@endif
@if( !$metager->validated)
@if( !$metager->validated && App::isLocale('de') )
<div class="mg-panel container" id="spendenaufruf" style="margin-bottom:20px;max-height:126px;max-width:100%;text-align:center;padding:0px;margin-top:0px">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spendenaufruf") }}">
<img src="/img/aufruf.png" style="max-width:100%;max-height:126px;">
......
......@@ -16,7 +16,7 @@
</ul>
</div>
@endif
@if( !$metager->validated)
@if( !$metager->validated && App::isLocale('de') )
<div class="mg-panel container" id="spendenaufruf" style="margin-bottom:20px;max-height:126px;max-width:100%;text-align:center;padding:0px;margin-top:0px">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spendenaufruf") }}">
<img src="/img/aufruf.png" style="max-width:100%;max-height:126px;">
......
......@@ -17,7 +17,7 @@
</div>
@endif
<div class="col-xs-12 col-md-8">
@if( !$metager->validated)
@if( !$metager->validated && App::isLocale('de') )
<div class="mg-panel container" style="margin-bottom:20px;max-height:90px;text-align:left; max-width:100%; padding:0px;margin-top:0px">
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/spendenaufruf") }}" target="_blank">
<img src="/img/aufruf.png" style="max-width:100%;max-height:90px;">
......
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