Main Koha release repository https://koha-community.org
Find a file
Tomas Cohen Arazi c671784321 Bug 14339: C4::Context->preference should return undef if DB is not populated
The current behaviour for C4::Context->preference when the DB is not still
populated with tables is to return undef. This is used by C4::Auth to identify
the need of running the installer.

This behaviour got broken by bug 13967, which lets DB errors to escalate and
thus Koha gets broken instead of prompting for install.

This patch wraps Koha::Config::Sysprefs->find inside an eval and sets undef if needed.

To test:
- In current master, drop the DB
- Load OPAC and Intranet
=> FAIL: notice an ugly software error.
- Apply the patch
- Load the OPAC
=> SUCCESS: Maintenance mode screen is shown
- Load Intranet
=> SUCCESS: You are prompted the DB credentials to run the web installer.
- Sign off :-D

Tomas

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-06-07 18:38:09 -03:00
acqui Bug 14047: Order z39.50 biblioservers in cataloguing 2015-06-01 14:29:43 -03:00
admin Bug 14145: Noisy warns in admin/preferences.pl 2015-05-22 09:37:24 -03:00
authorities Bug 8399: No need to truncate the marc field text to 22 chars 2015-05-18 12:11:23 -03:00
basket Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
C4 Bug 14339: C4::Context->preference should return undef if DB is not populated 2015-06-07 18:38:09 -03:00
catalogue Bug 10938: Item columns displayed in random order 2015-06-05 14:13:39 -03:00
cataloguing Bug 14047: Order z39.50 biblioservers in cataloguing 2015-06-01 14:29:43 -03:00
circ Bug 12066: New renew page in staff client doesn't record branch in statistics 2015-06-01 10:56:53 -03:00
course_reserves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
debian Bug 14312: dependency updates 2015-06-04 10:09:33 -03:00
docs Bug 14255: minor edits to history.txt to facilitate automatic updates to the website 2015-05-26 10:42:05 -03:00
errors Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
etc Bug 8992: Add 7..$3 to the Indentifier-standard index 2015-04-28 15:47:40 -03:00
install_misc Bug 14066: Removing more Readonly 2015-05-06 11:05:22 -03:00
installer Bug 7976: DBRev 3.21.00.006 2015-06-05 13:50:43 -03:00
Koha Bug 13967 - System preferences need a package 2015-06-04 10:39:11 -03:00
koha-tmpl Bug 10938: Item columns displayed in random order - OPAC 2015-06-05 14:13:39 -03:00
labels Bug 12911: batch_id for new labels batches can be asssigned to several batches 2015-05-14 11:11:03 -03:00
members Bug 11925: Check ages limits when creating/updating patrons 2015-05-20 11:19:07 -03:00
misc Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding everywhere 2015-06-04 11:13:46 -03:00
offline_circ Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac Bug 10938: Item columns displayed in random order - OPAC 2015-06-05 14:13:39 -03:00
OpenILS
patron_lists Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
patroncards Bug 14122: Patron card: Software error when creating using borrower_number as parameter from URL 2015-05-06 10:40:00 -03:00
plugins Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
reports Bug 14024 - add reports to action logs 2015-06-04 10:46:20 -03:00
reserve Bug 13687: Move hold policy check into CanItemBeReserved 2015-05-19 12:05:50 -03:00
reviews Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
rotating_collections Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
selenium
serials Bug 13662: Fix the serials.receive_serials permissions 2015-06-05 12:53:09 -03:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
sms Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
suggestion Bug 10752: Alert the librarian if the suggestion has not been added 2015-04-28 15:11:42 -03:00
svc Bug 14299: Today's checkouts not always sorting correctly 2015-06-05 12:53:03 -03:00
t Bug 14346: t/Biblio.t fails because of new warning 2015-06-07 18:37:32 -03:00
tags Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
test Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
tmp/modified_authorities
tools Bug 11929: patron modification error shows borrowernumber 2015-06-01 14:28:04 -03:00
virtualshelves Bug 5010: Fix OPACBaseURL to include protocol 2015-06-04 10:00:04 -03:00
xt Bug 13941: [1/2] Test <body> tag with id/class attributes 2015-04-24 09:47:28 -03:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess
.mailmap (RM followup) .mailmap updates 2015-05-22 17:02:21 -03:00
about.pl Bug 13486: Apache version empty in about page if Apache 2.4 2015-05-22 09:33:02 -03:00
changelanguage.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
edithelp.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL.debian
INSTALL.fedora7
INSTALL.opensuse
INSTALL.ubuntu
Koha.pm Bug 7976: DBRev 3.21.00.006 2015-06-05 13:50:43 -03:00
koha_perl_deps.pl
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
LICENSE
mainpage.pl Bug 8007: Discharge - Glue 2015-04-30 12:33:53 -03:00
Makefile.PL Bug 13758: (QA followup) Make Makefile.PL aware of Koha.pm 2015-05-07 11:42:12 -03:00
MANIFEST.SKIP
README
README.robots
rewrite-config.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/