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.
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);
}