aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php27
1 files changed, 4 insertions, 23 deletions
diff --git a/index.php b/index.php
index 84b8f015..74f95497 100755
--- a/index.php
+++ b/index.php
@@ -74,6 +74,7 @@ require_once 'application/Cache.php';
74require_once 'application/CachedPage.php'; 74require_once 'application/CachedPage.php';
75require_once 'application/LinkDB.php'; 75require_once 'application/LinkDB.php';
76require_once 'application/TimeZone.php'; 76require_once 'application/TimeZone.php';
77require_once 'application/Url.php';
77require_once 'application/Utils.php'; 78require_once 'application/Utils.php';
78require_once 'application/Config.php'; 79require_once 'application/Config.php';
79 80
@@ -1479,29 +1480,9 @@ function renderPage()
1479 } 1480 }
1480 1481
1481 // -------- User want to post a new link: Display link edit form. 1482 // -------- User want to post a new link: Display link edit form.
1482 if (isset($_GET['post'])) 1483 if (isset($_GET['post'])) {
1483 { 1484 $url = new Url($_GET['post']);
1484 $url=$_GET['post']; 1485 $url->cleanup();
1485
1486 // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook...
1487 $annoyingpatterns = array('/[\?&]utm_source=[^&]*/',
1488 '/[\?&]utm_campaign=[^&]*/',
1489 '/[\?&]utm_medium=[^&]*/',
1490 '/#xtor=RSS-[^&]*/',
1491 '/[\?&]fb_[^&]*/',
1492 '/[\?&]__scoop[^&]*/',
1493 '/#tk\.rss_all\?/',
1494 '/[\?&]action_ref_map=[^&]*/',
1495 '/[\?&]action_type_map=[^&]*/',
1496 '/[\?&]action_object_map=[^&]*/',
1497 '/[\?&]utm_content=[^&]*/',
1498 '/[\?&]fb=[^&]*/',
1499 '/[\?&]xtor=[^&]*/'
1500 );
1501 foreach($annoyingpatterns as $pattern)
1502 {
1503 $url = preg_replace($pattern, "", $url);
1504 }
1505 1486
1506 $link_is_new = false; 1487 $link_is_new = false;
1507 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link) 1488 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link)