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

(-)a/C4/Members.pm (-1 / +7 lines)
Lines 766-776 sub AddMember { Link Here
766
        $data{'dateenrolled'} = C4::Dates->new()->output("iso");
766
        $data{'dateenrolled'} = C4::Dates->new()->output("iso");
767
    }
767
    }
768
768
769
    my $NewPatronPrivacySetting = C4::Context->preference('NewPatronPrivacySetting');
770
    $data{'privacy'} =
771
        $NewPatronPrivacySetting eq 'default' ? 1
772
      : $NewPatronPrivacySetting eq 'never'   ? 2
773
      : $NewPatronPrivacySetting eq 'forever' ? 0
774
      :                                         undef;
775
769
    # create a disabled account if no password provided
776
    # create a disabled account if no password provided
770
    $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
777
    $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
771
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
778
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
772
779
773
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");
776
    
782
    
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 428-430 INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V Link Here
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,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
430
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
431
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 (-1 / +22 lines)
Lines 7036-7042 if ( CheckVersion($DBversion) ) { Link Here
7036
    SetVersion($DBversion);
7036
    SetVersion($DBversion);
7037
}
7037
}
7038
7038
7039
7040
$DBversion = "3.13.00.012";
7039
$DBversion = "3.13.00.012";
7041
if ( CheckVersion($DBversion) ) {
7040
if ( CheckVersion($DBversion) ) {
7042
    $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
7041
    $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
Lines 7044-7049 if ( CheckVersion($DBversion) ) { Link Here
7044
    SetVersion($DBversion);
7043
    SetVersion($DBversion);
7045
}
7044
}
7046
7045
7046
7047
$DBversion = "3.13.00.XXX";
7048
if ( CheckVersion($DBversion) ) {
7049
    $dbh->do(q{
7050
        INSERT INTO systempreferences (
7051
            variable,
7052
            value,
7053
            options,
7054
            explanation,
7055
            type
7056
        ) VALUES (
7057
            'NewPatronPrivacySetting',
7058
            'default',
7059
            'default|never|forever',
7060
            "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.",
7061
            'Choice'
7062
        )
7063
    });
7064
    print "Upgrade to $DBversion done (Bug 6254 - can't set patron privacy by default)\n";
7065
    SetVersion($DBversion);
7066
}
7067
7047
=head1 FUNCTIONS
7068
=head1 FUNCTIONS
7048
7069
7049
=head2 TableExists($table)
7070
=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