function _hosting_package_instance_languages in Hosting 6.2
Same name and namespace in other branches
- 5 package/hosting_package.instance.inc \_hosting_package_instance_languages()
- 7.4 package/hosting_package.instance.inc \_hosting_package_instance_languages()
- 7.3 package/hosting_package.instance.inc \_hosting_package_instance_languages()
2 calls to _hosting_package_instance_languages()
File
- package/
hosting_package.instance.inc, line 82 - API for mapping packages to various Hosting node types
Code
function _hosting_package_instance_languages($instance) {
if (sizeof($instance->languages)) {
db_query("DELETE FROM {hosting_package_languages} WHERE iid=%d", $instance->iid);
foreach ($instance->languages as $language) {
db_query("INSERT INTO {hosting_package_languages} (iid, language) VALUES (%d, '%s')", $instance->iid, $language);
}
}
// Clear the static cache for languages of package instances.
_hosting_package_instances_load_languages(NULL, TRUE);
}