diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 27 |
1 files changed, 4 insertions, 23 deletions
@@ -74,6 +74,7 @@ require_once 'application/Cache.php'; | |||
74 | require_once 'application/CachedPage.php'; | 74 | require_once 'application/CachedPage.php'; |
75 | require_once 'application/LinkDB.php'; | 75 | require_once 'application/LinkDB.php'; |
76 | require_once 'application/TimeZone.php'; | 76 | require_once 'application/TimeZone.php'; |
77 | require_once 'application/Url.php'; | ||
77 | require_once 'application/Utils.php'; | 78 | require_once 'application/Utils.php'; |
78 | require_once 'application/Config.php'; | 79 | require_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) |