Index: trunk/extensions/Poll/Poll_body.php |
— | — | @@ -84,6 +84,7 @@ |
85 | 85 | } |
86 | 86 | else { |
87 | 87 | $wgOut->addHtml( Xml::openElement( 'form', array('method'=> 'post', 'action' => $this->getTitle()->getFullURL('action=submit') ) ) ); |
| 88 | + |
88 | 89 | $wgOut->addHtml( Xml::openElement( 'table' ) ); |
89 | 90 | $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-question' ).':</td><td>'.Xml::input('question').'</td></tr>' ); |
90 | 91 | $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 1:</td><td>'.Xml::input('poll_alternative_1').'</td></tr>' ); |
— | — | @@ -124,7 +125,6 @@ |
125 | 126 | $creater = htmlentities( $row->creater, ENT_QUOTES, 'UTF-8' ); |
126 | 127 | $multi = $row->multi; |
127 | 128 | } |
128 | | - |
129 | 129 | $wgOut->addHtml( Xml::openElement( 'form', array('method'=> 'post', 'action' => $this->getTitle()->getFullURL('action=submit&id='.$vid) ) ) ); |
130 | 130 | $wgOut->addHtml( Xml::openElement( 'table' ) ); |
131 | 131 | $wgOut->addHtml( '<tr><th>'.$question.'</th></tr>' ); |
— | — | @@ -373,7 +373,9 @@ |
374 | 374 | $wgOut->addHtml( '<a href="'.$this->getTitle()->getFullURL('action=list').'">'.wfMsg('poll-back').'</a>' ); |
375 | 375 | } |
376 | 376 | else { |
377 | | - $wgOut->addWikiMsg( 'poll-vote-already-error' ); |
| 377 | + $dbw->update( 'poll_answer', array( 'vote' => $vote ), array( 'uid' => $uid, 'pid' => $pid ) ); |
| 378 | + |
| 379 | + $wgOut->addWikiMsg( 'poll-vote-changed' ); |
378 | 380 | $wgOut->addHtml( '<a href="'.$this->getTitle()->getFullURL('action=list').'">'.wfMsg('poll-back').'</a>' ); |
379 | 381 | } |
380 | 382 | } |
Index: trunk/extensions/Poll/Poll.i18n.php |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | 'poll-administration' => 'Administration:', |
58 | 58 | 'poll-no-dis' => 'No Description!', |
59 | 59 | 'poll-create-allow-more' => 'Allow Multi-Vote', |
| 60 | + 'poll-vote-changed' => 'Vote has been changed!', |
60 | 61 | ); |
61 | 62 | |
62 | 63 | /** German (Deutsch) |
— | — | @@ -105,4 +106,5 @@ |
106 | 107 | 'poll-administration' => 'Administration:', |
107 | 108 | 'poll-no-dis' => 'Keine Beschreibung vorhanden!', |
108 | 109 | 'poll-create-allow-more' => 'Mehfachabstimmung erlaubt', |
| 110 | + 'poll-vote-changed' => 'Stimme wurde geändert!', |
109 | 111 | ); |