function globallink_taxonomy_clear_cancelled_documents in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.5 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_clear_cancelled_documents()
Clears cancelled taxonomy documents.
Return value
int Number of cancelled taxonomy documents.
1 call to globallink_taxonomy_clear_cancelled_documents()
- globallink_taxonomy_active_form_submit in globallink_taxonomy/
globallink_taxonomy_active_submissions.inc - Handles submission of active taxonomy form.
File
- globallink_taxonomy/
globallink_taxonomy.inc, line 1385
Code
function globallink_taxonomy_clear_cancelled_documents() {
$count = 0;
$query = db_select('globallink_core_taxonomy', 'tc')
->fields('tc', array(
'submission_ticket',
))
->distinct()
->condition('status', 'Cancelled', '=');
$results = $query
->execute();
foreach ($results as $item) {
globallink_taxonomy_update_submission_status($item->submission_ticket, 'Pending Translations');
$count++;
}
return $count;
}