Bug 8849 - Error log generated when not a demo system

Changed two lines similar to:
   unless (C4::Context->config('demo') == 1) {
into lines similar to:
   unless (C4::Context->config('demo')) {
By removing the == 1, undefined = false without an error. The
value of demo is supposedly set by a koha-conf.xml variable,
but there is very little documentation on this "demo mode"
beyond the set it to 1 in koha conf for demo mode.  Also, demo
doesn't exist in the default koha-conf.xml file generated.
So anyone who knows to create it, will likely create it the
proper way and with the proper value.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Mark Tompsett 2012-10-01 16:29:22 +08:00 committed by Paul Poulain
parent d1f67b1034
commit b570a76064

View file

@ -149,7 +149,7 @@ if ($op eq 'add_form') {
my $repeatable = $input->param('repeatable') ? 1 : 0;
my $mandatory = $input->param('mandatory') ? 1 : 0;
my $authorised_value = $input->param('authorised_value');
unless (C4::Context->config('demo') == 1) {
unless (C4::Context->config('demo')) {
if ($input->param('modif')) {
$sth = $dbh->prepare(
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=? WHERE frameworkcode=? AND tagfield=?"
@ -194,7 +194,7 @@ if ($op eq 'add_form') {
################## DELETE_CONFIRMED ##################################
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
unless (C4::Context->config('demo') == 1) {
unless (C4::Context->config('demo')) {
my $sth1 = $dbh->prepare("DELETE FROM marc_tag_structure WHERE tagfield=? AND frameworkcode=?");
my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?");
$sth1->execute($searchfield, $frameworkcode);