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

(-)a/C4/Members.pm (+7 lines)
Lines 807-812 sub AddMember { Link Here
807
        $data{'dateenrolled'} = C4::Dates->new()->output("iso");
807
        $data{'dateenrolled'} = C4::Dates->new()->output("iso");
808
    }
808
    }
809
809
810
    my $NewPatronPrivacySetting = C4::Context->preference('NewPatronPrivacySetting');
811
    $data{'privacy'} =
812
        $NewPatronPrivacySetting eq 'default' ? 1
813
      : $NewPatronPrivacySetting eq 'never'   ? 2
814
      : $NewPatronPrivacySetting eq 'forever' ? 0
815
      :                                         undef;
816
810
    # create a disabled account if no password provided
817
    # create a disabled account if no password provided
811
    $data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!';
818
    $data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!';
812
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
819
    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 183-188 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
183
('memberofinstitution','0',NULL,'If ON, patrons can be linked to institutions','YesNo'),
183
('memberofinstitution','0',NULL,'If ON, patrons can be linked to institutions','YesNo'),
184
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
184
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
185
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
185
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
186
( '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' ),
186
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
187
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
187
('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'),
188
('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'),
188
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
189
('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+21 lines)
Lines 7778-7783 if(CheckVersion($DBversion)) { Link Here
7778
    SetVersion($DBversion);
7778
    SetVersion($DBversion);
7779
}
7779
}
7780
7780
7781
$DBversion = "3.15.00.XXX";
7782
if ( CheckVersion($DBversion) ) {
7783
    $dbh->do(q{
7784
        INSERT INTO systempreferences (
7785
            variable,
7786
            value,
7787
            options,
7788
            explanation,
7789
            type
7790
        ) VALUES (
7791
            'NewPatronPrivacySetting',
7792
            'default',
7793
            'default|never|forever',
7794
            "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.",
7795
            'Choice'
7796
        )
7797
    });
7798
    print "Upgrade to $DBversion done (Bug 6254 - can't set patron privacy by default)\n";
7799
    SetVersion($DBversion);
7800
}
7801
7781
=head1 FUNCTIONS
7802
=head1 FUNCTIONS
7782
7803
7783
=head2 TableExists($table)
7804
=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