function oauth_common_edit_form_context_exists in OAuth 1.0 7.4
Same name and namespace in other branches
- 7.3 oauth_common.admin.inc \oauth_common_edit_form_context_exists()
Check whether a given context exists.
Parameters
$name the name parameter for the context.:
Return value
boolean
1 string reference to 'oauth_common_edit_form_context_exists'
- oauth_common_edit_form_context in ./
oauth_common.admin.inc - Form to edit the settings of an context.
File
- ./
oauth_common.admin.inc, line 409
Code
function oauth_common_edit_form_context_exists($name) {
$exists = FALSE;
if (!empty($name)) {
$result = db_query('SELECT cid FROM {oauth_common_context} WHERE name = :name', array(
':name' => $name,
))
->fetchField();
$exists = $result ? TRUE : FALSE;
}
return $exists;
}