From 7e6e331a3f751fd20622a14d44b74cfa17d7964e 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 (cherry picked from commit 3ae471a352fa2b00782c29c5c40f39db04fe510a) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 77daa7d76d9883cb53366e968c89179515e9b2b9) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit 77daa7d76d9883cb53366e968c89179515e9b2b9) --- about.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/about.pl b/about.pl index 545f18ca30..761f01a43e 100755 --- a/about.pl +++ b/about.pl @@ -145,7 +145,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.39.5