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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 177-182 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
177
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,NULL,'Textarea'),
177
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,NULL,'Textarea'),
178
('MARCOrgCode','OSt','','Define MARC Organization Code - http://www.loc.gov/marc/organizations/orgshome.html','free'),
178
('MARCOrgCode','OSt','','Define MARC Organization Code - http://www.loc.gov/marc/organizations/orgshome.html','free'),
179
('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
('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'),
180
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
180
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
181
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
181
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
182
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
182
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
183
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 7885-7890 if(CheckVersion($DBversion)) { Link Here
7885
    SetVersion($DBversion);
7885
    SetVersion($DBversion);
7886
}
7886
}
7887
7887
7888
$DBversion = "3.15.00.XXX";
7889
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7890
    $dbh->do(q|
7891
        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')
7892
    |);
7893
    print "Upgrade to $DBversion done (Bug 11343: Add system preference MaxItemsForBatch )\n";
7894
    SetVersion($DBversion);
7895
}
7896
7888
=head1 FUNCTIONS
7897
=head1 FUNCTIONS
7889
7898
7890
=head2 TableExists($table)
7899
=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