OSDN Git Service

BugTrack2/68; Added option $attach_link to avoid bottle-neck effect about
authorhenoheno <henoheno>
Mon, 16 May 2005 13:25:43 +0000 (22:25 +0900)
committerhenoheno <henoheno>
Mon, 16 May 2005 13:25:43 +0000 (22:25 +0900)
creating attach-file list, or to simply suppress attach-list for your design purpose.
NOTE: Too dangerous to remove ALL of access path to 'attach' plugin
for malicious users

default.ini.php
keitai.ini.php
lib/html.php

index a9698a3..c5c1ec9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: default.ini.php,v 1.22 2005/05/16 12:49:00 henoheno Exp $
+// $Id: default.ini.php,v 1.23 2005/05/16 13:25:43 henoheno Exp $
 // Copyright (C)
 //   2003-2005 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -52,6 +52,10 @@ $rows = 20;
 $top = $_msg_content_back_to_top;
 
 /////////////////////////////////////////////////
+// ÅºÉÕ¥Õ¥¡¥¤¥ë¤Î°ìÍ÷¤ò¾ï¤Ëɽ¼¨¤¹¤ë (Ééô¤¬¤«¤«¤ê¤Þ¤¹)
+$attach_link = 1;
+
+/////////////////////////////////////////////////
 // ´ØÏ¢¤¹¤ë¥Ú¡¼¥¸¤Î¥ê¥ó¥¯°ìÍ÷¤ò¾ï¤Ëɽ¼¨¤¹¤ë(Ééô¤¬¤«¤«¤ê¤Þ¤¹)
 $related_link = 1;
 
index e89bd52..826362c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: keitai.ini.php,v 1.22 2005/05/16 12:49:00 henoheno Exp $
+// $Id: keitai.ini.php,v 1.23 2005/05/16 13:25:43 henoheno Exp $
 // Copyright (C)
 //   2002-2005 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -44,10 +44,17 @@ $_list_pad_str   = '';
 $top = '';
 
 /////////////////////////////////////////////////
+// ÅºÉÕ¥Õ¥¡¥¤¥ë¤Î°ìÍ÷¤ò¾ï¤Ëɽ¼¨¤¹¤ë (Ééô¤¬¤«¤«¤ê¤Þ¤¹)
+// ¢¨keitai¥¹¥­¥ó¤Ë¤Ï¤³¤Î°ìÍ÷¤òɽ¼¨¤¹¤ëµ¡Ç½¤¬¤¢¤ê¤Þ¤»¤ó
+$attach_link = 0;
+
+/////////////////////////////////////////////////
 // ´ØÏ¢¤¹¤ë¥Ú¡¼¥¸¤Î¥ê¥ó¥¯°ìÍ÷¤ò¾ï¤Ëɽ¼¨¤¹¤ë(Ééô¤¬¤«¤«¤ê¤Þ¤¹)
+// ¢¨keitai¥¹¥­¥ó¤Ë¤Ï¤³¤Î°ìÍ÷¤òɽ¼¨¤¹¤ëµ¡Ç½¤¬¤¢¤ê¤Þ¤»¤ó
 $related_link = 0;
 
 // ¥ê¥ó¥¯°ìÍ÷¤Î¶èÀÚ¤êʸ»ú
+// ¢¨¾åƱ
 $related_str = "\n ";
 
 // (#related¥×¥é¥°¥¤¥ó¤¬É½¼¨¤¹¤ë) ¥ê¥ó¥¯°ìÍ÷¤Î¶èÀÚ¤êʸ»ú
index 4dad592..35f8bb1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: html.php,v 1.35 2005/05/06 12:35:21 henoheno Exp $
+// $Id: html.php,v 1.36 2005/05/16 13:25:43 henoheno Exp $
 // Copyright (C)
 //   2002-2005 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -12,8 +12,8 @@
 function catbody($title, $page, $body)
 {
        global $script, $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr;
-       global $related_link, $cantedit, $function_freeze, $search_word_color, $_msg_word;
-       global $foot_explain, $note_hr, $head_tags;
+       global $attach_link, $related_link, $cantedit, $function_freeze;
+       global $search_word_color, $_msg_word, $foot_explain, $note_hr, $head_tags;
        global $trackback, $trackback_javascript, $referer, $javascript;
        global $_LANG, $_LINK, $_IMAGE;
 
@@ -96,11 +96,12 @@ function catbody($title, $page, $body)
        $lastmodified = $is_read ?  get_date('D, d M Y H:i:s T', get_filetime($_page)) .
                ' ' . get_pg_passage($_page, FALSE) : '';
 
-       // List of related pages
-       $related = ($is_read && $related_link) ? make_related($_page) : '';
+       // List of attached files to the page
+       $attaches = ($attach_link && $is_read && exist_plugin_action('attach')) ?
+               attach_filelist() : '';
 
-       // List of attached files of the page
-       $attaches = ($is_read && exist_plugin_action('attach')) ? attach_filelist() : '';
+       // List of related pages
+       $related  = ($related_link && $is_read) ? make_related($_page) : '';
 
        // List of footnotes
        ksort($foot_explain, SORT_NUMERIC);