Skip to content
Browse files

Try to edit help, don't test, for some reason -w wasn't working

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
  • Loading branch information...
1 parent fef27be commit 7319cdf9d0b09efa8311d31c4fd75faecc7db2b0 Joshua Ferraro committed Jul 8, 2008
Showing with 3 additions and 4 deletions.
  1. +3 −4 edithelp.pl
View
7 edithelp.pl
@@ -80,17 +80,16 @@ ($;$)
}
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 "<!-- TMPL_INCLUDE NAME=\"help-top.inc\" -->\n";
print OUTFILE ($type eq 'create') ? "<div class=\"main\">\n$help\n</div>" : $help;
print OUTFILE "\n<!-- TMPL_INCLUDE NAME=\"help-bottom.inc\" -->\n";
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

0 comments on commit 7319cdf

Please sign in to comment.
Something went wrong with that request. Please try again.