[pmwiki-users] Keeping recipes up to date
Patrick R. Michaud
pmichaud at pobox.com
Thu Feb 15 09:31:24 CST 2007
On Thu, Feb 15, 2007 at 03:08:20PM -0000, marc wrote:
> Ah well, another customised recipe for my collection :-| Thank heavens
> for Subversion.
Well, I think we can avoid the need for customized recipes.
I wouldn't see any big problem with rewriting the recipeupdates.php
script (and blocklist.php, and other scripts that want to do url fopens)
to make use of a custom function if present and fallback to
fopen() if not.
For example, in recipeupdates.php, instead of
$fp = fopen($list, 'r');
# ...
we could just as easily do
global $UrlFopen;
SDV($UrlFopen, 'fopen');
$fp = $UrlFopen($list, 'r');
# ...
Then a site could supply a custom setting for $UrlFopen that
does the equivalent of fopen with allow_url_fopen enabled.
Then any sites that have allow_url_fopen disabled can just
include_once('cookbook/urlfopen.php') to load a custom
function for url-based file retrievals.
Pm
More information about the pmwiki-users
mailing list