You are here

function answers_reset_question_locks in Answers 7.2

Same name and namespace in other branches
  1. 6.2 includes/answers.lock.inc \answers_reset_question_locks()
  2. 7.3 includes/answers.lock.inc \answers_reset_question_locks()

File

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

Code

function answers_reset_question_locks() {
  $modules = module_implements('answers_lock_question_p');
  $result = db_query("SELECT * from {node} WHERE type = 'question';");
  foreach ($result as $question) {
    $question = node_load($question->nid);
    if (answers_lock_question_p($question, $modules)) {
      answers_lock_question($question);
    }
    else {
      answers_unlock_question($question);
    }
  }
}