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
2f21f7bf
Commit
2f21f7bf
authored
Oct 04, 2017
by
Karl Hasselbring
Browse files
Merge branch 'development' into 593-hinweis-zum-ausklappen-der-quicktip-details
parents
dd9ef1f8
455e54b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
2f21f7bf
...
...
@@ -237,9 +237,6 @@ class MetaGer
#Adgoal Implementation
$this
->
results
=
$this
->
parseAdgoal
(
$this
->
results
);
#Amazon Affiliate (MetaGers tag ist: metager04-21)
$this
->
results
=
$this
->
parseAmazon
(
$this
->
results
);
$counter
=
0
;
$firstRank
=
0
;
...
...
@@ -438,34 +435,6 @@ class MetaGer
return
$results
;
}
public
function
parseAmazon
(
$results
)
{
$amazonTag
=
"metager04-21"
;
foreach
(
$results
as
$result
)
{
$link
=
$result
->
anzeigeLink
;
if
(
strpos
(
$link
,
"http"
)
!==
0
)
{
$link
=
"http://"
.
$link
;
}
$info
=
parse_url
(
$link
);
if
(
isset
(
$info
[
"host"
])){
$host
=
$info
[
'host'
];
$newurl
=
$link
;
if
(
strpos
(
$host
,
"amazon"
)
!==
FALSE
){
# This is Probably an Amazon Link. We'll add our tag as get parameter
if
(
isset
(
$info
[
"query"
])){
$newurl
.
=
"&tag=metager04-21"
;
}
else
{
$newurl
.
=
"?tag=metager04-21"
;
}
$result
->
link
=
$newurl
;
$result
->
partnershop
=
true
;
}
}
}
return
$results
;
}
public
function
authorize
(
$key
)
{
...
...
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