1############################################################ 2# 3# <p>ź�դ��������ե������ɽ�����ޤ���</p> 4# <pre> 5# {{ref_image �ե�����̾}} 6# </pre> 7# <p>�̤Υڡ�����ź�դ��줿�ե�����Ȥ��뤳�Ȥ�Ǥ��ޤ���</p> 8# <pre> 9# {{ref_image �ե�����̾,�ڡ���̾}} 10# </pre> 11# 12############################################################ 13package plugin::attach::RefImage; 14use strict; 15#=========================================================== 16# ���ȥ饯�� 17#=========================================================== 18sub new { 19 my $class = shift; 20 my $self = {}; 21 return bless $self,$class; 22} 23 24#=========================================================== 25# �ѥ饰��ե�å� 26#=========================================================== 27sub paragraph { 28 my $self = shift; 29 my $wiki = shift; 30 my $file = shift; 31 my $page = shift; 32 33 if($file eq ""){ 34 return &Util::paragraph_error("�ե����뤬���ꤵ��Ƥ��ޤ���","WIKI"); 35 } 36 if($page eq ""){ 37 $page = $wiki->get_CGI()->param("page"); 38 } 39 unless($wiki->can_show($page)){ 40 return &Util::paragraph_error("�ڡ����λ��ȸ��¤�����ޤ���","WIKI"); 41 } 42 43 my $filename = $wiki->config('attach_dir')."/".&Util::url_encode($page).".".&Util::url_encode($file); 44 unless(-e $filename){ 45 return &Util::paragraph_error("�ե����뤬¸�ߤ��ޤ���","WIKI"); 46 } 47 48 $self->{parser}->l_image($page,$file); 49 return undef; 50} 51 521;