]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
more generic interface
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index f97ab45a4ff562604712850801eb480cc6c293a6..f8a3a68c601c373a927ff9f175f1a00772d8f9c6 100644 (file)
@@ -160,18 +160,16 @@ sub attachment_holding_dir {
                IkiWiki::possibly_foolish_untaint(linkpage($page));
 }
 
                IkiWiki::possibly_foolish_untaint(linkpage($page));
 }
 
-sub remove_held_attachment {
+sub is_held_attachment {
        my $attachment=shift;
 
        my $f=attachment_holding_dir($attachment);
        $f=~s/\/$//;
        if (-f $f) {
        my $attachment=shift;
 
        my $f=attachment_holding_dir($attachment);
        $f=~s/\/$//;
        if (-f $f) {
-               require IkiWiki::Render;
-               IkiWiki::prune($f);
-               return 1;
+               return $f
        }
        else {
        }
        else {
-               return 0;
+               return undef;
        }
 }
 
        }
 }