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

(-)a/installer/data/mysql/atomicupdate/bug17669.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q|
4
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('Upload_PurgeTemporaryFiles_Days','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer');
5
    |);
6
7
    my ( $cnt ) = $dbh->selectrow_array( "SELECT COUNT(*) FROM uploaded_files WHERE permanent IS NULL or permanent=0" );
8
    if( $cnt ) {
9
        print "NOTE: You have $cnt temporary uploads. You could benefit from setting pref Upload_PurgeTemporaryFiles_Days now to automatically delete them.\n";
10
    }
11
12
    SetVersion( $DBversion );
13
    print "Upgrade to $DBversion done (Bug 17669 - Introduce preference for deleting temporary uploads)\n";
14
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 535-540 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
535
('UniqueItemFields','barcode','','Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'),
535
('UniqueItemFields','barcode','','Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'),
536
('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'),
536
('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'),
537
('UpdateTotalIssuesOnCirc','0',NULL,'Whether to update the totalissues field in the biblio on each circ.','YesNo'),
537
('UpdateTotalIssuesOnCirc','0',NULL,'Whether to update the totalissues field in the biblio on each circ.','YesNo'),
538
('Upload_PurgeTemporaryFiles_Days','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'),
538
('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'),
539
('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'),
539
('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'),
540
('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'),
540
('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
541
('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref (-1 / +6 lines)
Lines 26-28 Tools: Link Here
26
                  staff: "Staff client only"
26
                  staff: "Staff client only"
27
                  both: "Both OPAC and staff client"
27
                  both: "Both OPAC and staff client"
28
            -
28
            -
29
- 
29
    Upload:
30
        -
31
            - Automatically delete temporary uploads older than
32
            - pref: Upload_PurgeTemporaryFiles_Days
33
              class: integer
34
            - "days in cleanup_database cron job. NOTE: If you leave this field empty (zero), the cron job will not delete any files."

Return to bug 17669