projects
/
koha_gimpoz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug_2830: Remove reserve when checking out if the borrower is not the first one in...
[koha_gimpoz]
/
edithelp.pl
diff --git
a/edithelp.pl
b/edithelp.pl
index
4d7e0c0
..
5cde314
100755
(executable)
--- a/
edithelp.pl
+++ b/
edithelp.pl
@@
-19,6
+19,7
@@
use strict;
use C4::Output;
use strict;
use C4::Output;
+use C4::Templates;
use C4::Auth;
use CGI;
use warnings;
use C4::Auth;
use CGI;
use warnings;
@@
-66,7
+67,7
@@
sub _get_filepath ($;$) {
$referer =~ /koha\/(.*)\.pl/;
my $from = "help/$1.tt";
my $htdocs = C4::Context->config('intrahtdocs');
$referer =~ /koha\/(.*)\.pl/;
my $from = "help/$1.tt";
my $htdocs = C4::Context->config('intrahtdocs');
- my ($theme, $lang) = themelanguage( $htdocs, $from, "intranet", $input );
+ my ($theme, $lang) =
C4::Templates::
themelanguage( $htdocs, $from, "intranet", $input );
$debug and print STDERR "help filepath: $htdocs/$theme/$lang/modules/$from";
return "$htdocs/$theme/$lang/modules/$from";
}
$debug and print STDERR "help filepath: $htdocs/$theme/$lang/modules/$from";
return "$htdocs/$theme/$lang/modules/$from";
}
@@
-96,14
+97,12
@@
elsif ( $type eq 'modify' ) {
} else {
(-w $file) or $error =
"WARNING: You will not be able save, because your webserver cannot write to '$file'. Contact your admin about help file permissions.";
} else {
(-w $file) or $error =
"WARNING: You will not be able save, because your webserver cannot write to '$file'. Contact your admin about help file permissions.";
- open (
INFILE, $file) or die "Cannot read file '$file'";
# unlikely death, since we just checked
+ open (
my $fh, '<', $file) or die "Cannot read file '$file'";
# unlikely death, since we just checked
my $help = '';
my $help = '';
- while ( my $inp = <INFILE> ) {
- unless ( $inp =~ /INCLUDE/ ) {
- $help .= $inp;
- }
+ while ( <$fh> ) {
+ $help .= /\[% INCLUDE .* %\](.*)$/ ? $1 : $_;
}
}
- close
INFILE
;
+ close
$fh
;
$template->param( 'help' => $help );
$type = 'save';
}
$template->param( 'help' => $help );
$type = 'save';
}