Bugzilla – Attachment 51136 Details for
Bug 16430
Mainpage.pl dies if library is not set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16430 - Mainpage.pl dies if library is not set
Bug-16430---Mainpagepl-dies-if-library-is-not-set.patch (text/plain), 1.20 KB, created by
Kyle M Hall (khall)
on 2016-05-03 12:58:50 UTC
(
hide
)
Description:
Bug 16430 - Mainpage.pl dies if library is not set
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-05-03 12:58:50 UTC
Size:
1.20 KB
patch
obsolete
>From 9fad61c4881f0c9b6ef39e8b2ceca7cec3779b3b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 3 May 2016 12:57:13 +0000 >Subject: [PATCH] Bug 16430 - Mainpage.pl dies if library is not set > >On a fresh install of Koha, logging in I was met with: > >Invalid dateformat parameter () at >/home/vagrant/kohaclone/Koha/DateUtils.pm line 112. > >It appears that if the library is not set, you get this message on >mainpage.pl. Needless to say, this adds difficulty in setting up a fresh >install of Koha! > >Test Plan: >1) Check out master, start with a fresh empty database >2) Go through the installer, log in with the db user for the first time >3) Note the error >4) Apply this patch >5) Refresh the page, the error should be gone >--- > C4/NewsChannels.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm >index cbcc702..7a7b72a 100644 >--- a/C4/NewsChannels.pm >+++ b/C4/NewsChannels.pm >@@ -190,6 +190,9 @@ sub get_opac_news { > > sub GetNewsToDisplay { > my ($lang,$branch) = @_; >+ >+ return [] unless $branch && $branch ne 'NO_LIBRARY_SET'; >+ > my $dbh = C4::Context->dbh; > # SELECT *,DATE_FORMAT(timestamp, '%d/%m/%Y') AS newdate > my $query = q{ >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16430
:
51136
|
51137