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

(-)a/tools/batchMod.pl (-13 / +20 lines)
Lines 113-132 if ($op eq "action") { Link Here
113
    my $marcitem;
113
    my $marcitem;
114
114
115
    # Once the job is done
115
    # Once the job is done
116
    if ($completedJobID) {
116
    if ($completedJobID || !$runinbackground) {
117
	# If we have a reasonable amount of items, we display them
117
        # If we have a reasonable amount of items, we display them
118
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsToDisplayForBatchDel") // 1000 ) ) {
118
        if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsToDisplayForBatchDel") // 1000 ) ) {
119
	    $items_display_hashref=BuildItemsData(@itemnumbers);
119
            $items_display_hashref=BuildItemsData(@itemnumbers);
120
	} else {
120
        } else {
121
	    # Else, we only display the barcode
121
            # Else, we only display the barcode
122
	    my @simple_items_display = map {{ itemnumber => $_, barcode => (GetBarcodeFromItemnumber($_) or ""), biblionumber => (GetBiblionumberFromItemnumber($_) or "") }} @itemnumbers;
122
            my @simple_items_display = map{
123
	    $template->param("simple_items_display" => \@simple_items_display);
123
                {
124
	}
124
                    itemnumber   => $_,
125
                    barcode      => (GetBarcodeFromItemnumber($_) or ""),
126
                    biblionumber => (GetBiblionumberFromItemnumber($_) or "")
127
                }
128
            } @itemnumbers;
129
            $template->param("simple_items_display" => \@simple_items_display);
130
        }
131
    }
125
132
126
	# Setting the job as done
133
    if ($completedJobID) {
127
	my $job = C4::BackgroundJob->fetch($sessionID, $completedJobID);
134
        # Setting the job as done
135
        my $job = C4::BackgroundJob->fetch($sessionID, $completedJobID);
128
136
129
	# Calling the template
137
        # Calling the template
130
        add_saved_job_results_to_template($template, $completedJobID);
138
        add_saved_job_results_to_template($template, $completedJobID);
131
139
132
    } else {
140
    } else {
133
- 

Return to bug 17240