Index: branches/wmf/1.17wmf1/extensions/EmailCapture/EmailCapture.i18n.php |
— | — | @@ -15,6 +15,8 @@ |
16 | 16 | 'emailcapture' => 'Email verification', |
17 | 17 | 'emailcapture-desc' => 'Capture e-mail addresses, and allow users to verify them through e-mail', |
18 | 18 | 'emailcapture-failure' => "Your e-mail was '''not''' verified.", |
| 19 | + 'emailcapture-invalid-code' => 'Invalid confirmation code.', |
| 20 | + 'emailcapture-already-confirmed' => 'Your e-mail address has already been confirmed.', |
19 | 21 | 'emailcapture-response-subject' => '{{SITENAME}} e-mail address verification', |
20 | 22 | 'emailcapture-response-body' => 'Verify your e-mail address by following this link: |
21 | 23 | $1 |
Index: branches/wmf/1.17wmf1/extensions/EmailCapture/SpecialEmailCapture.php |
— | — | @@ -14,16 +14,28 @@ |
15 | 15 | $code = $wgRequest->getVal( 'verify' ); |
16 | 16 | if ( $code !== null ) { |
17 | 17 | $dbw = wfGetDB( DB_MASTER ); |
18 | | - $dbw->update( |
| 18 | + $row = $dbw->selectRow( |
19 | 19 | 'email_capture', |
20 | | - array( 'ec_verified' => 1 ), |
| 20 | + array( 'ec_verified' ), |
21 | 21 | array( 'ec_code' => $code ), |
22 | 22 | __METHOD__ |
23 | 23 | ); |
24 | | - if ( $dbw->affectedRows() ) { |
25 | | - $wgOut->addWikiMsg( 'emailcapture-success' ); |
| 24 | + if ( $row && !$row->ec_verified ) { |
| 25 | + $dbw->update( |
| 26 | + 'email_capture', |
| 27 | + array( 'ec_verified' => 1 ), |
| 28 | + array( 'ec_code' => $code ), |
| 29 | + __METHOD__ |
| 30 | + ); |
| 31 | + if ( $dbw->affectedRows() ) { |
| 32 | + $wgOut->addWikiMsg( 'emailcapture-success' ); |
| 33 | + } else { |
| 34 | + $wgOut->addWikiMsg( 'emailcapture-failure' ); |
| 35 | + } |
| 36 | + } else if ( $row && $row->ec_verified ) { |
| 37 | + $wgOut->addWikiMsg( 'emailcapture-already-confirmed' ); |
26 | 38 | } else { |
27 | | - $wgOut->addWikiMsg( 'emailcapture-failure' ); |
| 39 | + $wgOut->addWikiMsg( 'emailcapture-invalid-code' ); |
28 | 40 | } |
29 | 41 | } else { |
30 | 42 | // Show simple form for submitting verification code |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionAuthorView.php |
— | — | @@ -19,7 +19,12 @@ |
20 | 20 | |
21 | 21 | return wfMsgHtml( 'code-author-haslink', |
22 | 22 | $this->skin->userLink( $this->mUser->getId(), $this->mUser->getName() ) . |
23 | | - $this->skin->userToolLinks( $this->mUser->getId(), $this->mUser->getName() ) ); |
| 23 | + $this->skin->userToolLinks( |
| 24 | + $this->mUser->getId(), |
| 25 | + $this->mUser->getName(), |
| 26 | + false, /* default for redContribsWhenNoEdits */ |
| 27 | + Linker::TOOL_LINKS_EMAIL /* Add "send e-mail" link */ |
| 28 | + ) ); |
24 | 29 | } |
25 | 30 | |
26 | 31 | function execute() { |