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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 176-181 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
176
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,NULL,'Textarea'),
176
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,NULL,'Textarea'),
177
('MARCOrgCode','OSt','','Define MARC Organization Code - http://www.loc.gov/marc/organizations/orgshome.html','free'),
177
('MARCOrgCode','OSt','','Define MARC Organization Code - http://www.loc.gov/marc/organizations/orgshome.html','free'),
178
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
178
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
179
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
179
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
180
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
180
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
181
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
181
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
182
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 7825-7830 if ( CheckVersion($DBversion) ) { Link Here
7825
}
7825
}
7826
7826
7827
7827
7828
$DBversion = "3.15.00.XXX";
7829
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7830
    $dbh->do(q|
7831
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer')
7832
    |);
7833
    print "Upgrade to $DBversion done (Bug 11343: Add system preference MaxItemsForBatch )\n";
7834
    SetVersion($DBversion);
7835
}
7836
7828
=head1 FUNCTIONS
7837
=head1 FUNCTIONS
7829
7838
7830
=head2 TableExists($table)
7839
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc (+1 lines)
Lines 15-20 Link Here
15
[% IF ( searching ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li>
15
[% IF ( searching ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li>
16
[% IF ( serials ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li>
16
[% IF ( serials ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li>
17
[% IF ( staff_client ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a></li>
17
[% IF ( staff_client ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a></li>
18
[% IF ( tools ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a></li>
18
[% IF ( web_services ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a></li>
19
[% IF ( web_services ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a></li>
19
</ul>
20
</ul>
20
</div>
21
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref (+5 lines)
Line 0 Link Here
1
Tools:
2
    -
3
        - Maximum number of items record to process in a batch (modification or deletion)
4
        - pref: MaxItemsForBatch
5
          class: Integer
(-)a/tools/batchMod.pl (-4 / +3 lines)
Lines 111-117 if ($op eq "action") { Link Here
111
    # Once the job is done
111
    # Once the job is done
112
    if ($completedJobID) {
112
    if ($completedJobID) {
113
	# If we have a reasonable amount of items, we display them
113
	# If we have a reasonable amount of items, we display them
114
	if (scalar(@itemnumbers) <= 1000) {
114
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) {
115
	    $items_display_hashref=BuildItemsData(@itemnumbers);
115
	    $items_display_hashref=BuildItemsData(@itemnumbers);
116
	} else {
116
	} else {
117
	    # Else, we only display the barcode
117
	    # Else, we only display the barcode
Lines 267-274 if ($op eq "show"){ Link Here
267
267
268
    # Flag to tell the template there are valid results, hidden or not
268
    # Flag to tell the template there are valid results, hidden or not
269
    if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); }
269
    if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); }
270
    # Only display the items if there are no more than 1000
270
    # Only display the items if there are no more than pref MaxItemsForBatch
271
    if (scalar(@itemnumbers) <= 1000) {
271
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) {
272
        $items_display_hashref=BuildItemsData(@itemnumbers);
272
        $items_display_hashref=BuildItemsData(@itemnumbers);
273
    } else {
273
    } else {
274
        $template->param("too_many_items" => scalar(@itemnumbers));
274
        $template->param("too_many_items" => scalar(@itemnumbers));
275
- 

Return to bug 11343