Skip to content
Snippets Groups Projects
Commit a6494c5f authored by Julian Maurice's avatar Julian Maurice
Browse files

hotline #13749 Do not index not visible albums

parent 6eb8d00d
4 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!180Master,!137Master,!127Hotline 6.43
......@@ -420,6 +420,10 @@ class Class_Indexation_PseudoNotice_Album extends Class_Indexation_PseudoNotice{
foreach ($this->_model->getRessources() as $ressource)
$visitor->visitRessource($ressource);
}
public function isValid() {
return null != $this->_model && $this->_model->isVisible();
}
}
......
......@@ -412,4 +412,18 @@ class RechercheControllerAlbumAudioRecordAsTelephoneViewRessourcesNumeriquesTest
$this->assertXPathContentContains('//ol//li', 'The prophecy');
}
}
?>
\ No newline at end of file
class RechercheControllerAlbumAudioRecordNotVisibleTest extends RechercheControllerAlbumAudioRecordTestCase {
/** @test */
public function noNoticeShouldBeCreated() {
Class_Album::find(4)
->setVisible(false)
->index();
$this->assertEmpty(Class_Notice::findAll());
}
}
?>
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