You are here

function globallink_pending_submission_exists in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink.inc \globallink_pending_submission_exists()

Checks to see if a pending submission exists.

Return value

True if the submission exists.

File

./globallink.inc, line 635
Miscellaneous GlobalLink functions for node translations (non-entity).

Code

function globallink_pending_submission_exists() {
  $result = db_select('globallink_core', 'tc')
    ->fields('tc')
    ->condition('status', array(
    'Sent for Translations',
    'Error',
  ), 'IN')
    ->execute();
  foreach ($result as $row) {
    if (isset($row)) {
      return TRUE;
    }
  }
  return FALSE;
}