function answers_lock_question in Answers 7.3
Same name and namespace in other branches
- 6.2 includes/answers.lock.inc \answers_lock_question()
- 7.2 includes/answers.lock.inc \answers_lock_question()
Lock a question.
Parameters
object $question: A fully loaded question node.
2 calls to answers_lock_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 96 - Question locking functions for the 'Answers' module.
Code
function answers_lock_question($question) {
$lang = field_language('node', $question, 'field_question_locked_p');
$question->field_question_locked_p[$lang][0]['value'] = 1;
node_save($question);
}