]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
support for removing attachments
[ikiwiki.git] / IkiWiki / CGI.pm
index 6770f6feb7081f4462be9f30d6e0db87195e29a5..d805506aa9dd1a62940d82599375b8b284fde262 100644 (file)
@@ -750,4 +750,14 @@ sub cgi (;$$) { #{{{
        }
 } #}}}
 
+# Does not need tobe called directly; all errors will go through here.
+sub cgierror ($) { #{{{
+       my $message=shift;
+
+       print "Content-type: text/html\n\n";
+       print misctemplate(gettext("Error"),
+               "<p class=\"error\">".gettext("Error").": $message</p>");
+       die $@;
+} #}}}
+
 1