You are here

function lingotek_count_nodes in Lingotek Translation 7.2

The number of nodes with the status sync counts from the lingotek table for the LANGUAGE TARGETS.

1 call to lingotek_count_nodes()
lingotek_get_source_language_json in ./lingotek.dashboard.inc
Outputs the language code with page count in json format. Supplied to the dashboard. Output Format: {'code':'en','docs':'500'}

File

./lingotek.dashboard.inc, line 257
Lingotek Dashboard.

Code

function lingotek_count_nodes($status) {

  //LINGOTEK_NODE_SYNC_STATUS_EDITED, LINGOTEK_NODE_SYNC_STATUS_PENDING, LINGOTEK_NODE_SYNC_STATUS_CURRENT
  $query = db_select('lingotek', 'l')
    ->fields('l');
  $query
    ->condition('lingokey', 'node_sync_status');
  $query
    ->condition('lingovalue', $status);
  $result = $query
    ->countQuery()
    ->execute()
    ->fetchField();
  return $result;
}