r92653 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92652‎ | r92653 | r92654 >
Date:18:14, 20 July 2011
Author:awjrichards
Status:ok
Tags:
Comment:
MFT r77974 through r92651
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/ContactPage.alias.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/ContactPage.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/README (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/SpecialContact.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/install.settings (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/SpecialContact.php
@@ -40,20 +40,12 @@
4141 $nu = User::newFromName( $wgContactUser );
4242 $f = new EmailContactForm( $nu );
4343
44 - $form['fname'] = $wgRequest->getVal('fname');
45 - $form['lname'] = $wgRequest->getVal('lname');
46 - $form['orgname'] = $wgRequest->getVal('orgname');
47 - $form['jobname'] = $wgRequest->getVal('jobname');
48 - $form['urlname'] = $wgRequest->getVal('urlname');
 44+ $form['name'] = $wgRequest->getVal('name');
 45+ $form['age'] = $wgRequest->getVal('age');
4946 $form['email'] = $wgRequest->getVal('email');
50 - $form['telephone'] = $wgRequest->getVal('telephone');
51 - $form['other'] = $wgRequest->getVal('other');
52 - $form['url'] = $wgRequest->getVal('url');
53 - $form['country'] = $wgRequest->getVal('country');
54 - $form['citytown'] = $wgRequest->getVal('city-town');
55 - $form['provstat'] = $wgRequest->getVal('prov-state');
 47+ $form['location'] = $wgRequest->getVal('location');
5648 $form['story'] = $wgRequest->getVal('story');
57 - $form['followup'] = $wgRequest->getVal('follow-up');
 49+ $form['followup'] = $wgRequest->getVal('followup');
5850
5951 $text = '';
6052 foreach( $form as $key => $value) {
@@ -81,7 +73,7 @@
8274 if ( "success" == $action ) {
8375 wfDebug( "$fname: success.\n" );
8476 $f->showSuccess( );
85 - } else if ( "submit" == $action && $wgRequest->wasPosted() && $f->hasAllInfo() ) {
 77+ } elseif ( "submit" == $action && $wgRequest->wasPosted() && $f->hasAllInfo() ) {
8678 $token = $wgRequest->getVal( 'wpEditToken' );
8779
8880 if( $wgUser->isAnon() ) {
@@ -96,7 +88,7 @@
9789 wfDebug( "$fname: bad token (".($wgUser->isAnon()?'anon':'user')."): $token\n" );
9890 $wgOut->addWikiText( wfMsg( 'sessionfailure' ) );
9991 $f->showForm();
100 - } else if ( !$f->passCaptcha() ) {
 92+ } elseif ( !$f->passCaptcha() ) {
10193 wfDebug( "$fname: captcha failed" );
10294 $wgOut->addWikiText( wfMsg( 'contactpage-captcha-failed' ) ); //TODO: provide a message for this!
10395 $f->showForm();
@@ -147,7 +139,7 @@
148140 $captcha->action = 'contact';
149141 }
150142 }
151 -
 143+
152144 function setText( $text ) {
153145 $this->text = $text;
154146 }
@@ -255,7 +247,7 @@
256248
257249 function getCaptcha() {
258250 global $wgCaptcha;
259 - if ( !$this->useCaptcha() ) return "";
 251+ if ( !$this->useCaptcha() ) return "";
260252
261253 wfSetupSession(); #NOTE: make sure we have a session. May be required for captchas to work.
262254
@@ -290,7 +282,7 @@
291283 if ( !$this->fromaddress ) {
292284 $from = new MailAddress( $csender, $cname );
293285 }
294 - else if ( $wgUserEmailUseReplyTo ) {
 286+ elseif ( $wgUserEmailUseReplyTo ) {
295287 $from = new MailAddress( $csender, $cname );
296288 $replyto = new MailAddress( $this->fromaddress, $this->fromname );
297289 }
@@ -307,7 +299,7 @@
308300 if ( $this->fromname !== "" ) {
309301 $subject = wfMsgForContent( "contactpage-subject-and-sender", $subject, $this->fromname );
310302 }
311 - else if ( $this->fromaddress !== "" ) {
 303+ elseif ( $this->fromaddress !== "" ) {
312304 $subject = wfMsgForContent( "contactpage-subject-and-sender", $subject, $this->fromaddress );
313305 }
314306
Property changes on: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/SpecialContact.php
___________________________________________________________________
Deleted: eol-style:native
315307 - properties
Property changes on: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/install.settings
___________________________________________________________________
Deleted: eol-style:native
316308 - properties
Index: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/ContactPage.alias.php
@@ -6,150 +6,154 @@
77 * @ingroup Extensions
88 */
99
10 -$aliases = array();
 10+$specialPageAliases = array();
1111
1212 /** English
1313 * @author Jon Harald Søby
1414 */
15 -$aliases['en'] = array(
 15+$specialPageAliases['en'] = array(
1616 'Contact' => array( 'Contact' ),
1717 );
1818
1919 /** Arabic (العربية)
2020 * @author Meno25
2121 */
22 -$aliases['ar'] = array(
 22+$specialPageAliases['ar'] = array(
2323 'Contact' => array( 'اتصال' ),
2424 );
2525
2626 /** Egyptian Spoken Arabic (مصرى)
2727 * @author Meno25
2828 */
29 -$aliases['arz'] = array(
 29+$specialPageAliases['arz'] = array(
3030 'Contact' => array( 'اتصال' ),
3131 );
3232
3333 /** Assamese (অসমীয়া) */
34 -$aliases['as'] = array(
 34+$specialPageAliases['as'] = array(
3535 'Contact' => array( 'যোগাযোগ' ),
3636 );
3737
3838 /** German (Deutsch) */
39 -$aliases['de'] = array(
 39+$specialPageAliases['de'] = array(
4040 'Contact' => array( 'Kontakt' ),
4141 );
4242
4343 /** Finnish (Suomi) */
44 -$aliases['fi'] = array(
 44+$specialPageAliases['fi'] = array(
4545 'Contact' => array( 'Yhteystiedot' ),
4646 );
4747
4848 /** Galician (Galego) */
49 -$aliases['gl'] = array(
 49+$specialPageAliases['gl'] = array(
5050 'Contact' => array( 'Contactar' ),
5151 );
5252
5353 /** Hebrew (עברית)
5454 * @author Rotem Liss
5555 */
56 -$aliases['he'] = array(
 56+$specialPageAliases['he'] = array(
5757 'Contact' => array( 'יצירת_קשר' ),
5858 );
5959
6060 /** Croatian (Hrvatski) */
61 -$aliases['hr'] = array(
 61+$specialPageAliases['hr'] = array(
6262 'Contact' => array( 'Kontakt' ),
6363 );
6464
6565 /** Upper Sorbian (Hornjoserbsce) */
66 -$aliases['hsb'] = array(
 66+$specialPageAliases['hsb'] = array(
6767 'Contact' => array( 'Kontakt' ),
6868 );
6969
7070 /** Haitian (Kreyòl ayisyen) */
71 -$aliases['ht'] = array(
 71+$specialPageAliases['ht'] = array(
7272 'Contact' => array( 'Kontak' ),
7373 );
7474
7575 /** Hungarian (Magyar) */
76 -$aliases['hu'] = array(
 76+$specialPageAliases['hu'] = array(
7777 'Contact' => array( 'Kapcsolat' ),
7878 );
7979
8080 /** Indonesian (Bahasa Indonesia) */
81 -$aliases['id'] = array(
 81+$specialPageAliases['id'] = array(
8282 'Contact' => array( 'Kontak' ),
8383 );
8484
8585 /** Khmer (ភាសាខ្មែរ) */
86 -$aliases['km'] = array(
 86+$specialPageAliases['km'] = array(
8787 'Contact' => array( 'ទំនាក់ទំនង' ),
8888 );
8989
9090 /** Luxembourgish (Lëtzebuergesch) */
91 -$aliases['lb'] = array(
 91+$specialPageAliases['lb'] = array(
9292 'Contact' => array( 'Kontakt' ),
9393 );
9494
9595 /** Macedonian (Македонски) */
96 -$aliases['mk'] = array(
 96+$specialPageAliases['mk'] = array(
9797 'Contact' => array( 'Контакт' ),
9898 );
9999
100100 /** Low German (Plattdüütsch) */
101 -$aliases['nds'] = array(
 101+$specialPageAliases['nds'] = array(
102102 'Contact' => array( 'Kuntakt' ),
103103 );
104104
105105 /** Nedersaksisch (Nedersaksisch) */
106 -$aliases['nds-nl'] = array(
 106+$specialPageAliases['nds-nl'] = array(
107107 'Contact' => array( 'Kontak' ),
108108 );
109109
110110 /** Dutch (Nederlands) */
111 -$aliases['nl'] = array(
 111+$specialPageAliases['nl'] = array(
112112 'Contact' => array( 'Contactpagina' ),
113113 );
114114
115115 /** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
116116 * @author Jon Harald Søby
117117 */
118 -$aliases['no'] = array(
 118+$specialPageAliases['no'] = array(
119119 'Contact' => array( 'Kontakt', 'Kontaktside' ),
120120 );
121121
122122 /** Polish (Polski) */
123 -$aliases['pl'] = array(
 123+$specialPageAliases['pl'] = array(
124124 'Contact' => array( 'Kontakt' ),
125125 );
126126
127127 /** Pashto (پښتو) */
128 -$aliases['ps'] = array(
 128+$specialPageAliases['ps'] = array(
129129 'Contact' => array( 'اړيکه، د اړيکو مخ' ),
130130 );
131131
132132 /** Portuguese (Português) */
133 -$aliases['pt'] = array(
 133+$specialPageAliases['pt'] = array(
134134 'Contact' => array( 'Contactar', 'Contatar' ),
135135 );
136136
137137 /** Brazilian Portuguese (Português do Brasil) */
138 -$aliases['pt-br'] = array(
 138+$specialPageAliases['pt-br'] = array(
139139 'Contact' => array( 'Contactar', 'Contatar' ),
140140 );
141141
142142 /** Swedish (Svenska) */
143 -$aliases['sv'] = array(
 143+$specialPageAliases['sv'] = array(
144144 'Contact' => array( 'Kontakt' ),
145145 );
146146
147147 /** Tetum (Tetun) */
148 -$aliases['tet'] = array(
 148+$specialPageAliases['tet'] = array(
149149 'Contact' => array( 'Kontaktu' ),
150150 );
151151
152152 /** Thai (ไทย) */
153 -$aliases['th'] = array(
 153+$specialPageAliases['th'] = array(
154154 'Contact' => array( 'ติดต่อ' ),
155155 );
156156
 157+/**
 158+ * For backwards compatibility with MediaWiki 1.15 and earlier.
 159+ */
 160+$aliases =& $specialPageAliases;
\ No newline at end of file
Property changes on: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/ContactPage.i18n.php
___________________________________________________________________
Deleted: eol-style:native
157161 - properties
Property changes on: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser/README
___________________________________________________________________
Deleted: eol-style:native
158162 - properties
Property changes on: branches/wmf/1.17wmf1/extensions/ContactPageFundraiser
___________________________________________________________________
Deleted: eol-style:native
159163 - properties
Modified: svn:mergeinfo
160164 Merged /trunk/extensions/ContactPageFundraiser:r77974-92651

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77974Branch 1.17catrope12:32, 7 December 2010
r92651New implementation of getLines method that worksinez18:10, 20 July 2011

Status & tagging log