Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

This commit is contained in:
Evan Prodromou 2011-04-04 16:26:26 -04:00
commit 51dc0e1c9b
3 changed files with 6 additions and 8 deletions

View File

@ -391,7 +391,7 @@ class QnAPlugin extends MicroAppPlugin
// Don't prompt user for an answer if the question is closed or
// the current user posed the question in the first place
if (empty($question->closed)) {
if (!empty($user) && ($user->id != $question->profile_id)) {
if (!empty($user)) {
$profile = $user->getProfile();
$answer = $question->getAnswer($profile);
if (!$answer) {

View File

@ -103,9 +103,9 @@ class QnanewanswerForm extends Form
$out = $this->out;
$id = "question-" . $question->id;
$out->element('p', 'answer', $question->title);
$out->element('p', 'answer', 'Your answer');
$out->hidden('id', $id);
$out->element('input', array('type' => 'text', 'name' => 'answer'));
$out->textarea('answer', 'answer');
}
/**

View File

@ -101,13 +101,11 @@ class QnareviseanswerForm extends Form
*/
function formData()
{
$out = $this->out;
$out->element('p', 'Your answer to:', $this->question->title);
$out = $this->out;
$out->element('p', 'revise-answer', 'Your answer');
$id = "answer-" . $this->answer->id;
$out->hidden('id', $id);
$out->textarea('answer', 'You said:', $this->answer->content);
$out->textarea('answer', 'answer', $this->answer->content);
}
/**