[Slashdotjp-dev 773] [286] added flag to switch RSS traking query string

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2007年 12月 17日 (月) 12:51:55 JST


Revision: 286
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=286
Author:   sugi
Date:     2007-12-17 12:51:55 +0900 (Mon, 17 Dec 2007)

Log Message:
-----------
added flag to switch RSS traking query string

Modified Paths:
--------------
    slashjp/trunk/Slash/XML/RSS/RSS.pm


-------------- next part --------------
Modified: slashjp/trunk/Slash/XML/RSS/RSS.pm
===================================================================
--- slashjp/trunk/Slash/XML/RSS/RSS.pm	2007-12-14 06:57:43 UTC (rev 285)
+++ slashjp/trunk/Slash/XML/RSS/RSS.pm	2007-12-17 03:51:55 UTC (rev 286)
@@ -416,7 +416,10 @@
 		if $story->{title};
 	if ($story->{sid}) {
 		my $edit = "admin.pl?op=edit&sid=$story->{sid}";
-		$action = "article.pl?sid=$story->{sid}&from=rss";
+		$action = "article.pl?sid=$story->{sid}";
+		if (!$constants->{rss_no_tracking_query}) {
+			$action .= "&from=rss";
+		}
 		if ($story->{primaryskid}) {
 			my $dir = url2abs(
 				$reader->getSkin($story->{primaryskid})->{rootdir},
@@ -573,10 +576,13 @@
 sub _tag_link {
 	my($link) = @_;
 	my $uri = URI->new($link);
-	if (my $orig_query = $uri->query) {
-		$uri->query("$orig_query&from=rss");
-	} else {
-		$uri->query("from=rss");
+	my $constants = getCurrentStatic();
+	if (!$constants->{rss_no_tracking_query}) {
+		if (my $orig_query = $uri->query) {
+			$uri->query("$orig_query&from=rss");
+		} else {
+			$uri->query("from=rss");
+		}
 	}
 	return $uri->as_string;
 }


Slashdotjp-dev メーリングリストの案内
Back to archive index