1 ############################################################
3 # ¥Ú¡¼¥¸¤¬ºï½ü¤µ¤ì¤¿¤È¤¤Î¥Õ¥Ã¥¯
5 ############################################################
6 package plugin::attach::AttachDelete;
8 #===========================================================
10 #===========================================================
14 return bless $self,$class;
16 #===========================================================
17 # ¥Ú¡¼¥¸ºï½ü»þ¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¥Õ¥Ã¥¯´Ø¿ô
18 #===========================================================
22 my $cgi = $wiki->get_CGI;
23 my $pagename = $cgi->param("page");
24 my $encode_page = &Util::url_encode($pagename);
26 opendir(DIR,$wiki->config('attach_dir')) or die $!;
27 while(my $entry = readdir(DIR)){
28 if(index($entry,$encode_page.".")==0){
29 unlink($wiki->config('attach_dir')."/$entry");