OSDN Git Service

Try new method #ref(pagename/filename)
authorhenoheno <henoheno>
Sat, 28 Aug 2004 01:04:33 +0000 (10:04 +0900)
committerhenoheno <henoheno>
Sat, 28 Aug 2004 01:04:33 +0000 (10:04 +0900)
instead of #ref(filename,pagename).

A method of passing a page name through the second
argument, can not pass, that equals to ref's
option name, to avoid trivial troubles about
#ref(filename,right,right) etc.

HACK: This patch also effects #ref(filename,_size)
or someting inner params, started with '_', and
shows you TRUE error with #ref(filename,_error)

plugin/ref.inc.php

index c95f93f..211d8b4 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: ref.inc.php,v 1.34 2004/08/26 15:32:51 henoheno Exp $
+// $Id: ref.inc.php,v 1.35 2004/08/28 01:04:33 henoheno Exp $
 //
 
 // UPLOAD_DIR ¤Î¥Ç¡¼¥¿(²èÁü¥Õ¥¡¥¤¥ë¤Î¤ß)¤ËľÀÜ¥¢¥¯¥»¥¹¤µ¤»¤ë
@@ -177,8 +177,8 @@ function plugin_ref_body($args)
                        $page = get_fullname(strip_bracket($matches[1]), $page); // strip is a compat
                        $is_file = is_file(UPLOAD_DIR . encode($page) . '_' . encode($name));
 
-               // ÂèÆó°ú¿ô°Ê¹ß¤¬Â¸ºß¤¹¤ë¤«
-               } else if (isset($args[0])) {
+               // ÂèÆó°ú¿ô°Ê¹ß¤¬Â¸ºß¤·¡¢¤½¤ì¤Ïref¤Î¥ª¥×¥·¥ç¥ó̾¾Î¤Ê¤É¤È°ìÃפ·¤Ê¤¤
+               } else if (isset($args[0]) &&  ! isset($params[$args[0]])) {
                        $e_name = encode($name);
 
                        // Try the second argument, as a page-name or a path-name