--- Sivakatirswami <[EMAIL PROTECTED]> wrote: > Martin Fick wrote: > > > Yes, but you can always just make a patch file, > > hopefully it will continue to apply cleanly. > > how do you make a "patch file" (I'm PHP ignorant) > that would insert a single line > > $qf .= $qf ? "&":"?" . "PreviousPage=$pagename"; > > in that exact location? :
A patch is actually not PHP specific, but rather a general unix mechanim that uses the diff and patch commands. Typically you would take the original file and diff it to the modified one (perhaps with the -c context option) and save the output creating a patch file. This diff (patch file) can then be appliead to a future version of the original file using the path command. If not too many things have changed between the versions it will be able to locate where that "one line" should be inserted and insert it for you. > > config.php to access the GET variable, something > > like this: > > > > $FmtPV['$PreviousPage'] = > '$_GET["PreviousPage"]'; > > hmmm. I have no problem installing the complete > recipe, > but, for clarity's sake: are you saying that > '$_GET["PreviousPage"]' > is available to the PMwiki as a global environment > variable > even without httpVariables.php loaded? i.e. what do > you > mean by "don't... install the completeHttpVariables > recipe?" PHP puts all GET variables (variable appended to URLs) inside the $_GET array. The $FmtPV['$PreviousPage'] assignment is a PmWiki mechanism to make it available as a page variable. The HttpVariables recipe makes ALL GET (and POST and COOKIES and SESSION) variables available as special pagevariables using a slightly different markup. Either option (manual pagevarible definition or HttpVariables recipe) will get you what you want. > > See the section on custom pagevariables here: > > http://www.pmwiki.org/wiki/PmWiki/PageVariables > > If you do this, it will be accessed without the > "?": {$PreviousPage} > > I looked thru those doc pages before, and I think > it's clear but saw no mention of access to Apache > http environment variables -- which I understand > to be the array below that I get from a revolution > echo globals cgi. which are normally accessible to > any cgi language and I'm assuming PHP as well. > "HTTP_REFERRER" is not on this list but would be in > other contexts In PHP these are $_SERVER[] I think. Hope this clears things up a bit, -Martin ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
