From 7319cdf9d0b09efa8311d31c4fd75faecc7db2b0 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Tue, 8 Jul 2008 10:43:30 -0400 Subject: [PATCH] Try to edit help, don't test, for some reason -w wasn't working Signed-off-by: Joshua Ferraro --- edithelp.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/edithelp.pl b/edithelp.pl index d4cdd5c91d..f9f3c00508 100755 --- a/edithelp.pl +++ b/edithelp.pl @@ -80,10 +80,8 @@ if ( $type eq 'addnew' ) { } elsif ( $type eq 'create' || $type eq 'save' ) { my $file = _get_filepath($referer); - if (! -w $file) { - $error = "Cannot write file: '$file'"; - } else { - open (OUTFILE, ">$file") or die "Cannot write file: '$file'"; # unlikely death, since we just checked + unless (open (OUTFILE, ">$file")) {$error = "Cannot write file: '$file'";} else { + #open (OUTFILE, ">$file") or die "Cannot write file: '$file'"; # unlikely death, since we just checked # file is open write to it print OUTFILE "\n"; print OUTFILE ($type eq 'create') ? "
\n$help\n
" : $help; @@ -91,6 +89,7 @@ elsif ( $type eq 'create' || $type eq 'save' ) { close OUTFILE; print $input->redirect("/cgi-bin/koha/help.pl?url=$oldreferer"); } + } elsif ( $type eq 'modify' ) { # open file load data, kill include calls, pass data to the template -- 2.39.2