You are here

function answers_query_question_locked_alter in Answers 7.4

Implements hook_query_TAG_alter().

The 'question_locked' tag modifies the query to return only those questions which are locked.

File

includes/answers.lock.inc, line 153
Question locking functions for the 'Answers' module.

Code

function answers_query_question_locked_alter(QueryAlterableInterface $query) {
  $query
    ->innerJoin('field_data_question_locks', 'l', 'node.nid = l.entity_id AND l.entity_type = :entity_type', array(
    ':entity_type' => 'node',
  ));
}