Skip to content
Snippets Groups Projects
Commit 679b0465 authored by llaffont's avatar llaffont
Browse files

OPDS: réutilise la catégorie d'import du jour si existe déjà

parent 1b2ae0d7
Branches
Tags
No related merge requests found
......@@ -54,8 +54,10 @@ class Class_WebService_OPDS_CatalogEntry {
public function import() {
$category = Class_AlbumCategorie::getLoader()->newInstance()
->setLibelle(sprintf('import opds du %s', date('d M Y')));
$libelle = sprintf('import opds du %s', date('d M Y'));
if (!$category = Class_AlbumCategorie::getLoader()->findFirstBy(array('libelle' => $libelle)))
$category = Class_AlbumCategorie::getLoader()->newInstance()->setLibelle($libelle);
$category->save();
$album = Class_Album::getLoader()->newInstance()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment