Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19171/lib/plugin
Modified Files:
Transclude.php
Log Message:
Expand possible interwiki link for Transclude src
Index: Transclude.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/Transclude.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -2 -b -p -d -r1.9 -r1.10
--- Transclude.php 14 Jun 2004 11:31:39 -0000 1.9
+++ Transclude.php 12 Oct 2006 18:45:40 -0000 1.10
@@ -2,5 +2,5 @@
rcs_id('$Id$');
/**
- Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam
+ Copyright 1999,2000,2001,2002,2006 $ThePhpWikiProgrammingTeam
This file is part of PhpWiki.
@@ -76,4 +76,14 @@ extends WikiPlugin
return $this->error(fmt("%s parameter missing", "'src'"));
}
+ // Expand possible interwiki link for src
+ if (strstr($src,':')
+ and (!strstr($src,'://'))
+ and ($intermap = getInterwikiMap())
+ and preg_match("/^" . $intermap->getRegexp() . ":/", $src))
+ {
+ $link = $intermap->link($src);
+ $src = $link->getAttr('href');
+ }
+
// FIXME: Better recursion detection.
// FIXME: Currently this doesnt work at all.
@@ -81,5 +91,4 @@ extends WikiPlugin
return $this->error(fmt("recursive inclusion of url %s", $src));
}
-
if (! IsSafeURL($src)) {
return $this->error(_("Bad url in src: remove all of <, >, \""));
@@ -150,4 +159,7 @@ extends WikiPlugin
// $Log$
+// Revision 1.10 2006/10/12 18:45:40 rurban
+// Expand possible interwiki link for Transclude src
+//
// Revision 1.9 2004/06/14 11:31:39 rurban
// renamed global $Theme to $WikiTheme (gforge nameclash)
|