From 90633ee61f3da9179a7cc8735034528a44bb7be7 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 13 Mar 2012 11:41:57 +0100 Subject: [PATCH 1/2] Fix add in basket --- www/client/answer.php | 2 +- www/client/baskets.php | 4 ++-- www/client/index.php | 2 +- www/client/jquery.p4client.1.0.js | 4 ++-- www/prod/page0.js | 4 ++++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/www/client/answer.php b/www/client/answer.php index e121d22376..4a1a781490 100644 --- a/www/client/answer.php +++ b/www/client/answer.php @@ -431,7 +431,7 @@ $npages = $result->get_total_pages(); has_right_on_base($record->get_base_id(), "canputinalbum")) { - ?>
get_session(); $usr_id = $session->get_usr_id(); $request = http_request::getInstance(); -$parm = $request->get_parms("bas", "courChuId", "act", "p0", "first"); +$parm = $request->get_parms("sbas", "courChuId", "act", "p0", "first"); $parm['p0'] = utf8_decode($parm['p0']); @@ -41,7 +41,7 @@ if ($parm["act"] == "DELIMG" && $parm["p0"] != "") if ($parm["act"] == "ADDIMG" && ($parm["p0"] != "" && $parm["p0"] != null)) { $basket = basket_adapter::getInstance($appbox, $parm['courChuId'], $user->get_id()); - $sbas_id = phrasea::sbasFromBas($parm['bas']); + $sbas_id = (int) $parm['sbas']; $record = new record_adapter($sbas_id, $parm['p0']); $basket->push_element($record, false, false); unset($record); diff --git a/www/client/index.php b/www/client/index.php index a88d29b051..e94215a179 100644 --- a/www/client/index.php +++ b/www/client/index.php @@ -588,7 +588,7 @@ if ($cssfile)