Index: trunk/extensions/EmailCapture/sql/CreateEmailCaptureTable.sql |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | -- Captured email addresses |
3 | 3 | CREATE TABLE IF NOT EXISTS /*_*/email_capture ( |
4 | 4 | -- Email address |
5 | | - ec_email varbinary(255) NOT NULL DEFAULT '', |
| 5 | + ec_email varbinary(255) PRIMARY KEY NOT NULL DEFAULT '', |
6 | 6 | -- Additional information |
7 | 7 | ec_info blob NOT NULL DEFAULT '', |
8 | 8 | -- Verification code |
— | — | @@ -9,5 +9,4 @@ |
10 | 10 | -- Verified |
11 | 11 | ec_verified boolean DEFAULT 0 |
12 | 12 | ) /*$wgDBTableOptions*/; |
13 | | -CREATE UNIQUE INDEX /*i*/ac_email_key ON /*_*/email_capture (ec_email); |
14 | | -CREATE INDEX /*i*/ac_code_verified_key ON /*_*/email_capture (ec_code, ec_verified); |
| 13 | +CREATE INDEX /*i*/ec_code_verified ON /*_*/email_capture (ec_code, ec_verified); |
Index: trunk/extensions/EmailCapture/EmailCapture.php |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | /* Setup */ |
40 | 40 | $dir = dirname( __FILE__ ) . '/'; |
41 | 41 | $wgExtensionMessagesFiles['EmailCapture'] = $dir . 'EmailCapture.i18n.php'; |
| 42 | +$wgExtensionAliasesFiles['EmailCapture'] = $dir . 'EmailCapture.alias.php'; |
42 | 43 | // API |
43 | 44 | $wgAutoloadClasses['ApiEmailCapture'] = $dir . 'api/ApiEmailCapture.php'; |
44 | 45 | $wgAPIModules['emailcapture'] = 'ApiEmailCapture'; |
Index: trunk/extensions/EmailCapture/EmailCapture.alias.php |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Special page aliases for EmailCapture extension. |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$specialPageAliases = array(); |
| 11 | + |
| 12 | +/** English (English) |
| 13 | + * @author Roan Kattouw |
| 14 | + */ |
| 15 | +$specialPageAliases['en'] = array( |
| 16 | + 'EmailCapture' => array( 'EmailCapture' ), |
| 17 | +); |
Property changes on: trunk/extensions/EmailCapture/EmailCapture.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 18 | + native |
Index: trunk/extensions/EmailCapture/api/ApiEmailCapture.php |
— | — | @@ -32,10 +32,9 @@ |
33 | 33 | if ( $dbw->affectedRows() ) { |
34 | 34 | // Send auto-response |
35 | 35 | global $wgUser, $wgEmailCaptureSendAutoResponse, $wgEmailCaptureAutoResponse; |
36 | | - $link = $wgUser->getSkin()->link( 'Special:EmailCapture' ); |
37 | | - $fullLink = $wgUser->getSkin()->link( |
38 | | - 'Special:EmailCapture', null, array(), array( 'verify' => $code ) |
39 | | - ); |
| 36 | + $title = SpecialPage::getTitleFor( 'EmailCapture' ); |
| 37 | + $link = $title->getFullURL(); |
| 38 | + $fullLink = $title->getFullURL( array( 'verify' => $code ) ); |
40 | 39 | if ( $wgEmailCaptureSendAutoResponse ) { |
41 | 40 | UserMailer::send( |
42 | 41 | new MailAddress( $params['email'] ), |
— | — | @@ -44,7 +43,7 @@ |
45 | 44 | $wgEmailCaptureAutoResponse['from-name'] |
46 | 45 | ), |
47 | 46 | wfMsg( $wgEmailCaptureAutoResponse['subject-msg'] ), |
48 | | - wfMsg( $wgEmailCaptureAutoResponse['body-msg'], $link, $code, $fullLink ), |
| 47 | + wfMsg( $wgEmailCaptureAutoResponse['body-msg'], $fullLink, $link, $code ), |
49 | 48 | $wgEmailCaptureAutoResponse['reply-to'], |
50 | 49 | $wgEmailCaptureAutoResponse['content-type'] |
51 | 50 | ); |