<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This is what I get when using UpdatePage:
<a class="moz-txt-link-freetext" href="http://www.natsim.net/ejswiki/Test/Page1">http://www.natsim.net/ejswiki/Test/Page1</a><br>
The new text gets where it should but the whole markup process is
broken halfway!<br>
<br>
What's wrong with:<br>
<br>
$old = RetrieveAuthPage('Test.Page1', 'read');<br>
if ($old) {<br>
$new = $old;<br>
$new['text'] = "x".$old['text'];<br>
$pn='Test.Page1';<br>
UpdatePage($pn,$old,$new);<br>
}<br>
<br>
<br>
Frank<br>
<br>
<br>
<br>
<br>
<br>
<br>
Frank Schweickert wrote:
<blockquote cite="mid:49CF8EBD.1060707@uva.nl" type="cite">
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
I hope I did a good deed by adding
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.pmwiki.org/wiki/PmWiki/Functions#RetrieveAuthPage">http://www.pmwiki.org/wiki/PmWiki/Functions#RetrieveAuthPage</a><br>
---<br>
<br>
But I still don't get it:<br>
Using UpdatePage, pmwiki.php now complains in line 1650: $keys =
array_keys($new);<br>
that $new should be an array. I did<br>
<br>
$old = RetrieveAuthPage('Test.Page1', 'read');<br>
if ($old) {<br>
$new = $old;<br>
$new[text] = "x".$old[text];<br>
$pn=('Test.Page1');<br>
UpdatePage($pn,$old,$new);<br>
}<br>
<br>
And do we need to call the first argument $pagename in UpdatePage by
reference anyway?<br>
Frank<br>
<br>
<br>
<br>
Hans wrote:
<blockquote cite="mid:339662448.20090329150100@softflow.co.uk"
type="cite">
<pre wrap="">Sunday, March 29, 2009, 12:33:17 PM, Frank wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.pmwiki.org/wiki/PmWiki/Functions">http://www.pmwiki.org/wiki/PmWiki/Functions</a> is a good start, but
somehow I found it hard to find, because I was looking for more
prominent a function reference of PMwiki. And it is not complete for
it doesn't tell us how to fetch a page like via RetrieveAuthPage (or
ReadPage?) in the first place. So I started relying on Google more than on pmwiki.org.
</pre>
</blockquote>
<pre wrap=""><!---->
Re: RetrieveAuthPage()
use that generally in preference to ReadPage since it respects the
authorisation of the user, i.e. it checks the authorisation level
before loading the page, or it can be set to do so.
ReadPage() reads a page regardless of permission.
Hans
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
_______________________________________________________________________
Dr. Frank F. Schweickert
AMSTEL Institute, Faculty of Science, University of Amsterdam
Kruislaan 404, Amsterdam, 1098 SM, Netherlands
Room 1.09
Phone: +31 20 525-5969, Fax: +31 20 525-5866
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.science.uva.nl/amstel">http://www.science.uva.nl/amstel</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.natsim.net">http://www.natsim.net</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
_______________________________________________________________________
Dr. Frank F. Schweickert
AMSTEL Institute, Faculty of Science, University of Amsterdam
Kruislaan 404, Amsterdam, 1098 SM, Netherlands
Room 1.09
Phone: +31 20 525-5969, Fax: +31 20 525-5866
<a class="moz-txt-link-freetext" href="http://www.science.uva.nl/amstel">http://www.science.uva.nl/amstel</a>
<a class="moz-txt-link-freetext" href="http://www.natsim.net">http://www.natsim.net</a></pre>
</body>
</html>