View | Details | Raw Unified | Return to bug 32432
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_32432.pl (+36 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "32432",
6
    description => "Convert the Syndetics from 1/0 to multiple",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        my ($SyndeticsAuthorNotes) = $dbh->selectrow_array(
12
            q{
13
            SELECT CASE 
14
                WHEN value = '1' THEN 'opac'
15
                WHEN value = '0' THEN ''
16
                ELSE value
17
            END
18
            FROM systempreferences
19
            WHERE variable = 'SyndeticsAuthorNotes'
20
        }
21
        );
22
23
        $dbh->do(
24
            q{
25
            UPDATE systempreferences 
26
            SET type = 'multiple',
27
                options = 'staff|opac',
28
                value = ?
29
            WHERE variable = 'SyndeticsAuthorNotes'
30
        }, undef, $SyndeticsAuthorNotes
31
        );
32
33
        say $out "Updated SyndeticsAuthorNotes system preference";
34
35
    },
36
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 / +1 lines)
Lines 792-798 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
792
('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'),
792
('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'),
793
('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'),
793
('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'),
794
('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'),
794
('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'),
795
('SyndeticsAuthorNotes','0','','Display Notes about the Author on OPAC from Syndetics','YesNo'),
795
('SyndeticsAuthorNotes','','staff|opac','Display Notes about the Author from Syndetics','multiple'),
796
('SyndeticsAwards','0','','Display Awards on OPAC from Syndetics','YesNo'),
796
('SyndeticsAwards','0','','Display Awards on OPAC from Syndetics','YesNo'),
797
('SyndeticsClientCode','0','','Client Code for using Syndetics Solutions content','free'),
797
('SyndeticsClientCode','0','','Client Code for using Syndetics Solutions content','free'),
798
('SyndeticsCoverImages','0','','Display Cover Images from Syndetics','YesNo'),
798
('SyndeticsCoverImages','0','','Display Cover Images from Syndetics','YesNo'),
799
- 

Return to bug 32432