Created
May 6, 2013 16:47
-
-
Save stulevine/5526336 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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