Author |
Topic  |
|
bjlt
Senior Member
   
1144 Posts |
Posted - 12 October 2002 : 21:14:55
|
(redundant code 3.4.03) if strSetCookieToForum = "1" then...strCookieURL
There are several places where you can find code like this:
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "NumDays").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "NumDays") = Request.Form("days")
if you use strCookieURL then there's no need to check for strSetCookieToForum, either it's redundant or it should be Response.Cookies(strUniqueID ...
search for strSetCookieToForum and see if the following code is strCookieURL
Moved from DEV Bug Reports by Davio |
Edited by - Davio on 13 February 2003 11:14:55 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 12 October 2002 : 23:31:54
|
I think you have misunderstood, it is checking to see if you are using forum based cookies, and if you are it sets the ath value for the cookie, and if you are not, it does not set a path attribute for the cookie, so no it is not redundant. |
 |
|
bjlt
Senior Member
   
1144 Posts |
Posted - 12 October 2002 : 23:37:22
|
but strCookieURL is already the path of the forum, if you have two forums in two folders, you'll have different coockies already. There's no need for a path.
e.g. /forum1 cookie: forum1NumDays.path = forum1 /forum2 cookie: forum2NumDays.path = forum2
but they are two different cookies already, am I right here?
It's needed for strUniqueID though. |
Edited by - bjlt on 13 October 2002 15:37:53 |
 |
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 13 October 2002 : 09:01:09
|
strCookieURL is NOT the path for the forum if you are using the website based cookie. Then it uses the path to the website instead of the path to the forum.... |
Dave Maxwell Barbershop Harmony Freak |
 |
|
bjlt
Senior Member
   
1144 Posts |
Posted - 13 October 2002 : 09:36:45
|
quote:
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "NumDays").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "NumDays") = Request.Form("days")
Aren't code like this checking if the coockie is set to FORUM?
and
strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
are actually always the current path? |
Edited by - bjlt on 13 October 2002 15:38:00 |
 |
|
bjlt
Senior Member
   
1144 Posts |
Posted - 13 October 2002 : 09:44:42
|
Three instances are found in v3.4.03 active.asp 2 forum.asp 1
Find if strSetCookieToForum = "1" then and see if it's followed by Response.Cookies(strCookieURL , if so you can removed the if then end if block for it.
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "...").Path = strCookieURL
end if
Please note that I'm NOT talking code like this
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "...").Path = strCookieURL
end if
|
Edited by - bjlt on 13 October 2002 15:38:07 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 13 October 2002 : 11:51:49
|
it is to do with the way cookies are related to the website, just because strCookieURL is different, does not mean anything, since they are YOUR variables, and still relate to your websites root, setting the Path property however, relates the cookies to the forums subdirectory and not your websites root. |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 13 February 2003 : 11:13:26
|
The code will be left in the base code since it is not causing any errors or bugs. |
Support Snitz Forums
|
Edited by - Davio on 13 February 2003 11:14:04 |
 |
|
|
Topic  |
|