Dev#17629 domains
Merge request reports
Activity
Filter activity
57 57 } 58 58 } 59 59 60 60 function deletePseudoNotice($id_notice) { 61 sqlExecute("delete from exemplaires where id_notice=$id_notice"); 62 sqlExecute("delete from notices where id_notice=$id_notice"); 63 sqlExecute("delete from notice_domain where notice_id=$id_notice"); 64 } 207 206 ->save(); 207 $this->saveDomains(); 208 } 209 210 211 protected function saveDomains() { 212 if(!array_key_exists('domaine_ids', $this->_datas) || !$this->_datas['domaine_ids']) 213 return $this; 214 215 $domaine_ids = explode(';', $this->_datas['domaine_ids']); 216 217 foreach($domaine_ids as $domain) { 218 $notice_domain = Class_NoticeDomain::newInstance(['domain_id' => $domain, 219 'notice_id' => $this->_notice->getId()]); 220 $notice_domain->save(); 221 } 165 protected function prepareRecordsKeys($records_keys) { 160 166 $keys = []; 161 foreach($cles_notices as $notice) { 162 if (!trim($notice)) 167 foreach($records_keys as $record) { 168 if (!trim($record)) 163 169 continue; 164 $keys[] = "'" . $notice . "'"; 170 $keys[] = "'" . $record . "'"; 165 171 } 172 return $keys; 173 } 166 174 175 176 public function visitClesNotices($cles_notices) { 177 $keys = $this->prepareRecordsKeys($cles_notices); Reassigned to @pbarroca
Please register or sign in to reply