So the elegant solution would be just: $page = ReadPage($pagename); if ($page['passwdedit']) Markup(...); Actually, the first thing I did today before bothering you, was to print_r a ReadPage result, but since there was probably no password set, it gave no hint of a passwdedit entry. Remains the question about documentation... Frank Hans wrote: Thursday, October 1, 2009, 9:58:55 PM, DaveG wrote:$page = RetrieveAuthPage($pagename, 'read', true); if (!$page) echo "?cannot read $pagename"; if ($page['passwdedit']) { DEFINE MARKUP } else { BLANK OUT THE MARKUP }instead of$page = RetrieveAuthPage($pagename, 'read', true); in this case you could simply use $page = ReadPage($pagename); since you just want to check for the presence of a password. ~Hans -- _______________________________________________________________________ Dr. Frank F. Schweickert AMSTEL Institute, Faculty of Science, University of Amsterdam Science Park 904, Amsterdam, Room C2-1.22 Postal address: Postbus 94224, 1090 GE Amsterdam Phone: +31 20 525-8475 (secr. -5886) http://www.science.uva.nl/amstel http://www.natsim.net |
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel