Skip to content

Commit

Permalink
Try to edit help, don't test, for some reason -w wasn't working
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
  • Loading branch information
Joshua Ferraro committed Jul 8, 2008
1 parent fef27be commit 7319cdf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions edithelp.pl
Expand Up @@ -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
Expand Down

0 comments on commit 7319cdf

Please sign in to comment.