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

(-)a/C4/Members.pm (+6 lines)
Lines 770-775 sub AddMember { Link Here
770
    $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
770
    $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
771
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
771
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
772
772
773
    my $NewPatronPrivacySetting = C4::Context->preference('NewPatronPrivacySetting');
774
    $data{'privacy'} =
775
        $NewPatronPrivacySetting eq 'default' ? 1
776
      : $NewPatronPrivacySetting eq 'never'   ? 2
777
      : $NewPatronPrivacySetting eq 'forever' ? 0
778
      :                                         undef;
773
779
774
    # mysql_insertid is probably bad.  not necessarily accurate and mysql-specific at best.
780
    # mysql_insertid is probably bad.  not necessarily accurate and mysql-specific at best.
775
    logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog");
781
    logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog");
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 427-429 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
430
INSERT INTO systempreferences ( variable, value, options, explanation, type ) VALUES ( 'NewPatronPrivacySetting', 'default', 'default|never|forever', "Define the default borrower.privacy setting for new patrons, i.e. how long do we keep a patron's issue history. 1 = default, 2 = never, 0 = forever.", 'Choice' );
(-)a/installer/data/mysql/updatedatabase.pl (+21 lines)
Lines 7010-7015 CREATE TABLE IF NOT EXISTS borrower_files ( Link Here
7010
    SetVersion($DBversion);
7010
    SetVersion($DBversion);
7011
}
7011
}
7012
7012
7013
$DBversion = "3.13.00.XXX";
7014
if ( CheckVersion($DBversion) ) {
7015
    $dbh->do(q{
7016
        INSERT INTO systempreferences (
7017
            variable,
7018
            value,
7019
            options,
7020
            explanation,
7021
            type
7022
        ) VALUES (
7023
            'NewPatronPrivacySetting',  
7024
            'default',  
7025
            'default|never|forever',  
7026
            "Define the default borrower.privacy setting for new patrons, i.e. how long do we keep a patron's issue history. 1 = default, 2 = never, 0 = forever.",  
7027
            'Choice'
7028
        )
7029
    });
7030
    print "Upgrade to $DBversion done (Bug 6254 - can't set patron privacy by default)\n";
7031
    SetVersion($DBversion);
7032
}
7033
7013
=head1 FUNCTIONS
7034
=head1 FUNCTIONS
7014
7035
7015
=head2 TableExists($table)
7036
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +7 lines)
Lines 139-141 Patrons: Link Here
139
               yes: Do
139
               yes: Do
140
               no: "Don't"
140
               no: "Don't"
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
142
- 
142
     -
143
         - New patrons should have a privacy setting of 
144
         - pref: NewPatronPrivacySetting
145
           choices:
146
               default: default 
147
               never: never
148
               forever: forever

Return to bug 6254