OSDN Git Service

Cleanup before correction. Japanese => English.
authorhenoheno <henoheno>
Sat, 29 Jan 2005 14:08:46 +0000 (23:08 +0900)
committerhenoheno <henoheno>
Sat, 29 Jan 2005 14:08:46 +0000 (23:08 +0900)
Shrink. Shrink quotation.

plugin/topicpath.inc.php

index 3c77044..5449a76 100644 (file)
@@ -1,23 +1,22 @@
 <?php
-/////////////////////////////////////////////////
-// PukiWiki - Yet another WikiWikiWeb clone.
+// PukiWiki - Yet another WikiWikiWeb clone
+// $Id: topicpath.inc.php,v 1.5 2005/01/29 14:08:46 henoheno Exp $
 //
-// $Id: topicpath.inc.php,v 1.4 2004/08/12 13:02:26 henoheno Exp $
-// topicpath plugin for PukiWiki
-//   available under the GPL
+// 'topicpath' plugin for PukiWiki, available under GPL
 
-// $defaultpage¤Ø¤Î¥ê¥ó¥¯¤âɽ¼¨¤¹¤ë¤«¤É¤¦¤«
-// TRUE:ɽ¼¨¤¹¤ë FALSE:ɽ¼¨¤·¤Ê¤¤.
+// Show a link to $defaultpage or not
 define('PLUGIN_TOPICPATH_TOP_DISPLAY', TRUE);
-// $defaultpage¤ËÂФ¹¤ë¥é¥Ù¥ë
+
+// Label for $defaultpage
 define('PLUGIN_TOPICPATH_TOP_LABEL', 'Top');
 
-// ³¬Áؤò¶èÀڤ륻¥Ñ¥ì¡¼¥¿
+// Separetor / of / topic / path
 define('PLUGIN_TOPICPATH_TOP_SEPARATOR', ' / ');
 
-// ¤½¤Î¥Ú¡¼¥¸¼«¿È¤òɽ¼¨¤¹¤ë¤«
+// Show the page itself or not
 define('PLUGIN_TOPICPATH_THIS_PAGE_DISPLAY', TRUE);
-// É½¼¨¤¹¤ë¾ì¹ç¡¢¼«Ê¬¼«¿È¤ò»Ø¤¹¥ê¥ó¥¯¤òɽ¼¨¤¹¤ë¤«
+
+// If PLUGIN_TOPICPATH_THIS_PAGE_DISPLAY, add a link to itself
 define('PLUGIN_TOPICPATH_THIS_PAGE_LINK', FALSE);
 
 function plugin_topicpath_convert()
@@ -29,8 +28,6 @@ function plugin_topicpath_inline()
 {
        global $script, $vars, $defaultpage;
 
-       // $args = func_get_args();
-
        $page = isset($vars['page']) ? $vars['page'] : '';
        if ($page == '' || $page == $defaultpage) return '';
 
@@ -48,16 +45,16 @@ function plugin_topicpath_inline()
                $landing = rawurlencode(join('/', $parts));
                $element = htmlspecialchars(array_pop($parts));
                if ($b_link)  {
-                       $topic_path[] = "<a href=\"$script?$landing\">$element</a>";
+                       $topic_path[] = '<a href="' . $script . '?' . $landing . '">' .
+                               $element . '</a>';
                } else {
-                       $topic_path[] = $element;
                        $b_link = TRUE; // Maybe reacheable once at a time
+                       $topic_path[] = $element;
                }
        }
 
-       if (PLUGIN_TOPICPATH_TOP_DISPLAY) {
+       if (PLUGIN_TOPICPATH_TOP_DISPLAY)
                $topic_path[] = make_pagelink($defaultpage, PLUGIN_TOPICPATH_TOP_LABEL);
-       }
 
        return join(PLUGIN_TOPICPATH_TOP_SEPARATOR, array_reverse($topic_path));
 }