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 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 ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7783
    $dbh->do(q|
7784
        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')
7785
    |);
7786
    print "Upgrade to $DBversion done (Bug 11343: Add system preference MaxItemsForBatch )\n";
7787
    SetVersion($DBversion);
7788
}
7789
7781
=head1 FUNCTIONS
7790
=head1 FUNCTIONS
7782
7791
7783
=head2 TableExists($table)
7792
=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/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