aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-02 13:02:07 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-02 13:02:07 -0400
commitb2dea99417ebfee3d448ab6b49ca58cb2780258d (patch)
tree2ef858a5bd85d9fb500554933c002eb805e43d94 /IkiWiki/CGI.pm
parent9fca7f2f8b64f4caded4a0099cef1f4d152dabee (diff)
downloadikiwiki-b2dea99417ebfee3d448ab6b49ca58cb2780258d.tar
ikiwiki-b2dea99417ebfee3d448ab6b49ca58cb2780258d.tar.gz
Fix ugly display when editing a page that has vanished.
srcfile now has an optional second parameter to avoid it throwing an error if the source file does not exist.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 65136a269..781974c13 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -503,7 +503,7 @@ sub cgi_editpage ($$) { #{{{
my $exists=-e "$config{srcdir}/$file";
if ($form->field("do") ne "create" && ! $exists &&
- ! eval { srcfile($file) }) {
+ ! defined srcfile($file, 1)) {
$form->tmpl_param("page_gone", 1);
$form->field(name => "do", value => "create", force => 1);
$form->tmpl_param("page_select", 0);