PDA

View Full Version : [Fixed] v2.3.0 - Guests who visit search.php?action=getnew are NOT redirected



Paul
Wed 4th Jun '03, 4:48pm
Hi,

I can't spot offhand the fix for this, so I'm posting this here without knowing too much about it. Ordinarily I try to come up with a workaround, but at the moment, I'm pressed for time. I'll try and follow up on this.

Essentially, when a guest (userid=0) visits search.php?action=getnew, vbulletin, by design, should redirect that user to search.php?action=getdaily. Instead, the system attempts to run the getnew code. The checks seem right in the code, but I didn't dig too deeply. NOTE: You have to clear your cookies before trying this. If it comes up with a value for lastvisit, it will work as intended.

I tested this on a number of 2.x forums out there on the web and all produced the same result. It is clearly the developers' intention, however, to redirect to getdaily.

Ideas? Can anyone else confirm this?

Best wishes,
Paul

Steve Machol
Wed 4th Jun '03, 4:52pm
Moved to Bugs for a Dev to look at.

Paul
Wed 4th Jun '03, 5:48pm
I did some further poking.

This occurs because guests are given a "lastvisit" value of $ourtimenow if this is the first time they're visiting.

I'd love to hear suggestions on how this could be fixed yet retain the ability for guests to see new posts since their last visit.

Scott MacVicar
Sun 8th Jun '03, 7:28pm
ok i've checked this over now, and I don't think this is actually a bug.

When a user logs out his lastvisit cookie is set to the current time and the lastactivity cookie updates on each page view.
When they go to the search getnew it uses the value from when they last logged out.

It looks like the plan was to redirect the user if the cookie lastvisit was empty, i've added another check to make sure that the lastvisit is not equal to the $ourtimenow.

Thats about all that can be done regarding this.