check if is an array for hosts.
This commit is contained in:
parent
da175e0702
commit
e38d825896
|
@ -147,13 +147,15 @@ class Show {
|
|||
}
|
||||
}
|
||||
|
||||
//add selected hosts to cc_show_hosts table.
|
||||
foreach ($data['add_show_hosts'] as $host) {
|
||||
$showHost = new CcShowHosts();
|
||||
$showHost->setDbShow($showId);
|
||||
$showHost->setDbHost($host);
|
||||
$showHost->save();
|
||||
}
|
||||
if(is_array($data['add_show_hosts'])) {
|
||||
//add selected hosts to cc_show_hosts table.
|
||||
foreach ($data['add_show_hosts'] as $host) {
|
||||
$showHost = new CcShowHosts();
|
||||
$showHost->setDbShow($showId);
|
||||
$showHost->setDbHost($host);
|
||||
$showHost->save();
|
||||
}
|
||||
}
|
||||
|
||||
Show::populateShowUntilLastGeneratedDate($showId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue