diff --git a/VERSIONS_HOTLINE/82185 b/VERSIONS_HOTLINE/82185 new file mode 100644 index 0000000000000000000000000000000000000000..dd1b387b1f45ca6f6963b7c05ea1984c6b6ec8a8 --- /dev/null +++ b/VERSIONS_HOTLINE/82185 @@ -0,0 +1,2 @@ + - ticket #82185 : Compte lecteur : correction du processus de réservation. + \ No newline at end of file diff --git a/application/modules/admin/controllers/AjaxController.php b/application/modules/admin/controllers/AjaxController.php index 1c2fa3bdc58ecdc455928901c720c285acae17e7..983c3ff7a9ee5b89f89b6a0599f25c8b73464c28 100644 --- a/application/modules/admin/controllers/AjaxController.php +++ b/application/modules/admin/controllers/AjaxController.php @@ -19,8 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Admin_AjaxController extends Zend_Controller_Action { +class Admin_AjaxController extends ZendAfi_Controller_Action { public function preDispatch() { + parent::preDispatch(); $this->getHelper('ViewRenderer')->setNoRender(); } diff --git a/application/modules/admin/controllers/PremierChapitreController.php b/application/modules/admin/controllers/PremierChapitreController.php index 6633d162bbf09d67276957e4a117bf678fda5ad2..b83106bff6a7ac586de856607176ebf41c9e9eb2 100644 --- a/application/modules/admin/controllers/PremierChapitreController.php +++ b/application/modules/admin/controllers/PremierChapitreController.php @@ -40,6 +40,7 @@ class Admin_PremierChapitreController extends ZendAfi_Controller_Action { } public function preDispatch() { + parent::preDispatch(); $no_front_actions = array(); $request = $this->_request; $action = $request->getActionName(); @@ -149,7 +150,7 @@ class Admin_PremierChapitreController extends ZendAfi_Controller_Action { $contenu .= "\t".$this->view->tagAnchor($this->view->url([ 'module' => 'admin', 'controller' => 'premier-chapitre', - 'action' => 'maj-panier-chapitres'],null,true), $majtitre)."\n"; + 'action' => 'maj-panier-chapitres'],null,true), $majtitre)."\n"; $this->view->contenu = $contenu; $this->renderScript('premier-chapitre/generic.phtml'); } diff --git a/application/modules/admin/controllers/StatController.php b/application/modules/admin/controllers/StatController.php index 354192f5bdca0093eebd9c881af2ab5f67926b43..e1ccbef22ece33cc9184e2a2463485e78d7c6ee1 100644 --- a/application/modules/admin/controllers/StatController.php +++ b/application/modules/admin/controllers/StatController.php @@ -28,6 +28,7 @@ class Admin_StatController extends ZendAfi_Controller_Action { public function preDispatch() { + parent::preDispatch(); $this->view->periode = $this->cls_stat->getPeriode(); } diff --git a/application/modules/admin/controllers/UploadController.php b/application/modules/admin/controllers/UploadController.php index e068c49943e4a1d1da83f3c057d99c1fc348b6d7..f7f06234165dcf513d6b9d9c3d8b63ade50a55c3 100644 --- a/application/modules/admin/controllers/UploadController.php +++ b/application/modules/admin/controllers/UploadController.php @@ -20,11 +20,14 @@ */ -class Admin_UploadController extends Zend_Controller_Action { +class Admin_UploadController extends ZendAfi_Controller_Action { + public function preDispatch(){ + parent::preDispatch(); Zend_Layout::startMvc(array()); } + public function multipleAction() { $this->view->headScript() ->appendFile(JQUERY) diff --git a/application/modules/opac/controllers/DatabaseMigrationController.php b/application/modules/opac/controllers/DatabaseMigrationController.php index 733924f12219aa2926e68efc440ab314fadd02bc..748cd48d001f85ce868e71dafe23af6a0bdc1754 100644 --- a/application/modules/opac/controllers/DatabaseMigrationController.php +++ b/application/modules/opac/controllers/DatabaseMigrationController.php @@ -16,21 +16,22 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class DatabaseMigrationController extends Zend_Controller_Action { - use Trait_Translator; +class DatabaseMigrationController extends ZendAfi_Controller_Action { + public function preDispatch() { + parent::preDispatch(); $this->getHelper('ViewRenderer')->setNoRender(); } + public function migrateAction() { $this->reprise=$this->_request->getParam('reprise',0); $this->skip_php=$this->_request->getParam('skip_php',0); $this->getResponse()->setBody($this->view->tagMigration($this->reprise,$this->skip_php)); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/application/modules/opac/controllers/ModulesController.php b/application/modules/opac/controllers/ModulesController.php index 8e5257aa190a92458063577dff8c47e601973622..9999ee9f3ae054ddf3de90eca2ac6785406c000d 100644 --- a/application/modules/opac/controllers/ModulesController.php +++ b/application/modules/opac/controllers/ModulesController.php @@ -22,6 +22,8 @@ class ModulesController extends ZendAfi_Controller_Action { public function preDispatch() { + parent::preDispatch(); + $mapping = ['vodeclic' => 'Vodeclic', 'lesocial' => 'LeSocial', 'mycow' => 'MyCow', diff --git a/application/modules/opac/controllers/NoticeajaxController.php b/application/modules/opac/controllers/NoticeajaxController.php index 748afc908e7ca8a7f034a5047843d41c98c7127e..b0ce3dcd326b03488242db93bbe9ab9a7fd1ae23 100644 --- a/application/modules/opac/controllers/NoticeajaxController.php +++ b/application/modules/opac/controllers/NoticeajaxController.php @@ -19,8 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class NoticeAjaxController extends Zend_Controller_Action { - use Trait_Translator; +class NoticeAjaxController extends ZendAfi_Controller_Action { private $notice; private $notice_html; @@ -34,6 +33,7 @@ class NoticeAjaxController extends Zend_Controller_Action { public function preDispatch() { + parent::preDispatch(); // Desactiver le view renderer normal pour tous les modes sauf notice if ($this->_request->getParam("action") != "notice") { $viewRenderer = $this->getHelper('ViewRenderer'); diff --git a/application/modules/opac/controllers/PremierChapitreController.php b/application/modules/opac/controllers/PremierChapitreController.php index 56a65a0e1e9c482c09e38c5b32bc728ede49e67e..6502f9879ed5e5911feb812958b7ab2e8302091e 100644 --- a/application/modules/opac/controllers/PremierChapitreController.php +++ b/application/modules/opac/controllers/PremierChapitreController.php @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class PremierChapitreController extends Zend_Controller_Action { +class PremierChapitreController extends ZendAfi_Controller_Action { private $active; public function init() { @@ -30,6 +30,7 @@ class PremierChapitreController extends Zend_Controller_Action { } public function preDispatch() { + parent::preDispatch(); $no_front_actions = array("aleatoire", "ajout-frame", "panier"); $request = $this->_request; $action = $request->getActionName(); diff --git a/application/modules/opac/controllers/RechercheController.php b/application/modules/opac/controllers/RechercheController.php index 5e80c02de6f8207b176992597ddadb3024fc00ae..edcd06c27e5c72432686419ce5c6f839c7a78a93 100644 --- a/application/modules/opac/controllers/RechercheController.php +++ b/application/modules/opac/controllers/RechercheController.php @@ -61,6 +61,7 @@ class RechercheController extends ZendAfi_Controller_Action { public function preDispatch() { + parent::preDispatch(); if ('json' === $this->_getParam('format') && 'viewnotice' === $this->_request->getActionName()) $this->_forward('json-record'); diff --git a/tests/application/modules/opac/controllers/RechercheControllerReservationTest.php b/tests/application/modules/opac/controllers/RechercheControllerReservationTest.php index 2d5d41b48b1554a500b0f51b54080d922a6a1716..e92948531b8ed45514568dd96f888d9a9aeae45f 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerReservationTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerReservationTest.php @@ -96,19 +96,26 @@ class RechercheControllerReservationPickupAjaxActionWithChosenPickupTest class RechercheControllerReservationPickupAjaxActionPostTest extends RechercheControllerReservationWithPickupChoiceTestCase { - public function setUp() { - parent::setUp(); + /** @test */ + public function responseShouldRedirectToReservationajaxAction() { $this->postDispatch('recherche/reservation-pickup-ajax', ['id_bib' => 2, 'id_origine' => 12, 'code_annexe' => '36']); + + $this->assertRedirectTo(Class_Url::absolute('/recherche/reservationajax/code_annexe/36')); } /** @test */ - public function responseShouldRedirectToReservationajaxAction() { - $this->assertRedirect(); + public function responseShouldContainsJsonRedirectToReservationajaxAction() { + $this->postDispatch('recherche/reservation-pickup-ajax/render/popup', + ['id_bib' => 2, + 'id_origine' => 12, + 'code_annexe' => '36']); + $json = json_decode($this->_response->getBody(), true); + $this->assertContains('<script>location.reload();</script>', $json['content']); } }