From 3ae471a352fa2b00782c29c5c40f39db04fe510a Mon Sep 17 00:00:00 2001 From: Mason James Date: Fri, 20 Sep 2013 00:06:20 +1200 Subject: [PATCH] Bug 10915: fix About->timeline breakage on incompletely upgraded Koha This patch supplies a default value for the koha-conf.xml setting docdir to handle the case where the user neglects to set it upon upgrade. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi Fixes dev and standard installs without docdic tag in koha-conf.xml. Doesn't break when docdir present either. Warning still present on packages install that didn't add the docdir definition in koha-conf.xml Signed-off-by: Galen Charlton --- about.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/about.pl b/about.pl index ef45340b1c..0ba729178a 100755 --- a/about.pl +++ b/about.pl @@ -148,7 +148,15 @@ $template->param( table => $table ); ## Koha time line code #get file location -my $docdir = C4::Context->config('docdir'); +my $docdir; +if ( defined C4::Context->config('docdir') ) { + $docdir = C4::Context->config('docdir'); +} else { + # if no is defined in koha-conf.xml, use the default location + # this is a work-around to stop breakage on upgraded Kohas, bug 8911 + $docdir = C4::Context->config('intranetdir') . '/docs'; +} + open( my $file, "<", "$docdir" . "/history.txt" ); my $i = 0; -- 2.20.1