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
0d3e6cb9
Commit
0d3e6cb9
authored
Oct 29, 2020
by
Davide Aprea
Browse files
added javascript awareness
parent
b9850bfe
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/MetaGerSearch.php
View file @
0d3e6cb9
...
...
@@ -245,11 +245,11 @@ class MetaGerSearch extends Controller
$newResults
=
0
;
foreach
(
$metager
->
getResults
()
as
$index
=>
$resultTmp
)
{
if
(
$resultTmp
->
new
||
$resultTmp
->
adgoalC
hanged
)
{
if
(
$resultTmp
->
new
||
$resultTmp
->
c
hanged
)
{
if
(
$metager
->
getFokus
()
!==
"bilder"
)
{
$view
=
View
::
make
(
'layouts.result'
,
[
'index'
=>
$index
,
'result'
=>
$resultTmp
,
'metager'
=>
$metager
]);
$html
=
$view
->
render
();
if
(
!
$resultTmp
->
new
&&
$resultTmp
->
adgoalC
hanged
)
{
if
(
!
$resultTmp
->
new
&&
$resultTmp
->
c
hanged
)
{
$result
[
'changedResults'
][
$index
]
=
$html
;
}
else
{
$result
[
'newResults'
][
$index
]
=
$html
;
...
...
@@ -258,7 +258,7 @@ class MetaGerSearch extends Controller
}
else
{
$view
=
View
::
make
(
'layouts.image_result'
,
[
'index'
=>
$index
,
'result'
=>
$resultTmp
,
'metager'
=>
$metager
]);
$html
=
$view
->
render
();
if
(
!
$resultTmp
->
new
&&
$resultTmp
->
adgoalC
hanged
)
{
if
(
!
$resultTmp
->
new
&&
$resultTmp
->
c
hanged
)
{
$result
[
'changedResults'
][
$index
]
=
$html
;
}
else
{
$result
[
'newResults'
][
$index
]
=
$html
;
...
...
app/MetaGer.php
View file @
0d3e6cb9
...
...
@@ -431,6 +431,9 @@ class MetaGer
$arr
[
$link
]
->
gefVonLink
[]
=
$this
->
results
[
$i
]
->
gefVonLink
[
0
];
array_splice
(
$this
->
results
,
$i
,
1
);
$i
--
;
if
(
$arr
[
$link
]
->
new
===
true
||
$this
->
results
[
$i
]
->
new
===
true
){
$arr
[
$link
]
->
changed
=
true
;
}
}
else
{
$arr
[
$link
]
=
&
$this
->
results
[
$i
];
}
...
...
@@ -543,7 +546,7 @@ class MetaGer
$newLink
=
"https://api.smartredirect.de/api_v2/ClickGate.php?p="
.
urlencode
(
$publicKey
)
.
"&k="
.
urlencode
(
$gateHash
)
.
"&url="
.
urlencode
(
$targetUrl
)
.
"&q="
.
urlencode
(
$query
);
$result
->
link
=
$newLink
;
$result
->
partnershop
=
true
;
$result
->
adgoalC
hanged
=
true
;
$result
->
c
hanged
=
true
;
}
}
}
...
...
app/Models/Result.php
View file @
0d3e6cb9
...
...
@@ -31,7 +31,7 @@ class Result
public
$strippedLinkAnzeige
;
# Der Link in Form "foo.bar.de/test"
public
$rank
;
# Das Ranking für das Ergebnis
public
$new
=
true
;
public
$
adgoalC
hanged
=
false
;
public
$
c
hanged
=
false
;
# Erstellt ein neues Ergebnis
public
function
__construct
(
$provider
,
$titel
,
$link
,
$anzeigeLink
,
$descr
,
$gefVon
,
$gefVonLink
,
$sourceRank
,
$additionalInformation
=
[])
...
...
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