SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Reini U. <ru...@us...> - 2006年10月12日 18:45:42
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)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /