- $tpl->fillin("DIRLIST",$dirlist);
- $tpl->fillin("DIR",encode_entities($virtual));
- $tpl->fillin("SCRIPT",$script);
- $tpl->fillin("URL",encode_entities(equal_url($config->{'httproot'},$virtual)));
+ $tpl->fillin('DIRLIST',$dirlist);
+ $tpl->fillin('DIR',encode_html($virtual));
+ $tpl->fillin('DIR_URL',escape($virtual));
+ $tpl->fillin('SCRIPT',$script);
+ $tpl->fillin('URL',encode_html(equal_url($config->{'httproot'},$virtual)));
+
+ $tpl->fillin('FILTER',encode_html($filter2));
+ $tpl->fillin('FILTER_URL',escape($filter2));
+
+ $tpl->parse_if_block('empty',$dirlist eq '');
+ $tpl->parse_if_block('dir_writeable',-w $physical);
+ $tpl->parse_if_block('filter',$filter2);
+ $tpl->parse_if_block('gmt',$config->{'use_gmt'});
+ }
+ elsif(-l $physical)
+ {
+ # Show the target of a symbolic link
+
+ my $link_target = readlink($physical);
+
+ $tpl->read_file($config->{'templates'}->{'viewlink'});