aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/index.php b/index.php
index d7140409..cc3d7360 100644
--- a/index.php
+++ b/index.php
@@ -1642,15 +1642,12 @@ function renderPage()
1642 { 1642 {
1643 $url=$_GET['post']; 1643 $url=$_GET['post'];
1644 1644
1645 // We remove the annoying parameters added by FeedBurner and GoogleFeedProxy (?utm_source=...) 1645 // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook...
1646 $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i); 1646 $annoyingpatterns = array('&utm_source=', '?utm_source=', '#xtor=RSS-', '?fb_', '?__scoop', '#tk.rss_all?', '?utm_campaign=', '?utm_medium=');
1647 $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i); 1647 foreach($annoyingpatterns as $pattern)
1648 $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i); 1648 {
1649 $i=strpos($url,'?fb_'); if ($i!==false) $url=substr($url,0,$i); 1649 $i=strpos($url,$pattern); if ($i!==false) $url=substr($url,0,$i);
1650 $i=strpos($url,'?__scoop'); if ($i!==false) $url=substr($url,0,$i); 1650 }
1651 $i=strpos($url,'#tk.rss_all?'); if ($i!==false) $url=substr($url,0,$i);
1652 $i=strpos($url,'?utm_campaign='); if ($i!==false) $url=substr($url,0,$i);
1653 $i=strpos($url,'?utm_medium='); if ($i!==false) $url=substr($url,0,$i);
1654 1651
1655 $link_is_new = false; 1652 $link_is_new = false;
1656 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link) 1653 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link)