[pmwiki-devel] zap rewrite progress...

The Editor editor at fast.st
Wed Dec 13 10:06:11 CST 2006

On 12/13/06, Ben Stallings <ben at interdependentweb.com> wrote:

> Just a thought... are you remembering to unset the session variables
> after they're used?  Otherwise they will persist for the duration of the
> session and could affect the processing of other ZAP forms on other
> pages in unintended ways.  You probably thought of that already, but I
> thought I'd check.

Yes, I noticed that happened in the old ZAP and unset them properly (I
think), but I'm having major problems in this exact area right at the
moment.  In the old system, I just set one session variable for the
entire lock pattern and then parsed it after it was retrieved. With
multiple zap forms on a page I'd have:

$_SESSION[ZAPlock]["$pagename-random#1"] = "lock pattern1"
$_SESSION[ZAPlock]["$pagename-random#2"] = "lock pattern2"
$_SESSION[ZAPlock]["$pagename-random#3"] = "lock pattern3"

I'd just unset $_SESSION[ZAPlock] and it worked great.

The problem I having now is I'm doing it as a multi-dimensional array
and I can't seem to unset the session variables.  So for multiple
forms I have:

$_SESSION[ZAP][PagenameFormname1][random#1] = set
$_SESSION[ZAP][PagenameFormname1][field1] = value
$_SESSION[ZAP][PagenameFormname1][field2] = value
$_SESSION[ZAP][PagenameFormname2][random#2] = set
$_SESSION[ZAP][PagenameFormname2][field1] = value
$_SESSION[ZAP][PagenameFormname2][field2] = value

I was hoping to just be able to unset $_SESSION[ZAP] and delete
everything after I extract what I need, but I'm having a devil of a
time.  Is there any reason any of you can think of why


is being ignored?  It's driving me nuts, and holding up the whole shebang.


More information about the pmwiki-devel mailing list