function globallink_pending_submission_exists_for_content_type in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_pending_submission_exists_for_content_type()
- 7.6 globallink.inc \globallink_pending_submission_exists_for_content_type()
Checks to see if a pending submission exists for a specified content type.
Parameters
string $type: The content type.
Return value
True if the submission exists.
2 calls to globallink_pending_submission_exists_for_content_type()
- globallink_entity_form_node_type_form_validate in globallink_entity/
globallink_entity.module - globallink_form_node_type_form_validate in ./
globallink.module - Validation to check if any active submission exists for this content type. Only if there is a change in multilingual options.
File
- ./
globallink.inc, line 659 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_pending_submission_exists_for_content_type($type) {
$result = db_select('globallink_core', 'tc')
->fields('tc')
->condition('status', array(
'Sent for Translations',
'Error',
), 'IN')
->condition('type', $type, '=')
->execute();
foreach ($result as $row) {
return TRUE;
}
return FALSE;
}