Skip to content
GitLab
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
a6d1f5a8
Commit
a6d1f5a8
authored
Jun 01, 2016
by
Dominik Hebeler
Browse files
Merge branch '39-ranking-uberfuhren' into 'master'
Bugfixing Closes
#39
See merge request
!41
parents
d6544372
594d5ce3
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a6d1f5a8
...
...
@@ -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
app/MetaGer.php
View file @
a6d1f5a8
...
...
@@ -87,27 +87,25 @@ class MetaGer
}
switch
(
$this
->
out
)
{
case
'
html
'
:
return
view
(
'metager3'
)
case
'
results
'
:
return
view
(
'metager3
results
'
)
->
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
;
}
...
...
resources/views/layouts/resultPage.blade.php
View file @
a6d1f5a8
...
...
@@ -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>
...
...
resources/views/metager3.blade.php
View file @
a6d1f5a8
...
...
@@ -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
resources/views/metager3results.blade.php
0 → 100644
View file @
a6d1f5a8
<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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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