function kaltura_remove_existing_entries in Kaltura 6
Same name and namespace in other branches
- 5 includes/kaltura.admin.inc \kaltura_remove_existing_entries()
- 6.2 includes/kaltura.admin.inc \kaltura_remove_existing_entries()
- 7.2 includes/kaltura.admin.inc \kaltura_remove_existing_entries()
1 call to kaltura_remove_existing_entries()
- kaltura_import_entries_page in includes/
kaltura.admin.inc
File
- includes/
kaltura.admin.inc, line 664
Code
function kaltura_remove_existing_entries($entries) {
$count = 0;
$new_entries = array();
if (is_array($entries) && count($entries)) {
foreach ($entries as $entry) {
$sel = 'SELECT COUNT(nid) n FROM {node_kaltura} WHERE kaltura_entryId = \'%s\'';
$result = db_fetch_object(db_query($sel, $entry['id']));
if ($result->n == 0) {
$new_entries[] = $entry;
}
else {
$count++;
}
}
}
return $new_entries;
}