[pmwiki-devel] zap rewrite progress...
The Editor
editor at fast.st
Wed Dec 13 13:17:59 CST 2006
On 12/13/06, The Editor <editor at fast.st> wrote:
> On 12/13/06, Ben Stallings <ben at interdependentweb.com> wrote:
> 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...
>
snip
>
> 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.
Well, I SEEM to have the session variables deleting properly. I ended
up having to put them in a foreach loop and unset them one at a time.
Is that the way this is normally done?
Now I have another really perplexing problem and I should be back in
debug mode. Probably something simple... Here's what I have:
When someone submits a form these lines are called in the zap engine.
Notice ZAParray is global and ZAPsecure( ) is called...
function ZAPengine($ZAPflag = 0) {
//ZAP INITIALIZATION
if (! ZAPsecure()) ZAPwarning("You are not authorized to submit
this form. ");
global $WorkDir, various values, $ZAParray, $ZAPprofiles, $ZAPmodule;
$m = "Form submitted. ";
if (!isset($ZAParray['nextpage'])) $ZAParray['nextpage'] = $pagename;
if (!isset($ZAParray['datapage'])) $ZAParray['datapage'] = $pagename;
print_r($ZAParray);
die();
... code continues
Now here are some of the lines from ZAPsecure( ). Again you will
notice ZAParray is global.
function ZAPsecure() {
global $pagename, $_POST, $ZAParray;
if(!CondAuth($pagename, "forms")) return "false";
... more code
// print_r($ZAParray);
// die();
return true;
}
The strange thing is, when I uncomment the lines in ZAPsecure the
ZAParray variable is exactly what it is supposed to be. But when I
print them out in the main engine, the values are not transferred
over, and all I get is datapage and nextpage. Can anyone spot my
glitch or tell what the problem is. Got to be something little but
I'm about at wit's end!
Cheers,
Dan
More information about the pmwiki-devel
mailing list