Bug 8255: allow local cover images to be cached
[koha_gimpoz] / acqui / basketheader.pl
index 56f2483..b33e4ef 100755 (executable)
@@ -16,9 +16,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
 
@@ -33,9 +33,9 @@ notes to the supplier, local notes, and the contractnumber, which identifies the
 
 =over 4
 
-=item supplierid
+=item booksellerid
 
-C<$supplierid> is the id of the supplier we add the basket to.
+C<$booksellerid> is the id of the supplier we add the basket to.
 
 =item basketid
 
@@ -99,7 +99,7 @@ if ( $op eq 'add_form' ) {
     my $count = scalar @contractloop;
     if ( $count > 0) {
         $template->param(contractloop => \@contractloop,
-                                           basketcontractnumber => $basket->{'contractnumber'});
+                         basketcontractnumber => $basket->{'contractnumber'});
     }
     $template->param( add_form => 1,
                     basketname => $basket->{'basketname'},
@@ -112,13 +112,14 @@ if ( $op eq 'add_form' ) {
 #End Edit
 } elsif ( $op eq 'add_validate' ) {
 #we are confirming the changes, save the basket
-    $template->param(add_validate => 1);
+    my $basketno;
     if ( $is_an_edit ) {
+        $basketno = $input->param('basketno');
         ModBasketHeader($input->param('basketno'),$input->param('basketname'),$input->param('basketnote'),$input->param('basketbooksellernote'),$input->param('basketcontractnumber'));
-        $template->param( basketno => $basketno );
     } else { #New basket
-        my $basketno = NewBasket($booksellerid, $loggedinuser, $input->param('basketname'), $input->param('basketnote'), $input->param('basketbooksellernote'), $input->param('basketcontractnumber'));
-        $template->param( basketno => $basketno );
+        $basketno = NewBasket($booksellerid, $loggedinuser, $input->param('basketname'), $input->param('basketnote'), $input->param('basketbooksellernote'), $input->param('basketcontractnumber'));
     }
+    print $input->redirect('basket.pl?basketno='.$basketno);
+    exit 0;
 }
 output_html_with_http_headers $input, $cookie, $template->output;