From 6990156df30b54401f8ccd4269fbc32305ea2294 Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@git-test.afi-sa.fr> Date: Mon, 13 Jan 2014 10:02:03 +0000 Subject: [PATCH] Import OPDS : remplacement du titre "import du <date>" par "Ebooks" --- application/modules/admin/controllers/OpdsController.php | 2 +- library/Class/WebService/OPDS/CatalogEntry.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/modules/admin/controllers/OpdsController.php b/application/modules/admin/controllers/OpdsController.php index ec987e02fb7..5768d62fdb4 100644 --- a/application/modules/admin/controllers/OpdsController.php +++ b/application/modules/admin/controllers/OpdsController.php @@ -81,7 +81,7 @@ class Admin_OpdsController extends ZendAfi_Controller_Action { public function importAction() { $this->_helper->getHelper('viewRenderer')->setNoRender(); - if ((!$catalog = Class_OpdsCatalog::getLoader()->find($this->_getParam('id'))) + if ((!$catalog = Class_OpdsCatalog::find($this->_getParam('id'))) || !$this->_getParam('feed') || !$this->_getParam('entry')) { $this->_redirect('/admin/opds/index'); return; diff --git a/library/Class/WebService/OPDS/CatalogEntry.php b/library/Class/WebService/OPDS/CatalogEntry.php index 5065b24e593..550e333841c 100644 --- a/library/Class/WebService/OPDS/CatalogEntry.php +++ b/library/Class/WebService/OPDS/CatalogEntry.php @@ -22,7 +22,7 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R protected $_properties; protected $_isNotice; protected $_files; - + const CATEGORY_LABEL='Ebooks'; public function __construct() { $this->_isNotice = false; $this->_properties = array('id' => null, @@ -60,13 +60,13 @@ class Class_WebService_OPDS_CatalogEntry extends Class_WebService_BibNumerique_R } - public function getRessourceLibelle() { - return sprintf('import opds du %s', date('d M Y')); + public function getRessourceCategorieLibelle() { + return self::CATEGORY_LABEL; } public function fillAlbum($album) { - $album ->setAuteur($this->getAuthor()) + $album->setAuteur($this->getAuthor()) ->beEPUB(); $album->save(); foreach ($this->_files as $file) -- GitLab