r39512 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39511‎ | r39512 | r39513 >
Date:23:25, 16 August 2008
Author:nad
Status:old
Tags:
Comment:
changed EmailPages back to EmailPage because name change had broken it
Modified paths:
  • /trunk/extensions/EmailPage/EmailPage.alias.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage.i18n.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EmailPage/EmailPage.alias.php
@@ -11,69 +11,69 @@
1212 * @author Jon Harald Søby
1313 */
1414 $aliases['en'] = array(
15 - 'EmailPages' => array( 'EmailPages' ),
 15+ 'EmailPage' => array( 'EmailPage' ),
1616 );
1717
1818 /** Arabic (العربية)
1919 * @author Meno25
2020 */
2121 $aliases['ar'] = array(
22 - 'EmailPages' => array( 'مراسلة_الصفحات' ),
 22+ 'EmailPage' => array( 'مراسلة_الصفحات' ),
2323 );
2424
2525 /** Egyptian Spoken Arabic (مصرى)
2626 * @author Meno25
2727 */
2828 $aliases['arz'] = array(
29 - 'EmailPages' => array( 'مراسلة_الصفحات' ),
 29+ 'EmailPage' => array( 'مراسلة_الصفحات' ),
3030 );
3131
3232 /** French (Français) */
3333 $aliases['fr'] = array(
34 - 'EmailPages' => array( 'EnvoyerPage', 'Envoyer Page' ),
 34+ 'EmailPage' => array( 'EnvoyerPage', 'Envoyer Page' ),
3535 );
3636
3737 /** Galician (Galego) */
3838 $aliases['gl'] = array(
39 - 'EmailPages' => array( 'Enviar páxinas por correo electrónico' ),
 39+ 'EmailPage' => array( 'Enviar páxinas por correo electrónico' ),
4040 );
4141
4242 /** Hebrew (עברית)
4343 * @author Rotem Liss
4444 */
4545 $aliases['he'] = array(
46 - 'EmailPages' => array( 'שליחת_דף_בדואר' ),
 46+ 'EmailPage' => array( 'שליחת_דף_בדואר' ),
4747 );
4848
4949 /** Haitian (Kreyòl ayisyen) */
5050 $aliases['ht'] = array(
51 - 'EmailPages' => array( 'EmèlAtik' ),
 51+ 'EmailPage' => array( 'EmèlAtik' ),
5252 );
5353
5454 /** Hungarian (Magyar) */
5555 $aliases['hu'] = array(
56 - 'EmailPages' => array( 'Szócikk elküldése e-mailben' ),
 56+ 'EmailPage' => array( 'Szócikk elküldése e-mailben' ),
5757 );
5858
5959 /** Luxembourgish (Lëtzebuergesch) */
6060 $aliases['lb'] = array(
61 - 'EmailPages' => array( 'E-Mail-Säiten' ),
 61+ 'EmailPage' => array( 'E-Mail-Säiten' ),
6262 );
6363
6464 /** Dutch (Nederlands) */
6565 $aliases['nl'] = array(
66 - 'EmailPages' => array( 'PaginaE-mailen', 'PaginaEmailen' ),
 66+ 'EmailPage' => array( 'PaginaE-mailen', 'PaginaEmailen' ),
6767 );
6868
6969 /** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
7070 * @author Jon Harald Søby
7171 */
7272 $aliases['no'] = array(
73 - 'EmailPages' => array( 'Send side som e-post' ),
 73+ 'EmailPage' => array( 'Send side som e-post' ),
7474 );
7575
7676 /** Pashto (پښتو) */
7777 $aliases['ps'] = array(
78 - 'EmailPages' => array( 'د برېښليک مخونه' ),
 78+ 'EmailPage' => array( 'د برېښليک مخونه' ),
7979 );
8080
Index: trunk/extensions/EmailPage/EmailPage_body.php
@@ -15,7 +15,7 @@
1616
1717 public function __construct() {
1818 global $wgEmailPageGroup;
19 - SpecialPage::SpecialPage('EmailPages', $wgEmailPageGroup);
 19+ SpecialPage::SpecialPage('EmailPage', $wgEmailPageGroup);
2020 }
2121
2222 /**
Index: trunk/extensions/EmailPage/EmailPage.i18n.php
@@ -11,7 +11,7 @@
1212 * @author Nad
1313 */
1414 $messages['en'] = array(
15 - 'emailpages' => 'E-mail page',
 15+ 'emailpage' => 'E-mail page',
1616 'ea-desc' => 'Send rendered HTML page to an e-mail address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].',
1717 'ea-heading' => "=== E-mailing the page [[$1]] ===",
1818 'ea-fromgroup' => 'From group:',
@@ -46,7 +46,7 @@
4747 * @author OsamaK
4848 */
4949 $messages['ar'] = array(
50 - 'emailpages' => 'إرسال رسالة للمستخدم',
 50+ 'emailpage' => 'إرسال رسالة للمستخدم',
5151 'ea-desc' => 'يرسل صفحة ناتجة ب HTML لعنوان بريد إلكتروني أو قائمة عناوين باستخدام [http://phpmailer.sourceforge.net phpmailer].',
5252 'ea-heading' => '=== مراسلة الصفحة [[$1]] ===',
5353 'ea-fromgroup' => 'من مجموعة:',
@@ -98,7 +98,7 @@
9999 * @author Yekrats
100100 */
101101 $messages['eo'] = array(
102 - 'emailpages' => 'Retpoŝtigi paĝon',
 102+ 'emailpage' => 'Retpoŝtigi paĝon',
103103 'ea-heading' => '=== Retpoŝtigante paĝon [[$1]] ===',
104104 'ea-fromgroup' => 'De grupo:',
105105 'ea-pagesend' => 'Paĝo "$1" sendita de $2',
@@ -118,7 +118,7 @@
119119 * @author Grondin
120120 */
121121 $messages['fr'] = array(
122 - 'emailpages' => 'Envoyer l’article par courriel',
 122+ 'emailpage' => 'Envoyer l’article par courriel',
123123 'ea-desc' => 'Envoie le rendu d’une page HTML à une adresse électronique où à une liste d’adresses en utilisant [http://phpmailer.sourceforge.net phpmailer]',
124124 'ea-heading' => '=== Envoi de la page [[$1]] par courrier électronique ===',
125125 'ea-fromgroup' => 'Depuis le groupe :',
@@ -145,7 +145,7 @@
146146 * @author Toliño
147147 */
148148 $messages['gl'] = array(
149 - 'emailpages' => 'Enviar a páxina por correo electrónico',
 149+ 'emailpage' => 'Enviar a páxina por correo electrónico',
150150 'ea-desc' => 'Enviar páxinas HTML renderizadas a un enderezo de correo electrónico (ou a varios correos) usando [http://phpmailer.sourceforge.net phpmailer].',
151151 'ea-heading' => '=== Enviando a páxina "[[$1]]" ===',
152152 'ea-fromgroup' => 'Desde o grupo:',
@@ -172,7 +172,7 @@
173173 * @author McDutchie
174174 */
175175 $messages['ia'] = array(
176 - 'emailpages' => 'Inviar pagina per e-mail',
 176+ 'emailpage' => 'Inviar pagina per e-mail',
177177 'ea-desc' => 'Inviar le rendition HTML de un pagina a un adresse de e-mail o a un lista de adresses con [http://phpmailer.sourceforge.net phpmailer].',
178178 'ea-heading' => '=== Invio del pagina [[$1]] per e-mail ===',
179179 'ea-fromgroup' => 'Del gruppo:',
@@ -199,7 +199,7 @@
200200 * @author Lovekhmer
201201 */
202202 $messages['km'] = array(
203 - 'emailpages' => 'ទំព័រអ៊ីមែល',
 203+ 'emailpage' => 'ទំព័រអ៊ីមែល',
204204 'ea-fromgroup' => 'ពីក្រុម:',
205205 'ea-pagesend' => 'ទំព័រ"$1"ត្រូវបានបញ្ជូនពី$2',
206206 'ea-send' => 'ផ្ញើ!',
@@ -209,7 +209,7 @@
210210 * @author Robby
211211 */
212212 $messages['lb'] = array(
213 - 'emailpages' => 'Säit per Mail schécken',
 213+ 'emailpage' => 'Säit per Mail schécken',
214214 'ea-heading' => '=== Säit [[$1]] peer E-Mail verschécken ===',
215215 'ea-fromgroup' => 'Vun der Grupp:',
216216 'ea-pagesend' => 'D\'Säit "$1" gouf verschéckt vum $2',
@@ -226,7 +226,7 @@
227227 * @author Shijualex
228228 */
229229 $messages['ml'] = array(
230 - 'emailpages' => 'ഇമെയില്‍ താള്‍',
 230+ 'emailpage' => 'ഇമെയില്‍ താള്‍',
231231 'ea-heading' => '=== [[$1]] എന്ന താള്‍ ഇമെയില്‍ ചെയ്യുന്നു ===',
232232 'ea-fromgroup' => 'ഗ്രൂപ്പ്:',
233233 'ea-pagesend' => '$2 സം‌രംഭത്തില്‍ നിന്നു "$1" എന്ന താള്‍ അയച്ചു',
@@ -247,7 +247,7 @@
248248 * @author Kaustubh
249249 */
250250 $messages['mr'] = array(
251 - 'emailpages' => 'पान इ-मेल करा',
 251+ 'emailpage' => 'पान इ-मेल करा',
252252 'ea-desc' => ' [http://phpmailer.sourceforge.net पीएचपी मेलर] चा वापर करून एखादे पान एखाद्या इ-मेल पत्त्यावर किंवा इ-मेल पत्त्यांच्या यादीवर पाठवा.',
253253 'ea-heading' => '=== [[$1]] पान इ-मेल करीत आहे ===',
254254 'ea-fromgroup' => 'गटाकडून:',
@@ -274,7 +274,7 @@
275275 * @author Fluence
276276 */
277277 $messages['nah'] = array(
278 - 'emailpages' => 'E-mail zāzanilli',
 278+ 'emailpage' => 'E-mail zāzanilli',
279279 'ea-heading' => '=== E-mailhua in zāzanilli $1 ===',
280280 );
281281
@@ -289,7 +289,7 @@
290290 * @author Siebrand
291291 */
292292 $messages['nl'] = array(
293 - 'emailpages' => 'Pagina e-mailen',
 293+ 'emailpage' => 'Pagina e-mailen',
294294 'ea-desc' => 'Stuur een gerenderde pagina naar een e-mailadres of een lijst van adressen met behulp van [http://phpmailer.sourceforge.net phpmailer].',
295295 'ea-heading' => '=== Pagina [[$1]] e-mailen ===',
296296 'ea-fromgroup' => 'Van groep:',
@@ -316,7 +316,7 @@
317317 * @author Jon Harald Søby
318318 */
319319 $messages['no'] = array(
320 - 'emailpages' => 'Send side som e-post',
 320+ 'emailpage' => 'Send side som e-post',
321321 'ea-desc' => 'Send HTML-side til en eller flere e-postadresser ved hjelp av [http://phpmailer.sourceforge.net/ phpmailer].',
322322 'ea-heading' => '=== Send siden [[$1]] som e-post ===',
323323 'ea-fromgroup' => 'Fra gruppe:',
@@ -343,7 +343,7 @@
344344 * @author Cedric31
345345 */
346346 $messages['oc'] = array(
347 - 'emailpages' => 'Mandar l’article per corrièr electronic',
 347+ 'emailpage' => 'Mandar l’article per corrièr electronic',
348348 'ea-desc' => 'Manda lo rendut d’una pagina HTML a una adreça electronica o a una tièra d’adreças en utilizant [http://phpmailer.sourceforge.net phpmailer]',
349349 'ea-heading' => '=== Mandadís de la pagina [[$1]] per corrièr electronic ===',
350350 'ea-fromgroup' => 'Dempuèi lo grop :',
@@ -405,7 +405,7 @@
406406 * @author Helix84
407407 */
408408 $messages['sk'] = array(
409 - 'emailpages' => 'Poslať stránku emailom',
 409+ 'emailpage' => 'Poslať stránku emailom',
410410 'ea-desc' => 'Poslať stránku vo formáte HTML na emailovú adresu alebo zoznam adries pomocou [http://phpmailer.sourceforge.net phpmailer].',
411411 'ea-heading' => '=== Poslanie stránky [[$1]] emailom ===',
412412 'ea-fromgroup' => 'Zo skupiny:',
@@ -440,7 +440,7 @@
441441 * @author M.M.S.
442442 */
443443 $messages['sv'] = array(
444 - 'emailpages' => 'E-posta sida',
 444+ 'emailpage' => 'E-posta sida',
445445 'ea-desc' => 'Skicka en renderad HTML-sida till en e-postadress eller en lista över adresser som använder [http://phpmailer.sourceforge.net phpmailer].',
446446 'ea-heading' => '=== E-posta sidan [[$1]] ===',
447447 'ea-fromgroup' => 'Från grupp:',
@@ -477,7 +477,7 @@
478478 * @author Vinhtantran
479479 */
480480 $messages['vi'] = array(
481 - 'emailpages' => 'Trang thư điện tử',
 481+ 'emailpage' => 'Trang thư điện tử',
482482 'ea-desc' => 'Gửi trang HTML giản lược đến một địa chỉ hoặc danh sách các địa chỉ thư điện tử dùng [http://phpmailer.sourceforge.net phpmailer].',
483483 'ea-heading' => '=== Gửi trang [[$1]] ===',
484484 'ea-nopage' => 'Xin hãy xác định trang muốn gửi, ví dụ [[Special:EmailPage/{{MediaWiki:Mainpage-url}}]].',
Index: trunk/extensions/EmailPage/EmailPage.php
@@ -13,27 +13,29 @@
1414
1515 if (!defined('MEDIAWIKI')) die('Not an entry point.');
1616
17 -define('EMAILPAGE_VERSION', '1.2.0, 2008-07-13');
 17+define('EMAILPAGE_VERSION', '1.2.1, 2008-08-17');
1818
1919 $wgEmailPageGroup = 'sysop'; # Users must belong to this group to send emails (empty string means anyone can send)
2020 $wgEmailPageContactsCat = ''; # This specifies the name of a category containing categories of contact pages
2121 $wgEmailPageCss = 'EmailPage.css'; # A minimal CSS page to embed in the email (eg. monobook/main.css without portlets, actions etc)
22 -$wgEmailPageAllowRemoteAddr = array($_SERVER['SERVER_ADDR'],'127.0.0.1'); # Allow anonymous sending from these addresses
 22+$wgEmailPageAllowRemoteAddr = array('127.0.0.1'); # Allow anonymous sending from these addresses
2323 $wgEmailPageAllowAllUsers = false; # Whether to allow sending to all users (the "user" group)
2424 $wgEmailPageToolboxLink = 'Send to email'; # Link title for toolbox link (set to "" to not have any link in toolbox)
2525 $wgEmailPageActionLink = 'email'; # Link title for action link (set to "" to not have any action link)
26 -$wgPhpMailerClass = dirname(__FILE__).'/phpMailer_v2.1.0beta2/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/
 26+$wgPhpMailerClass = dirname(__FILE__).'/phpMailer_v2.1.0beta2/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/
2727
2828 if ($wgEmailPageGroup) $wgGroupPermissions['sysop'][$wgEmailPageGroup] = true;
2929
 30+if (isset($_SERVER['SERVER_ADDR'])) $wgEmailPageAllowRemoteAddr[] = $_SERVER['SERVER_ADDR'];
 31+
3032 $dir = dirname(__FILE__) . '/';
3133 $wgAutoloadClasses['SpecialEmailPage'] = $dir . 'EmailPage_body.php';
3234 $wgExtensionMessagesFiles['EmailPage'] = $dir . 'EmailPage.i18n.php';
33 -$wgExtensionAliasesFiles['EmailPage'] = $dir . 'EmailPage.alias.php';
34 -$wgSpecialPages['EmailPages'] = 'SpecialEmailPage';
 35+$wgExtensionAliasesFiles['EmailPage'] = $dir . 'EmailPage.alias.php';
 36+$wgSpecialPages['EmailPage'] = 'SpecialEmailPage';
3537
3638 $wgExtensionCredits['specialpage'][] = array(
37 - 'name' => 'Special:EmailPages',
 39+ 'name' => 'Special:EmailPage',
3840 'author' => '[http://www.organicdesign.co.nz/nad User:Nad]',
3941 'description' => 'Send rendered HTML page to an email address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].',
4042 'descriptionmsg' => 'ea-desc',
@@ -56,7 +58,7 @@
5759 function wfEmailPageToolboxLink() {
5860 global $wgEmailPageToolboxLink, $wgTitle, $wgUser, $wgEmailPageGroup;
5961 if (is_object($wgTitle) && (empty($wgEmailPageGroup) || in_array($wgEmailPageGroup, $wgUser->getEffectiveGroups()))) {
60 - $url = Title::makeTitle(NS_SPECIAL, 'EmailPages')->getLocalURL('ea-title='.$wgTitle->getPrefixedText());
 62+ $url = Title::makeTitle(NS_SPECIAL, 'EmailPage')->getLocalURL('ea-title='.$wgTitle->getPrefixedText());
6163 echo("<li><a href=\"$url\">$wgEmailPageToolboxLink</li>");
6264 }
6365 return true;

Status & tagging log