--- pukiwiki/plugin/attach.inc.php.orig	2004-03-18 19:02:13.000000000 +0900
+++ pukiwiki/plugin/attach.inc.php	2004-09-20 15:07:19.000000000 +0900
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-//  $Id: attach.inc.php,v 1.39 2004/03/18 10:02:13 arino Exp $
+//  $Id: attach.inc.php,v 1.39 2004/09/20 14:02:26 diabah Exp $
 //
 
 /*
@@ -10,6 +10,8 @@
 
  changed by Y.MASUI <masui@hisec.co.jp> http://masui.net/pukiwiki/
  modified by PANDA <panda@arino.jp> http://home.arino.jp/
+ modified by ARAI
+ modified by DIABAH <diabah@muc.biglobe.ne.jp> http://cubic9.com/
 */
 
 // max file size for upload on PHP(PHP default 2MB)
@@ -33,6 +35,15 @@
 define('ATTACH_FILE_MODE',0644);
 //define('ATTACH_FILE_MODE',0604); // for XREA.COM
 
+// ¥Õ¥¡¥¤¥ë¥ª¡¼¥×¥ó¤Î¾ì¹ç¡¢Ä¾¥ê¥ó¤òÃÆ¤¯
+define('OPEN_AVOID_DIRECT', TRUE);
+
+// ¥µ¥à¥Í¥¤¥ë¤Î¥Ç¥Õ¥©¥ë¥È¥¯¥ª¥ê¥Æ¥£
+define('THUMB_DEFAULT_QUAL', 40);
+
+// ¥µ¥à¥Í¥¤¥ë¤ÎÊÑ´¹ÊýË¡ (TRUE:Á´¤Æ³ê¤é¤«¤ÊJPEG¤ËÊÑ´¹, FALSE:JPEG¤Ï³ê¤é¤«¤ÊJPEG¤Ë¤½¤ÎÂ¾¤ÏPNG¤ËÊÑ´¹)
+define('THUMB_RESAMPLE_ALL', TRUE); // TRUE or FALSE
+
 // file icon image
 if (!defined('FILE_ICON'))
 {
@@ -42,6 +53,16 @@
 // mime-type¤òµ­½Ò¤·¤¿¥Ú¡¼¥¸
 define('ATTACH_CONFIG_PAGE_MIME','plugin/attach/mime-type');
 
+// tar
+define('TAR_HDR_LEN',512);			// ¥Ø¥Ã¥À¤ÎÂç¤­¤µ
+define('TAR_BLK_LEN',512);			// Ã±°Ì¥Ö¥í¥Ã¥¯Ä¹¤µ
+define('TAR_HDR_NAME_OFFSET',0);	// ¥Õ¥¡¥¤¥ëÌ¾¤Î¥ª¥Õ¥»¥Ã¥È
+define('TAR_HDR_NAME_LEN',100);		// ¥Õ¥¡¥¤¥ëÌ¾¤ÎºÇÂçÄ¹¤µ
+define('TAR_HDR_SIZE_OFFSET',124);	// ¥µ¥¤¥º¤Ø¤Î¥ª¥Õ¥»¥Ã¥È
+define('TAR_HDR_SIZE_LEN',12);		// ¥µ¥¤¥º¤ÎÄ¹¤µ
+define('TAR_HDR_TYPE_OFFSET',156);	// ¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤Ø¤Î¥ª¥Õ¥»¥Ã¥È
+define('TAR_HDR_TYPE_LEN',1);		// ¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤ÎÄ¹¤µ
+
 //-------- convert
 function plugin_attach_convert()
 {
@@ -88,6 +109,12 @@
 		$vars['pcmd'] = 'open';
 		$vars['file'] = $vars['openfile'];
 	}
+	// backward compatible
+	if (array_key_exists('thumb',$vars))
+	{
+		$vars['pcmd'] = 'thumb';
+		$vars['file'] = $vars['thumb'];
+	}
 	if (array_key_exists('delfile',$vars))
 	{
 		$vars['pcmd'] = 'delete';
@@ -100,7 +127,7 @@
 	// Authentication
 	if (array_key_exists('refer',$vars) and is_pagename($vars['refer']))
 	{
-		$read_cmds = array('info','open','list');
+		$read_cmds = array('info','open','list','thumb');
 		in_array($pcmd,$read_cmds) ?
 			check_readable($vars['refer']) : check_editable($vars['refer']);
 	}
@@ -117,6 +144,7 @@
 		case 'info':    return attach_info();
 		case 'delete':  return attach_delete();
 		case 'open':    return attach_open();
+		case 'thumb':   return attach_thumb();
 		case 'list':    return attach_list();
 		case 'freeze':  return attach_freeze(TRUE);
 		case 'unfreeze':return attach_freeze(FALSE);
@@ -148,7 +176,7 @@
 {
 // $pass=NULL : ¥Ñ¥¹¥ï¡¼¥É¤¬»ØÄê¤µ¤ì¤Æ¤¤¤Ê¤¤
 // $pass=TRUE : ¥¢¥Ã¥×¥í¡¼¥Éµö²Ä
-	global $adminpass,$_attach_messages;
+	global $adminpass,$_attach_messages,$post;
 	
 	if ($file['tmp_name'] == '' or !is_uploaded_file($file['tmp_name']))
 	{
@@ -167,16 +195,52 @@
 	{
 		return array('result'=>FALSE,'msg'=>$_attach_messages['err_adminpass']);
 	}
+
+	if ( strcasecmp(substr($file['name'],-4),".tar") == 0 && $post['untar_mode'] == "on" ) {
+		// Upload¤µ¤ì¤¿Tar¥¢¡¼¥«¥¤¥Ö¤òÅ¸³«ÅºÉÕ¤¹¤ë
+
+		// Tar¥Õ¥¡¥¤¥ëÅ¸³«
+		$etars = untar( $file['tmp_name'], UPLOAD_DIR);
+
+		// Å¸³«¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤òÁ´¤Æ¥¢¥Ã¥×¥í¡¼¥É¥Õ¥¡¥¤¥ë¤È¤·¤ÆÄÉ²Ã
+		foreach ( $etars as $efile ) {
+			$res = do_upload( $page,
+				mb_convert_encoding($efile['extname'], SOURCE_ENCODING,"auto"),
+				$efile['tmpname']);
+			if ( ! $res['result'] ) {
+				unlink( $efile['tmpname']);
+			}
+		}
+
+		// ºÇ¸å¤ÎÊÖ¤êÃÍ¤Çreturn
+		return $res;
+	} else {
+		// ÄÌ¾ï¤ÎÃ±°ì¥Õ¥¡¥¤¥ëÅºÉÕ½èÍý
+		return do_upload($page,$file['name'],$file['tmp_name']);
+	}
+}
+
+function do_upload($page,$fname,$tmpname)
+{
+	global $_attach_messages;
 	
-	$obj = &new AttachFile($page,$file['name']);	
+	$obj = &new AttachFile($page,$fname);
 	
 	if ($obj->exist)
 	{
 		return array('result'=>FALSE,'msg'=>$_attach_messages['err_exists']);
 	}
-	if (move_uploaded_file($file['tmp_name'],$obj->filename))
-	{
-		chmod($obj->filename,ATTACH_FILE_MODE);
+
+	if ( is_uploaded_file($tmpname) ) {
+		if (move_uploaded_file($tmpname,$obj->filename))
+		{
+			chmod($obj->filename,ATTACH_FILE_MODE);
+		}
+	} else {
+		if (rename($tmpname,$obj->filename))
+		{
+			chmod($obj->filename,ATTACH_FILE_MODE);
+		}
 	}
 	
 	if (is_page($page))
@@ -248,10 +312,40 @@
 	{
 		$$var = array_key_exists($var,$vars) ? $vars[$var] : '';
 	}
+
+	if ( OPEN_AVOID_DIRECT && !strstr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST'])) {
+	        header("Location: http://" . $_SERVER['HTTP_HOST'] .
+                $_SERVER['SCRIPT_NAME'] );
+		exit;
+	}
 	
 	$obj = &new AttachFile($refer,$file,$age);
 	return $obj->getstatus() ? $obj->open() : array('msg'=>$_attach_messages['err_notfound']);
 }
+//¥¤¥á¡¼¥¸¥µ¥à¥Í¥¤¥ë½ÐÎÏ
+function attach_thumb()
+{
+	global $vars,$_attach_messages;
+	
+	foreach (array('refer','file','age') as $var)
+	{
+		$$var = array_key_exists($var,$vars) ? $vars[$var] : '';
+	}
+
+	if ( OPEN_AVOID_DIRECT && !strstr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST'])) {
+	        header("Location: http://" . $_SERVER['HTTP_HOST'] .
+                $_SERVER['SCRIPT_NAME'] );
+		exit;
+	}
+	
+	$obj = &new AttachFile($refer,$file,$age);
+
+	$dstw = $vars['width']    ? $vars['width'] :  0;
+	$dsth = $vars['height']   ? $vars['height']:  0;
+	$qual = $vars['qual'] ? $vars['qual']: THUMB_DEFAULT_QUAL;
+
+	return $obj->getstatus() ? $obj->thumb($dstw,$dsth,$qual) : array('msg'=>$_attach_messages['err_notfound']);
+}
 //°ìÍ÷¼èÆÀ
 function attach_list()
 {
@@ -376,6 +470,7 @@
   {$_attach_messages['msg_file']}: <input type="file" name="attach_file" />
   $pass
   <input type="submit" value="{$_attach_messages['btn_upload']}" />
+  ({$_attach_messages['untar_mode']}:<input type="checkbox" name="untar_mode">)
  </div>
 </form>
 EOD;
@@ -633,6 +728,108 @@
 		@readfile($this->filename);
 		exit;
 	}
+	function thumb($dw,$dh,$qual)
+	{
+		global $vars;
+
+		// for japanese (???)
+		$filename = htmlspecialchars(mb_convert_encoding($this->file,'SJIS','auto'));
+
+		$thumbname = CACHE_DIR.encode($vars['refer']).'_'.$dw.'x'.$dh.'_'.$vars['thumb'].'.thumb';
+
+		// ¥µ¥à¥Í¥¤¥ë¤ò½ÐÎÏ
+		if ((is_readable($thumbname)) && (filemtime($thumbname) > filemtime($this->filename))) {
+			if ( THUMB_RESAMPLE_ALL ) {
+				$thumb = imagecreatefromjpeg($thumbname);
+				header('Content-Type: image/jpeg');
+				imagejpeg( $thumb );
+			} else {
+				switch ( $type = strtolower(substr($thumbname,strrpos(substr($thumbname,0,-6),'.')+1,-6))) {
+					case 'jpeg':
+					case 'jpg':
+						$thumb = imagecreatefromjpeg($thumbname);
+						header('Content-Type: image/jpeg');
+						imagejpeg( $thumb );
+						break;
+					default:
+						$thumb = imagecreatefrompng($thumbname);
+						header('Content-Type: image/png');
+						imagepng( $thumb );
+						break;
+				}
+			}
+			exit;
+		}
+
+		switch ( $type = strtolower(substr($filename,strrpos($filename,'.')+1))) {
+			case 'jpeg':	
+			case 'jpg':
+				$src = imagecreatefromjpeg($this->filename);
+				break;
+			case 'png':
+				$src = imagecreatefrompng($this->filename);
+				break;
+			case 'bmp':
+				$src = imagecreatefromwbmp($this->filename);
+				break;
+			case 'gif':
+				$src = imagecreatefromgif($this->filename);
+				break;
+			default:
+				exit;
+		}
+
+		if ( !$src ) {
+				exit;
+		}
+
+		$sw = imagesx( $src); $sh = imagesy( $src);
+
+		if ( $dw == 0 && $dh > 0 ) {
+				$dw = (int)($sw*$dh/$sh);
+		}
+		if ( $dh == 0 && $dw > 0 ) {
+				$dh = (int)($sh*$dw/$sw);
+		}
+		if ( $dw == 0 && $dh == 0 ) {
+				$dw = $sw;
+				$dh = $sh;
+		}
+		$dst = imagecreatetruecolor($dw,$dh);
+
+		if ( !$qual ) {
+			$qual = THUMB_DEFAULT_QUAL;
+		}
+
+		switch ( $type ) {
+			case 'jpeg':
+			case 'jpg':
+				imagecopyresampled( $dst, $src, 0, 0, 0, 0, $dw, $dh, $sw, $sh);
+				imageinterlace( $dst, 1);
+				header('Content-Type: image/jpeg');
+				imagejpeg( $dst, "", $qual);
+				imagejpeg( $dst, $thumbname, $qual);
+				break;
+			case 'png':
+			case 'bmp':
+			case 'gif':
+				if ( THUMB_RESAMPLE_ALL ) {
+					imagecopyresampled( $dst, $src, 0, 0, 0, 0, $dw, $dh, $sw, $sh);
+					imageinterlace( $dst, 1);
+					header('Content-Type: image/jpeg');
+					imagejpeg( $dst, "", $qual);
+					imagejpeg( $dst, $thumbname, $qual);
+				} else {
+					imagecopyresized( $dst, $src, 0, 0, 0, 0, $dw, $dh, $sw, $sh);
+					imageinterlace( $dst, 1);
+					header('Content-Type: image/png');
+					imagepng( $dst );
+					imagepng( $dst, $thumbname);
+				}
+				break;
+		}
+		exit;
+	}
 }
 
 // ¥Õ¥¡¥¤¥ë¥³¥ó¥Æ¥Ê
@@ -763,4 +960,50 @@
 		
 	}
 }		
+
+// $tname: tar¥Õ¥¡¥¤¥ë¥Í¡¼¥à
+// $odir : Å¸³«Àè¥Ç¥£¥ì¥¯¥È¥ê
+// ÊÖ¤êÃÍ: ÆÃ¤ËÌµ¤·¡£Âç¤·¤¿¥Á¥§¥Ã¥¯¤Ï¤»¤º¡¢¤ä¤ë¤À¤±¤ä¤Ã¤Æ¸å¤ÏÌî¤È¤Ê¤ì»³¤È¤Ê¤ì
+function untar( $tname, $odir)
+{
+	if (!( $fp = fopen( $tname, "rb") ) ) {
+		return;
+	}
+
+	unset($files);
+	$cnt = 0;
+	while ( strlen($buff=fread( $fp,TAR_HDR_LEN)) == TAR_HDR_LEN ) {
+		for ( $i=TAR_HDR_NAME_OFFSET,$name="";
+			$buff[$i] != "\0" && $i<TAR_HDR_NAME_OFFSET+TAR_HDR_NAME_LEN;
+			$i++) {
+			$name .= $buff[$i];
+		}
+		$name = basename(trim($name)); //¥Ç¥£¥ì¥¯¥È¥ê¤ª¹½¤¤Ìµ¤·
+
+		for ( $i=TAR_HDR_SIZE_OFFSET,$size="";
+				$i<TAR_HDR_SIZE_OFFSET+TAR_HDR_SIZE_LEN; $i++ ) {
+			$size .= $buff[$i];
+		}
+		list($size) = sscanf("0".trim($size),"%i"); // ¥µ¥¤¥º¤Ï8¿Ê¿ô
+
+		// ¥Ç¡¼¥¿¥Ö¥í¥Ã¥¯¤Ï512byte¤Ç¥Ñ¥Ç¥£¥ó¥°¤µ¤ì¤Æ¤¤¤ë
+		$pdsz =  ((int)(($size+(TAR_BLK_LEN-1))/TAR_BLK_LEN))*TAR_BLK_LEN;
+
+		// ÄÌ¾ï¤Î¥Õ¥¡¥¤¥ë¤·¤«Áê¼ê¤Ë¤·¤Ê¤¤
+		$type = $buff[TAR_HDR_TYPE_OFFSET];
+
+		if ( $name && $type == 0 ) {
+			$buff = fread( $fp, $pdsz);
+			$tname = tempnam( $odir, "tar" );
+			$fpw = fopen( $tname , "wb");
+			fwrite( $fpw, $buff, $size );
+			fclose( $fpw);
+			$files[$cnt  ]['tmpname'] = $tname;
+			$files[$cnt++]['extname'] = $name;
+		}
+	}
+	fclose( $fp);
+
+	return $files;	
+}
 ?>
--- pukiwiki/plugin/ref.inc.php.orig	Sun Feb 29 23:29:28 2004
+++ pukiwiki/plugin/ref.inc.php	Fri Jul  2 23:53:10 2004
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: ref.inc.php,v 1.21 2004/02/29 14:29:28 arino Exp $
+// $Id: ref.inc.php,v 1.10 2004/07/02 14:28:32 m-arai Exp $
 //
 
 /*
@@ -32,12 +32,20 @@
 ¸µ¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯¤òÄ¥¤é¤Ê¤¤
 -noimg~
 ²èÁü¤òÅ¸³«¤·¤Ê¤¤
+-height=YYYY~
+¥µ¥¤¥º¤ò»ØÄê(¹â¤µ)
+-width=XXX~
+¥µ¥¤¥º¤ò»ØÄê(Éý)
+-nothumb
+¥µ¥à¥Í¥¤¥ë¤ò»È¤ï¤Ê¤¤
 -zoom~
-½Ä²£Èæ¤òÊÝ»ý¤¹¤ë
+Ìµ¸ú(ref¤È¤Î¸ß´¹À­¤Î°Ù¤À¤±¤ËÂ¸ºß)
 -999x999~
 ¥µ¥¤¥º¤ò»ØÄê(Éýx¹â¤µ)
 -999%~
 ¥µ¥¤¥º¤ò»ØÄê(³ÈÂçÎ¨)
+-info~
+¥Õ¥¡¥¤¥ë¾ðÊó¤òÉ½¼¨¤¹¤ë
 -¤½¤ÎÂ¾~
 img¤Îalt/href¤Îtitle¤È¤·¤Æ»ÈÍÑ~
 ¥Ú¡¼¥¸Ì¾¤ä¥Ñ¥é¥á¡¼¥¿¤Ë¸«¤¨¤ëÊ¸»úÎó¤ò»ÈÍÑ¤¹¤ë¤È¤­¤Ï¡¢#ref(hoge.png,,zoom)¤Î¤è¤¦¤Ë
@@ -59,6 +67,9 @@
 // URL»ØÄê»þ¤Ë²èÁü¥µ¥¤¥º¤ò¼èÆÀ¤¹¤ë¤«
 define('REF_URL_GETIMAGESIZE',FALSE);
 
+// ¥µ¥à¥Í¥¤¥ë¤ò»È¤¦¾ì¹ç¤Î¥¯¥ª¥ê¥Æ¥£ 0¡Á100
+define('REF_IMGTHUM_QUAL',50);
+
 function plugin_ref_inline()
 {
 	global $vars;
@@ -149,11 +160,11 @@
 		'noicon' => FALSE, // ¥¢¥¤¥³¥ó¤òÉ½¼¨¤·¤Ê¤¤
 		'nolink' => FALSE, // ¸µ¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯¤òÄ¥¤é¤Ê¤¤
 		'noimg'  => FALSE, // ²èÁü¤òÅ¸³«¤·¤Ê¤¤
-		'zoom'   => FALSE, // ½Ä²£Èæ¤òÊÝ»ý¤¹¤ë
+		'nothumb'=> FALSE,      // ¥µ¥à¥Í¥¤¥ë¤ò»È¤ï¤Ê¤¤
+		'info'   => FALSE, // ¥Õ¥¡¥¤¥ë¾ðÊó¤òÉ½¼¨¤¹¤ë
 		'_size'  => FALSE, //(¥µ¥¤¥º»ØÄê¤¢¤ê)
 		'_w'     => 0,      //(Éý)
 		'_h'     => 0,      //(¹â¤µ)
-		'_%'     => 0,      //(³ÈÂçÎ¨)
 		'_args'  => array(),
 		'_done'  => FALSE,
 		'_error' => ''
@@ -224,13 +235,21 @@
 			return $params;
 		}
 		$size = @getimagesize($file);
+
+		if ( $params['_size'] && ( $params['_%'] > 99 ||
+				$params['_w'] > $size[0] || $params['_h'] > $size[1] ) ){
+			$params['nothumb'] = TRUE;
+		}
+
 		$is_image = (!$params['noimg'] and preg_match("/\.(gif|png|jpe?g)$/i",$name));
 		$width = $height = 0;
 		$url = $script.'?plugin=attach&amp;openfile='.rawurlencode($name).'&amp;refer='.rawurlencode($page);
+		$thm = $script.'?plugin=attach&amp;thumb='.rawurlencode($name).'&amp;refer='.rawurlencode($page)."&amp;qual=".REF_IMGTHUM_QUAL;
+
 		if ($is_image)
 		{
 			$url2 = $url;
-			$url = $file;
+			$url  = $params['nothumb'] ? $url: $thm;
 			if (is_array($size))
 			{
 				$width = $size[0];
@@ -249,12 +268,28 @@
 		$_title = array();
 		foreach ($params['_args'] as $arg)
 		{
-			if (preg_match('/^([0-9]+)x([0-9]+)$/',$arg,$m))
+			if ( strncmp( $arg, "height=", 7) == 0 ) {
+				$params['_size'] = TRUE;
+				$params['_h'] = substr($arg,7);
+			}
+			else if ( strncmp( $arg, "width=", 6) == 0 ) {
+				$params['_size'] = TRUE;
+				$params['_w'] = substr($arg,6);
+			}
+			else if (preg_match('/^([0-9]+)x([0-9]+)$/',$arg,$m))
 			{
 				$params['_size'] = TRUE;
 				$params['_w'] = $m[1];
 				$params['_h'] = $m[2];
 			}
+			else if ( strcmp($arg,"zoom") == 0 )
+			{
+				// zoom¤Ïºï½ü
+			}
+			else if ( strcmp($arg,"nothumb") == 0 )
+			{
+				$params['nothumb'] = TRUE;
+			}
 			else if (preg_match('/^([0-9.]+)%$/',$arg,$m) and $m[1] > 0)
 			{
 				$params['_%'] = $m[1];
@@ -270,7 +305,7 @@
 			$title = $is_image ? htmlspecialchars($title) : make_line_rules(htmlspecialchars($title));
 		}
 	}
-	
+
 	//²èÁü¥µ¥¤¥ºÄ´À°
 	if ($is_image)
 	{
@@ -282,32 +317,44 @@
 				$width = $params['_w'];
 				$height = $params['_h'];
 			}
-			else if ($params['zoom'])
+			else if ( !$params['_w'] || !$params['_h'])
 			{
-				$_w = $params['_w'] ? $width / $params['_w'] : 0;
-				$_h = $params['_h'] ? $height / $params['_h'] : 0;
-				$zoom = max($_w,$_h);
-				if ($zoom)
-				{
-					$width = (int)($width / $zoom);
-					$height = (int)($height / $zoom);
+				if ( !$params['_h'] ) {
+					$height = (int)($height*$params['_w']/$width);
+					$width  = $params['_w'];
+				}
+				if ( !$params['_w'] ) {
+					$width  = (int)($width*$params['_h']/$height);
+					$height = $params['_h'];
 				}
 			}
 			else
 			{
-				$width = $params['_w'] ? $params['_w'] : $width;
-				$height = $params['_h'] ? $params['_h'] : $height;
+				$width  = $params['_w'];
+				$height = $params['_h'];
 			}
-		}
-		if ($params['_%'])
+		} else if ($params['_%'])
 		{
 			$width = (int)($width * $params['_%'] / 100);
 			$height = (int)($height * $params['_%'] / 100);
 		}
+
 		if ($width and $height)
 		{
 			$info = "width=\"$width\" height=\"$height\" ";
 		}
+
+		if ( !$params['nothumb'] && !is_url($name) ) {
+			if ( $width ) {
+				$url .= "&amp;width={$width}";
+			}
+			if ( $height ) {
+				$url .= "&amp;height={$height}";
+			}
+		} else {
+			$url .= "\" " . ( $width ? "width={$width} ": "" ) .
+					( $height ? "height={$height} ": "" );
+		}
 	}
 	
 	//¥¢¥é¥¤¥ó¥á¥ó¥ÈÈ½Äê
@@ -341,7 +388,8 @@
 	else	// ÄÌ¾ï¥Õ¥¡¥¤¥ë
 	{
 		$icon = $params['noicon'] ? '' : FILE_ICON;
-		$params['_body'] = "<a href=\"$url\" title=\"$info\">$icon$title</a>";
+		$fileinfo = $params['info'] ? " ($info)" : '';
+		$params['_body'] = "<a href=\"$url\" title=\"$info\">$icon$title</a>$fileinfo\n";
 	}
 	return $params;
 }
--- pukiwiki/ja.lng.orig	Sun Apr  4 00:27:07 2004
+++ pukiwiki/ja.lng	Sat Jul  3 00:28:41 2004
@@ -147,7 +147,8 @@
 	'err_adminpass'=> '´ÉÍý¼Ô¥Ñ¥¹¥ï¡¼¥É¤¬°ìÃ×¤·¤Þ¤»¤ó¡£',
 	'btn_upload'   => '¥¢¥Ã¥×¥í¡¼¥É',
 	'btn_info'     => '¾ÜºÙ',
-	'btn_submit'   => '¼Â¹Ô'
+	'btn_submit'   => '¼Â¹Ô',
+	'untar_mode'   => 'Untar',
 );
 
 ///////////////////////////////////////
--- pukiwiki/en.lng.orig	Sun Apr  4 00:27:07 2004
+++ pukiwiki/en.lng	Sat Jul  3 00:29:34 2004
@@ -145,7 +145,8 @@
 	'err_adminpass'=> 'Wrong administrator password',
 	'btn_upload'   => 'Upload',
 	'btn_info'     => 'Information',
-	'btn_submit'   => 'Submit'
+	'btn_submit'   => 'Submit',
+	'untar_mode'   => 'Untar',
 );
 
 ///////////////////////////////////////
