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

(-)a/installer/data/mysql/atomicupdate/bug_xxxxx.pl (-5 / +4 lines)
Lines 2-9 use Modern::Perl; Link Here
2
use Koha::Installer::Output qw(say_warning say_success say_info);
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
3
4
return {
4
return {
5
    bug_number  => "XXXXX",
5
    bug_number  => "41900",
6
    description => "Add a new syspref for PatronAgeRestriction",
6
    description => "Add a new system preference for PatronAgeRestriction",
7
    up          => sub {
7
    up          => sub {
8
        my ($args) = @_;
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 14-26 return { Link Here
14
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('PatronAgeRestriction', '', NULL, 'Patron\'s maximum age during registration. If empty, no age restriction is applied.', 'Integer')
14
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('PatronAgeRestriction', '', NULL, 'Patron\'s maximum age during registration. If empty, no age restriction is applied.', 'Integer')
15
        }
15
        }
16
        );
16
        );
17
        say $out "Added new syspref 'PatronAgeRestriction'";
17
        say_success( $out, "Added new system preference 'PatronAgeRestriction'" );
18
18
19
        $dbh->do(
19
        $dbh->do(
20
            q{
20
            q{
21
            UPDATE IGNORE systempreferences SET `explanation` = 'Patron\'s maximum age during self registration. If empty, honor PatronAgeRestriction.' WHERE `variable` = 'PatronSelfRegistrationAgeRestriction'
21
            UPDATE IGNORE systempreferences SET `explanation` = 'Patron\'s maximum age during self registration. If empty, honor PatronAgeRestriction.' WHERE `variable` = 'PatronSelfRegistrationAgeRestriction'
22
        }
22
        }
23
        );
23
        );
24
        say $out "Updated explanation for syspref 'PatronSelfRegistrationAgeRestriction'";
24
        say_success( $out, "Updated explanation for system preference 'PatronSelfRegistrationAgeRestriction'" );
25
    },
25
    },
26
};
26
};
27
- 

Return to bug 41814