Try to edit help, don't test, for some reason -w wasn't working
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
fef27be9ad
commit
7319cdf9d0
|
|
@ -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 "<!-- TMPL_INCLUDE NAME=\"help-top.inc\" -->\n";
|
||||
print OUTFILE ($type eq 'create') ? "<div class=\"main\">\n$help\n</div>" : $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
|
||||
|
|
|
|||
Loading…
Reference in New Issue