check if is an array for hosts.

This commit is contained in:
Naomi 2011-02-11 11:52:11 -05:00
parent da175e0702
commit e38d825896
1 changed files with 9 additions and 7 deletions

View File

@ -147,13 +147,15 @@ class Show {
} }
} }
//add selected hosts to cc_show_hosts table. if(is_array($data['add_show_hosts'])) {
foreach ($data['add_show_hosts'] as $host) { //add selected hosts to cc_show_hosts table.
$showHost = new CcShowHosts(); foreach ($data['add_show_hosts'] as $host) {
$showHost->setDbShow($showId); $showHost = new CcShowHosts();
$showHost->setDbHost($host); $showHost->setDbShow($showId);
$showHost->save(); $showHost->setDbHost($host);
} $showHost->save();
}
}
Show::populateShowUntilLastGeneratedDate($showId); Show::populateShowUntilLastGeneratedDate($showId);
} }