[pmwiki-users] How do I get $EditRedirectFmt also return Page Text Variables?

Dave smartucus86 at yahoo.com
Mon Apr 18 12:31:59 CDT 2011


I inserted the session_id line as the second in my PHP config and still get identical results.
 
When Markup calls the function and the function modifies a variable of global scope what would cause the variable to revert to its unmodifed setting?

From: Peter Bowers <pbowers at pobox.com>
To: Dave <smartucus86 at yahoo.com>
Sent: Sunday, April 17, 2011 12:30 AM
Subject: Re: [pmwiki-users] How do I get $EditRedirectFmt also return Page Text Variables?

On Sun, Apr 17, 2011 at 2:04 AM, Dave <smartucus86 at yahoo.com> wrote:
>      echo "1-".$_SESSION['foo']."<br>";          //output = "1-" - expected
> output BEFORE EDIT>SAVE
>
>      function CSName ($val) {
>       $_SESSION['foo'] = $val;
>       echo "2-".$_SESSION['foo']."<br>";         //output = "2-RMS"
> - expected output
>      }
>      echo "3-".$_SESSION['foo']."<br>";
>      #echo " #B-".$CompSName;                     //output = "3-" - expected

Try inserting this line early on in your config.php:

        if(!session_id()) session_start();

I don't remember the exact rationale, but sometimes that's needed -
pmwiki does it later in the process, if I remember correctly, so maybe
you don't have access to your session yet in your config.php...

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20110418/394d39ab/attachment.html>


More information about the pmwiki-users mailing list