Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
05b1548d
Commit
05b1548d
authored
Feb 20, 2019
by
Dominik Hebeler
Browse files
Changed link target for Uni Mainz
parent
602f9f6c
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
05b1548d
...
@@ -308,10 +308,6 @@ class MetaGer
...
@@ -308,10 +308,6 @@ class MetaGer
}
}
if
(
$this
->
validated
)
{
$this
->
ads
=
[];
}
if
(
count
(
$this
->
results
)
<=
0
)
{
if
(
count
(
$this
->
results
)
<=
0
)
{
if
(
strlen
(
$this
->
site
)
>
0
)
{
if
(
strlen
(
$this
->
site
)
>
0
)
{
$no_sitesearch_query
=
str_replace
(
urlencode
(
"site:"
.
$this
->
site
),
""
,
$this
->
fullUrl
);
$no_sitesearch_query
=
str_replace
(
urlencode
(
"site:"
.
$this
->
site
),
""
,
$this
->
fullUrl
);
...
@@ -978,12 +974,15 @@ class MetaGer
...
@@ -978,12 +974,15 @@ class MetaGer
$this
->
sprueche
=
false
;
$this
->
sprueche
=
false
;
}
}
$this
->
newtab
=
$request
->
input
(
'newtab'
,
'o
n
'
);
$this
->
newtab
=
$request
->
input
(
'newtab'
,
'o
ff
'
);
if
(
$this
->
newtab
===
"on"
)
{
if
(
$this
->
newtab
===
"on"
)
{
$this
->
newtab
=
"_blank"
;
$this
->
newtab
=
"_blank"
;
}
else
{
}
else
{
$this
->
newtab
=
"_self"
;
$this
->
newtab
=
"_self"
;
}
}
if
(
$request
->
filled
(
"key"
)
&&
$request
->
input
(
'key'
)
===
getenv
(
"mainz_key"
))
{
$this
->
newtab
=
"_top"
;
}
# Theme
# Theme
$this
->
theme
=
preg_replace
(
"/[^[:alnum:][:space:]]/u"
,
''
,
$request
->
input
(
'theme'
,
'default'
));
$this
->
theme
=
preg_replace
(
"/[^[:alnum:][:space:]]/u"
,
''
,
$request
->
input
(
'theme'
,
'default'
));
# Ergebnisse pro Seite:
# Ergebnisse pro Seite:
...
@@ -1025,20 +1024,6 @@ class MetaGer
...
@@ -1025,20 +1024,6 @@ class MetaGer
// Remove Inputs that are not used
// Remove Inputs that are not used
$this
->
request
=
$request
->
replace
(
$request
->
except
([
'verification_id'
,
'uid'
,
'verification_count'
]));
$this
->
request
=
$request
->
replace
(
$request
->
except
([
'verification_id'
,
'uid'
,
'verification_count'
]));
$this
->
validated
=
false
;
if
(
isset
(
$this
->
password
))
{
# Wir bieten einen bezahlten API-Zugriff an, bei dem dementsprechend die Werbung ausgeblendet wurde:
# Aktuell ist es nur die Uni-Mainz. Deshalb überprüfen wir auch nur diese.
$password
=
getenv
(
'mainz'
);
$passwordBerlin
=
getenv
(
'berlin'
);
$eingabe
=
$this
->
eingabe
;
$password
=
md5
(
$eingabe
.
$password
);
$passwordBerlin
=
md5
(
$eingabe
.
$passwordBerlin
);
if
(
$this
->
password
===
$password
||
$this
->
password
===
$passwordBerlin
)
{
$this
->
validated
=
true
;
}
}
$this
->
out
=
$request
->
input
(
'out'
,
"html"
);
$this
->
out
=
$request
->
input
(
'out'
,
"html"
);
# Standard output format html
# Standard output format html
if
(
$this
->
out
!==
"html"
&&
$this
->
out
!==
"json"
&&
$this
->
out
!==
"results"
&&
$this
->
out
!==
"results-with-style"
&&
$this
->
out
!==
"result-count"
&&
$this
->
out
!==
"rss20"
&&
$this
->
out
!==
"atom10"
&&
$this
->
out
!==
"rich"
&&
$this
->
out
!==
"api"
)
{
if
(
$this
->
out
!==
"html"
&&
$this
->
out
!==
"json"
&&
$this
->
out
!==
"results"
&&
$this
->
out
!==
"results-with-style"
&&
$this
->
out
!==
"result-count"
&&
$this
->
out
!==
"rss20"
&&
$this
->
out
!==
"atom10"
&&
$this
->
out
!==
"rich"
&&
$this
->
out
!==
"api"
)
{
...
...
resources/views/layouts/result.blade.php
View file @
05b1548d
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<a
class=
"result-hoster"
href=
"{{ $result->gefVonLink }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{{ $result->gefVon }}
</a>
<a
class=
"result-hoster"
href=
"{{ $result->gefVonLink }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{{ $result->gefVon }}
</a>
</div>
</div>
<div
class=
"result-subheadline"
>
<div
class=
"result-subheadline"
>
<a
class=
"result-link"
href=
"{{ $result->link }}"
rel=
"noopener"
>
<a
class=
"result-link"
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
{{ $result->anzeigeLink }}
{{ $result->anzeigeLink }}
</a>
</a>
@if( isset($result->partnershop)
&&
$result->partnershop === TRUE)
@if( isset($result->partnershop)
&&
$result->partnershop === TRUE)
...
@@ -28,14 +28,14 @@
...
@@ -28,14 +28,14 @@
<div
class=
"result-body"
>
<div
class=
"result-body"
>
@if( isset($result->logo) )
@if( isset($result->logo) )
<div
class=
"result-logo"
>
<div
class=
"result-logo"
>
<a
href=
"{{ $result->link }}"
rel=
"noopener"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"{{ $metager->getImageProxyLink($result->logo) }}"
alt=
""
/>
<img
src=
"{{ $metager->getImageProxyLink($result->logo) }}"
alt=
""
/>
</a>
</a>
</div>
</div>
@endif
@endif
@if( $result->image !== "" )
@if( $result->image !== "" )
<div
class=
"result-image"
>
<div
class=
"result-image"
>
<a
href=
"{{ $result->link }}"
rel=
"noopener"
>
<a
href=
"{{ $result->link }}"
target=
"{{ $metager->getNewtab() }}"
rel=
"noopener"
>
<img
src=
"{{ $metager->getImageProxyLink($result->image) }}"
align=
"left"
width=
"120px"
height=
"60px"
alt=
""
/>
<img
src=
"{{ $metager->getImageProxyLink($result->image) }}"
align=
"left"
width=
"120px"
height=
"60px"
alt=
""
/>
</a>
</a>
</div>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment