New since mod. Received error

samlewit

Joined: 2002-10-12
Posts: 37
Posted: Sat, 2002-10-12 17:13

Hi there. I tried installing the "New since" cookie mod, and when I ran the patch line, this is what I got in return:

patch -p1 <newsince.patch
patching file classes/Album.php
patching file session.php
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file session.php.rej
patching file view_album.php

When I looked in "session.php.rej", I got this:
-------------------------
***************
*** 35,40 ****
*/
class GallerySession {}

if (session_id()) {
/*
--- 35,56 ----
*/
class GallerySession {}

+ #setcookie("lastvisit","",time() - 3600);
+ #setcookie("prev_visit","",time() - 3600);
+ #setcookie("PHPSESSID","",time() - 3600);
+
+
+ if ($PHPSESSID == "") {
+ if ($lastvisit) {
+ $previous_visit = $lastvisit;
+ setcookie("lastvisit",time(),time() + 7776000);
+ setcookie("prev_visit",$previous_visit);
+ } else {
+ $firstvisit = time();
+ setcookie("lastvisit",$firstvisit,time() + 7776000);
+ #setcookie("prev_visit",$firstvisit);
+ }
+ }

if (session_id()) {
/*
---------------------

That's it. I know very little about php, so go easy with me if you can help out.

Thanks
Sam