From 39ad14b24fe6b79bd11b5306c459cc63065481e7 Mon Sep 17 00:00:00 2001
From: Dominik Pfennig <dominik@suma-ev.de>
Date: Thu, 28 Sep 2017 09:44:46 +0200
Subject: [PATCH] Amazon entfernt

---
 app/MetaGer.php | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/app/MetaGer.php b/app/MetaGer.php
index 0eb5ef9d8..664cf6b77 100644
--- a/app/MetaGer.php
+++ b/app/MetaGer.php
@@ -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)
     {
-- 
GitLab