Index: trunk/extensions/EmailPage/EmailPage.i18n.php |
— | — | @@ -25,9 +25,7 @@ |
26 | 26 | 'ea-sent' => "Page [[$1]] sent successfully to '''$2''' {{PLURAL:$2|recipient|recipients}} by [[User:$3|$3]].", |
27 | 27 | 'ea-selectrecipients' => 'Select recipients', |
28 | 28 | 'ea-compose' => 'Compose content', |
29 | | - 'ea-selectlist' => "Additional recipients as page titles or e-mail addresses |
30 | | -*''separate items with , ; * \\n |
31 | | -*''list can contain templates and parser-functions''", |
| 29 | + 'ea-selectlist' => "Email addresses can be separated with one or more semicolon, comma, asterisk or newline characters", |
32 | 30 | 'ea-show' => 'Show recipients', |
33 | 31 | 'ea-send' => 'Send!', |
34 | 32 | 'ea-subject' => 'Enter a subject line for the e-mail', |
Index: trunk/extensions/EmailPage/EmailPage.php |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * EmailPage extension - Send rendered HTML page to an email address or list of addresses using phpmailer |
| 4 | + * EmailPage extension - Send rendered HTML page to an email address or list of addresses using |
| 5 | + * the phpmailer class from http://phpmailer.sourceforge.net/ |
5 | 6 | * |
6 | 7 | * See http://www.mediawiki.org/wiki/Extension:EmailPage for installation and usage details |
7 | 8 | * |
— | — | @@ -12,7 +13,7 @@ |
13 | 14 | */ |
14 | 15 | if( !defined( 'MEDIAWIKI' ) ) die( "Not an entry point." ); |
15 | 16 | |
16 | | -define( 'EMAILPAGE_VERSION', "1.4.0, 2010-10-29" ); |
| 17 | +define( 'EMAILPAGE_VERSION', "2.0.0, 2010-11-01" ); |
17 | 18 | |
18 | 19 | $wgEmailPageGroup = "sysop"; # Users must belong to this group to send emails (empty string means anyone can send) |
19 | 20 | $wgEmailPageCss = "EmailPage.css"; # A minimal CSS page to embed in the email (eg. monobook/main.css without portlets, actions etc) |
— | — | @@ -20,16 +21,15 @@ |
21 | 22 | $wgEmailPageAllowAllUsers = false; # Whether to allow sending to all users (the "user" group) |
22 | 23 | $wgEmailPageToolboxLink = true; # Add a link to the sidebar toolbox? |
23 | 24 | $wgEmailPageActionLink = true; # Add a link to the actions links? |
24 | | -$wgPhpMailerClass = dirname( __FILE__ ) . "/PHPMailer_v5.1/class.phpmailer.php"; # From http://phpmailer.sourceforge.net/ |
25 | 25 | |
26 | 26 | if( $wgEmailPageGroup ) $wgGroupPermissions['sysop'][$wgEmailPageGroup] = true; |
27 | 27 | |
28 | 28 | if( isset( $_SERVER['SERVER_ADDR'] ) ) $wgEmailPageAllowRemoteAddr[] = $_SERVER['SERVER_ADDR']; |
29 | 29 | |
30 | | -$dir = dirname( __FILE__ ) . '/'; |
31 | | -$wgAutoloadClasses['SpecialEmailPage'] = $dir . "EmailPage_body.php"; |
32 | | -$wgExtensionMessagesFiles['EmailPage'] = $dir . "EmailPage.i18n.php"; |
33 | | -$wgExtensionAliasesFiles['EmailPage'] = $dir . "EmailPage.alias.php"; |
| 30 | +$dir = dirname( __FILE__ ); |
| 31 | +$wgAutoloadClasses['SpecialEmailPage'] = "$dir/EmailPage_body.php"; |
| 32 | +$wgExtensionMessagesFiles['EmailPage'] = "$dir/EmailPage.i18n.php"; |
| 33 | +$wgExtensionAliasesFiles['EmailPage'] = "$dir/EmailPage.alias.php"; |
34 | 34 | $wgSpecialPages['EmailPage'] = "SpecialEmailPage"; |
35 | 35 | |
36 | 36 | $wgExtensionCredits['specialpage'][] = array( |
— | — | @@ -42,7 +42,10 @@ |
43 | 43 | ); |
44 | 44 | |
45 | 45 | # If form has been posted, include the phpmailer class |
46 | | -if( isset( $_REQUEST['ea-send'] ) ) require_once( $wgPhpMailerClass ); |
| 46 | +if( isset( $_REQUEST['ea-send'] ) ) { |
| 47 | + if( $files = glob( "$dir/*/class.phpmailer.php" ) ) require_once( $files[0] ); |
| 48 | + else die( "PHPMailer class not found!" ); |
| 49 | +} |
47 | 50 | |
48 | 51 | # Add toolbox and action links |
49 | 52 | if( $wgEmailPageToolboxLink ) $wgHooks['SkinTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink'; |