diff --git a/application/modules/admin/controllers/OpdsController.php b/application/modules/admin/controllers/OpdsController.php index ec987e02fb7cd30e32a790add7e7d0c500603f64..5768d62fdb452b7c500a9e8bb8443553564d3b01 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 5065b24e593e596c19446782870f452419c2ecd1..550e333841ce4218b73f6b020a79091c221d5ddd 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)