[pmwiki-users] [PATCH] Issue with pmwiki and PHP virtual() function (SSI)

Patrick R. Michaud pmichaud at pobox.com
Thu Nov 10 07:43:21 CST 2005

On Thu, Nov 10, 2005 at 11:45:19AM +0100, Mikael Nilsson wrote:
> >    function includemeta($x) {
> >      $cwd = getcwd();                   # get current working dir
> >      virtual("/kmr/meta.html");
> >      chdir($cwd);                       # change back
> >    }
> >
> Ok, this works fine. I agree it's much cleaner than my tries.
> I still wonder if it would be better if pmwiki.php stored cwd at the top 
> of the file and then used the stored value later, but that's your choice...

That's a good idea, but unfortunately one cannot reliably use
getcwd() in every PHP environment.  Sometimes the file permissions
on the server prevent getcwd() from returning the current directory,
and on some environments it just doesn't work.

However, PmWiki already has the $FarmD variable, which is set to
the value of the installation directory of the pmwiki.php script.

> The one remaining thing I had to do was to was to remove the 
> "clear:both" CSS directive in pagerev.php. Otherwise the changes would 
> not show until under my left sidebar (my site is CSS-based, so my 
> sidebar uses margins and floats). Is that directive really needed for 
> anything? To me it looks ok without...

Without it there can be problems with displaying
floating images in the page history -- see
http://www.pmwiki.org/wiki/Test/FloatDiff for an example.

The real solution may be for PmWiki to go back to using
tables for the page history.  OTOH, we may just re-do the
entire page history format.  :-)


More information about the pmwiki-users mailing list