From fafaff8a72df45165f8f22d0375e65061f9dc1b7 Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@afi-sa.fr> Date: Tue, 12 Oct 2021 16:47:41 +0200 Subject: [PATCH] merge old branch artips --- FEATURES/115382 | 10 ++++++++++ VERSIONS_WIP/115382 | 1 + library/Class/WebService/OPDS/CatalogReader.php | 1 - library/digital_resources/Syracuse/Config.php | 3 ++- .../Syracuse/controllers/AuthController.php | 7 +++---- .../opac/controllers/CasServerControllerTest.php | 2 +- tests/library/Class/MoteurRechercheTest.php | 6 ++++-- 7 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 FEATURES/115382 create mode 100644 VERSIONS_WIP/115382 diff --git a/FEATURES/115382 b/FEATURES/115382 new file mode 100644 index 00000000000..d6f2da636df --- /dev/null +++ b/FEATURES/115382 @@ -0,0 +1,10 @@ + '115382' => + ['Label' => this->_('Connecteur Artips') + 'Desc' => $this->_('Artips propose des anecdotes à propos d\'œuvres d\'art'), + 'Image' => '', + 'Video' => '', + 'Category' => 'Connecteurs', + 'Right' => function($feature_description, $user) {return true;}, + 'Wiki' => 'https://wiki.bokeh-library-portal.org/index.php?title=Artips', + 'Test' => '', + 'Date' => '2021-07-01'], \ No newline at end of file diff --git a/VERSIONS_WIP/115382 b/VERSIONS_WIP/115382 new file mode 100644 index 00000000000..9034bb6e998 --- /dev/null +++ b/VERSIONS_WIP/115382 @@ -0,0 +1 @@ + - ticket #115382 : Ressource numérique: ajout d'un connecteur Artips. \ No newline at end of file diff --git a/library/Class/WebService/OPDS/CatalogReader.php b/library/Class/WebService/OPDS/CatalogReader.php index 80ac57abada..d713236fdfb 100644 --- a/library/Class/WebService/OPDS/CatalogReader.php +++ b/library/Class/WebService/OPDS/CatalogReader.php @@ -102,7 +102,6 @@ class Class_WebService_OPDS_CatalogReader { return; } - if(array_key_exists('REL', $attributes) && ('http://opds-spec.org/image/thumbnail' == $attributes['REL'])) $this->_current_entry->setThumbnail($attributes['HREF']); diff --git a/library/digital_resources/Syracuse/Config.php b/library/digital_resources/Syracuse/Config.php index 6965a2b0721..5fe9cfb09e9 100644 --- a/library/digital_resources/Syracuse/Config.php +++ b/library/digital_resources/Syracuse/Config.php @@ -52,6 +52,7 @@ class Syracuse_Config extends Class_DigitalResource_Config { public function renderCustomDiagOn($view) { return (new Syracuse_View_Helper_Dashboard) + ->setView($view) ->dashboard(); } @@ -71,4 +72,4 @@ class Syracuse_Config extends Class_DigitalResource_Config { } } -?> \ No newline at end of file +?> diff --git a/library/digital_resources/Syracuse/controllers/AuthController.php b/library/digital_resources/Syracuse/controllers/AuthController.php index 4379407ee47..199aea5c118 100644 --- a/library/digital_resources/Syracuse/controllers/AuthController.php +++ b/library/digital_resources/Syracuse/controllers/AuthController.php @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - class Syracuse_Plugin_AuthController extends Class_DigitalResource_Controller { + public function servicevalidateAction() { $service = $this->_request->getParam('service'); $ticket = $this->_request->getParam('ticket'); @@ -46,9 +46,8 @@ class Syracuse_Plugin_AuthController extends Class_DigitalResource_Controller { return $group->getLibelle(); }, $user->getUserGroups()) - ]; - + ]; return $this->_helper->casValidResponse($user, $ticket, $attributes); } } -?> \ No newline at end of file +?> diff --git a/tests/application/modules/opac/controllers/CasServerControllerTest.php b/tests/application/modules/opac/controllers/CasServerControllerTest.php index 8cec05bfc82..de7c2dc5ca2 100644 --- a/tests/application/modules/opac/controllers/CasServerControllerTest.php +++ b/tests/application/modules/opac/controllers/CasServerControllerTest.php @@ -32,6 +32,7 @@ class CasServerControllerValidateActionTest extends AbstractControllerTestCase { $time_source = new TimeSourceForTest('2021-08-01'); Class_Users::newInstanceWithId(300, ['login' => '87364', + 'pseudo' => 'georges']); (new Storm_Cache())->save('300', md5(Zend_Session::getId().'300')); @@ -92,7 +93,6 @@ class CasServerControllerValidateActionTest extends AbstractControllerTestCase { * @test */ public function validateOnCasOneZeroWithValidTicketShouldAnswerYesLFUsernameLogin() { - $this->dispatch(sprintf('/opac/cas-server-v10/validate?ticket=ST-%s&service=%s', md5(Zend_Session::getId().'300'), urlencode('http://test.com'))); diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php index 4ed7230f151..78c33f57da8 100644 --- a/tests/library/Class/MoteurRechercheTest.php +++ b/tests/library/Class/MoteurRechercheTest.php @@ -341,12 +341,14 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { [['expressionRecherche' => '', 'digital_lib' => '1'], 'nb_mots'=> 0, - 'req_liste' => $this->listSqlWith("(type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Arkhenum','Assimil','Bacon','Cvs','DiMusic','Kidilangues','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','MaPetiteMediatheque','Mobidys','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre','Whisperies'))")], + + 'req_liste' => $this->listSqlWith("(type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Arkhenum','Artips','Assimil','Bacon','Cvs','DiMusic','Kidilangues','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','MaPetiteMediatheque','Mobidys','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre','Whisperies'))")], [['expressionRecherche' => 'logo', 'digital_lib' => '1'], 'nb_mots'=> 1, - 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Arkhenum','Assimil','Bacon','Cvs','DiMusic','Kidilangues','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','MaPetiteMediatheque','Mobidys','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre','Whisperies'))", + + 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Arkhenum','Artips','Assimil','Bacon','Cvs','DiMusic','Kidilangues','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','MaPetiteMediatheque','Mobidys','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre','Whisperies'))", "(MATCH(titres) AGAINST(' LOGO') * 1.5) + (MATCH(auteurs) AGAINST(' LOGO')) desc")], [['expressionRecherche' => '', -- GitLab