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

(-)a/installer/data/mysql/atomicupdate/bug_15504-add-tracklastpatronactivityoptions.pl (-2 / +7 lines)
Lines 7-14 return { Link Here
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        # Get existing value from the TrackLastPatronActivity system preference
11
        my ($tracklastactivity) = $dbh->selectrow_array( q|
12
            SELECT value FROM systempreferences WHERE variable='TrackLastPatronActivity';
13
        |);
14
15
        my $triggers = $tracklastactivity ? 'check_out,connection,login' : '';
10
        $dbh->do(
16
        $dbh->do(
11
            q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('TrackLastPatronActivityTriggers','',NULL,'If set, the field borrowers.lastseen will be updated every time a patron is does a selected option','multiple') }
17
            qq{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('TrackLastPatronActivityTriggers',$triggers,NULL,'If set, the field borrowers.lastseen will be updated every time a patron is does a selected option','multiple') }
12
        );
18
        );
13
19
14
        say $out "Added system preference 'TrackLastPatronActivityTriggers'";
20
        say $out "Added system preference 'TrackLastPatronActivityTriggers'";
15
- 

Return to bug 15504