Patch for relative URLs
[email protected] (David Masover) Wed, 20 Jul 2005 17:23:26 -0500
| Newsgroups | perl.kwiki |
|---|---|
| Message-ID | <[email protected]> |
What format do you like your patches in? For now, here's the patch that fixed our mod_proxy issues. By forcing relative URLs, we avoid the whole issue of Kwiki knowing or caring where it's installed to, or what its hostname is, or what its base URL is.
relative.patch
(text/x-patch, 388 B)
diff -Naur Kwiki/Plugin.pm Kwiki-new/Plugin.pm
--- Kwiki/Plugin.pm 2005-07-20 17:08:52.000000000 -0500
+++ Kwiki-new/Plugin.pm 2005-07-20 17:09:09.000000000 -0500
@@ -70,7 +70,7 @@
return $target
if $target =~ /^(https?:|\/)/i or
$target =~ /\?/;
- CGI::url(-full => 1) . '?' . $target;
+ CGI::url(-relative => 1) . '?' . $target;
}
sub new_preference {