Skip to content

Instantly share code, notes, and snippets.

@stulevine
Created May 6, 2013 16:47
Show Gist options
  • Save stulevine/5526336 to your computer and use it in GitHub Desktop.
Save stulevine/5526336 to your computer and use it in GitHub Desktop.
function device_is_voxserver_compat($dev, $allow_custom = false)
{
if($dev['devtype_group_id'] != VOXSERVERS_DEVICE_GROUP_ID)
return false;
if($allow_custom)
return true;
$dev_config_id = $dev['metadata']['voxserver_sellable_config'];
//make sure $this->configs s initialized.
$this->get_configurations_from_vss();
return (isset($dev_config_id) && !empty($dev_config_id) &&
$dev_config_id !== 'na' &&
array_key_exists($dev_config_id, $this->configs));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment