You are here

function _disqus_migrate_last_synced_time in Disqus 6

Helper function to get the timestamp of the last synced comment

2 calls to _disqus_migrate_last_synced_time()
disqus_migrate_cron in ./disqus_migrate.module
Implementation of hook_cron
_disqus_migrate_import_now in include/disqus_migrate.import.inc
Submit handler for performing an on-demand import

File

./disqus_migrate.module, line 128

Code

function _disqus_migrate_last_synced_time() {

  // Get the timestamp of the comment that was synced last (if at all)
  $last_synced_time = db_result(db_query("SELECT MAX(c.timestamp) FROM {comments} c INNER JOIN {disqus_migrate} dm ON c.cid = dm.cid"));
  if (empty($last_synced_time)) {
    $last_synced_time = 0;
  }
  return $last_synced_time;
}