myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [1894] trunk/app/controllers/application.rb: Impr


From: noreply
Subject: [myexperiment-hackers] [1894] trunk/app/controllers/application.rb: Improvement over the last commit: now referer is compared against BASE_URI (meaning that "site usage" will correctly determined for any environment, not just the live site).
Date: Tue, 28 Oct 2008 13:41:42 -0400 (EDT)

Revision
1894
Author
alekses6
Date
2008-10-28 13:41:42 -0400 (Tue, 28 Oct 2008)

Log Message

Improvement over the last commit: now referer is compared against BASE_URI (meaning that "site usage" will correctly determined for any environment, not just the live site).

Modified Paths

Diff

Modified: trunk/app/controllers/application.rb (1893 => 1894)


--- trunk/app/controllers/application.rb	2008-10-28 16:35:07 UTC (rev 1893)
+++ trunk/app/controllers/application.rb	2008-10-28 17:41:42 UTC (rev 1894)
@@ -31,8 +31,8 @@
     res = false
     
     referer = request.env['HTTP_REFERER']
-    unless referer.nil?
-      res = referer.include?("myexperiment")
+    unless referer.nil? || referer.match("^#{BASE_URI}").nil?
+      res = true
     end
     
     return res

reply via email to

[Prev in Thread] Current Thread [Next in Thread]