Bug 6323 -- Error handling cleanup for moveitem.tt
[koha.git] / cataloguing / addbooks.pl
index b08f1e5..b768a29 100755 (executable)
@@ -14,9 +14,9 @@
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 =head1 cataloguing:addbooks.pl
 
@@ -85,8 +85,11 @@ if ($query) {
 
     # format output
     # SimpleSearch() give the results per page we want, so 0 offet here
-    my $total = scalar @$marcresults;
-    my @newresults = searchResults( $query, $total, $results_per_page, 0, 0, @$marcresults );
+    my $total = @{$marcresults};
+    my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, $marcresults );
+    foreach my $line (@newresults) {
+        if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
+    }
     $template->param(
         total          => $total_hits,
         query          => $query,