Added support for moving path=... variable to /etc/koha.conf
This commit is contained in:
parent
80a0cb638e
commit
1c9ef0371f
1 changed files with 18 additions and 1 deletions
19
C4/Output.pm
19
C4/Output.pm
|
@ -43,7 +43,24 @@ my @more = ();
|
||||||
#
|
#
|
||||||
# Change this value to reflect where you will store your includes
|
# Change this value to reflect where you will store your includes
|
||||||
#
|
#
|
||||||
my $path="/usr/local/www/hdl/htdocs/includes";
|
my %configfile;
|
||||||
|
open (KC, "/etc/koha.conf");
|
||||||
|
while (<KC>) {
|
||||||
|
chomp;
|
||||||
|
(next) if (/^\s*#/);
|
||||||
|
if (/(.*)\s*=\s*(.*)/) {
|
||||||
|
my $variable=$1;
|
||||||
|
my $value=$2;
|
||||||
|
# Clean up white space at beginning and end
|
||||||
|
$variable=~s/^\s*//g;
|
||||||
|
$variable=~s/\s*$//g;
|
||||||
|
$value=~s/^\s*//g;
|
||||||
|
$value=~s/\s*$//g;
|
||||||
|
$configfile{$variable}=$value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
my $path=$configfile{'path'};
|
||||||
|
($path) || ($path="/usr/local/www/hdl/htdocs/includes");
|
||||||
|
|
||||||
|
|
||||||
# here's a file-private function as a closure,
|
# here's a file-private function as a closure,
|
||||||
|
|
Loading…
Reference in a new issue