Skip to content
Snippets Groups Projects
Commit 5948b382 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

fix fatal error on noticeDomain update domain

parent cdc54ea3
Branches
Tags
1 merge request!715Master
......@@ -91,39 +91,13 @@ class NoticeDomainLoader extends Storm_Model_Loader {
public function updateRecordsFacette($domain_id) {
foreach(Class_NoticeDomain::getRecordsForDomain($domain_id) as $record) {
$record->updateFacette(Class_Catalogue::find($domain_id)->getFacette())->save();
if($catalogue = Class_Catalogue::find($domain_id)) {
foreach(Class_NoticeDomain::getRecordsForDomain($domain_id) as $record)
$record->updateFacette($catalogue->getFacette())->save();
}
}
/* public function deleteRecordsFacetteForDomain($domain_id) { */
/* if (!Class_Catalogue::find($domain_id)) */
/* return; */
/* if (!$records = Class_NoticeDomain::getRecordsForDomain($domain_id)) */
/* return; */
/* foreach($records as $record) { */
/* $record->deleteFacettes(Class_Catalogue::find($domain_id)->getFacette())->save(); */
/* } */
/* } */
/* public function deleteRecordsFacetteForCart($domain_id, $cart_id) { */
/* if (!Class_PanierNotice::find($cart_id)) */
/* return; */
/* if (!$records = Class_NoticeDomain::getRecordsForCart($cart_id)) */
/* return; */
/* foreach($records as $record) { */
/* $record->deleteFacettes(Class_Catalogue::find($domain_id)->getFacette())->save(); */
/* Class_NoticeDomain::updateRecordsFacette($domain_id); */
/* } */
/* } */
public function deleteByCart($id_cart, $attributs = []) {
$notices_domains = Class_NoticeDomain::findAllBy(array_merge(['panier_id' => $id_cart],
$attributs));
......
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