function answers_unlock_question in Answers 7.3
Same name and namespace in other branches
- 6.2 includes/answers.lock.inc \answers_unlock_question()
- 7.2 includes/answers.lock.inc \answers_unlock_question()
Unlock a question.
Parameters
object $question: A fully loaded question node.
2 calls to answers_unlock_question()
- answers_reset_question_lock in includes/
answers.lock.inc - Reset the question lock for a single question.
- answers_reset_question_locks in includes/
answers.lock.inc - Cycle through all questions and reset their locks.
File
- includes/
answers.lock.inc, line 108 - Question locking functions for the 'Answers' module.
Code
function answers_unlock_question($question) {
$lang = field_language('node', $question, 'field_question_locked_p');
$question->field_question_locked_p[$lang][0]['value'] = 0;
node_save($question);
}