update sample news on new install with koha-community.org urls
[koha.git] / acqui / neworderbiblio.pl
index 471af4a..09709d7 100755 (executable)
@@ -17,9 +17,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 NAME
 
@@ -56,6 +56,7 @@ the basket number to know on which basket this script have to add a new order.
 =cut
 
 use strict;
+#use warnings; FIXME - Bug 2505
 
 use C4::Search;
 use CGI;
@@ -107,19 +108,15 @@ if (defined $error) {
 my @results;
 
 if ($marcresults) {
-    foreach my $i ( 0 .. scalar @$marcresults ) {
-        my %resultsloop;
-        my $marcrecord = MARC::File::USMARC::decode( $marcresults->[$i] );
+    foreach my $result ( @{$marcresults} ) {
+        my $marcrecord = MARC::File::USMARC::decode( $result );
         my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
 
-        #build the hash for the template.
-        %resultsloop = %$biblio;
-        $resultsloop{highlight} = ( $i % 2 ) ? (1) : (0);
-        $resultsloop{booksellerid} = $booksellerid;
-        push @results, \%resultsloop;
+        $biblio->{booksellerid} = $booksellerid;
+        push @results, $biblio;
+
     }
 }
-
 $template->param(
     basketno             => $basketno,
     booksellerid     => $bookseller->{'id'},
@@ -127,7 +124,7 @@ $template->param(
     resultsloop          => \@results,
     total                => $total_hits,
     query                => $query,
-    pagination_bar       => pagination_bar( "$ENV{'SCRIPT_NAME'}?q=$query&booksellerid=$booksellerid&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
+    pagination_bar       => pagination_bar( "$ENV{'SCRIPT_NAME'}?q=$query&booksellerid=$booksellerid&basketno=$basketno&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
 );
 
 # BUILD THE TEMPLATE