r75109 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75108‎ | r75109 | r75110 >
Date:21:05, 20 October 2010
Author:bharris
Status:ok
Tags:
Comment:
Fix bug introduced by r74414 where keys were changed in the i18n file but changes were not reflected in the main code base. Also remove stub function.
Modified paths:
  • /trunk/extensions/TradeTrack/SpecialTradeTrack.php (modified) (history)
  • /trunk/extensions/TradeTrack/templates/TradeTrackEmail.php (modified) (history)
  • /trunk/extensions/TradeTrack/templates/TradeTrackScreenDetailsForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TradeTrack/SpecialTradeTrack.php
@@ -99,7 +99,7 @@
100100 'errmsgs' => array(
101101 'max' => 'tradetrack-errors-generic-too-long',
102102 'required' => 'tradetrack-errors-generic-empty',
103 - 'equals' => 'tradetrack-errors-emails-do-not-match'
 103+ 'equals' => 'tradetrack-errors-e-mails-do-not-match'
104104 ),
105105 'tests' => array(
106106 'max' => 200,
@@ -222,7 +222,7 @@
223223
224224 // This is our template data array.
225225 $tData = array();
226 - $tData['formURL'] = $this->getTitle()->getLinkURL( $query );
 226+ $tData['formURL'] = $this->getTitle()->getLinkURL( );
227227
228228 // First, see if it's supplied from the page.
229229 $doaction = $wgRequest->getVal( 'doaction' );
@@ -443,9 +443,10 @@
444444 $mailer->send( new MailAddress( $toEmail ) , new MailAddress( $wgTradeTrackFromEmail ), $wgTradeTrackEmailSubject, $generatedEmail);
445445
446446 // debug line to dump this to the end screen.
 447+ $wgOut->addHtml( "<pre>" );
447448 $wgOut->addHtml( $generatedEmail );
 449+ $wgOut->addHtml( "</pre>" );
448450
449 -
450451 }
451452
452453 }
@@ -526,13 +527,7 @@
527528 return true;
528529 }
529530
530 -
531 - function sendEmailMail( array $tData ) {
532 -
533 -
534 - }
535 -
536 -
 531+
537532 private function insertTradeTrackRequest( array $tData ) {
538533 $dbw = wfGetDB( DB_MASTER );
539534
Index: trunk/extensions/TradeTrack/templates/TradeTrackEmail.php
@@ -18,6 +18,7 @@
1919 A new request to utilize a Wikimedia trademark has arrived.
2020
2121 Purpose: <?php echo $this->data['tData']['purpose'] ?>
 22+
2223 <?php if ( $this->data['tData']['agreementType'] ) { ?>Agreement Type: <?php echo $this->data['tData']['agreementType'] ?><?php } ?>
2324
2425 Usage: <?php echo $this->data['tData']['usage'] ?>
@@ -31,12 +32,16 @@
3233 }
3334 }
3435 } ?>
 36+
3537 Mailing Address:
3638 <?php echo $this->data['tData']['mailingaddress'] ?>
3739
3840 Name: <?php echo $this->data['tData']['name'] ?>
 41+
3942 Organization Name: <?php echo $this->data['tData']['orgname'] ?>
 43+
4044 Email: <?php echo $this->data['tData']['email'] ?>
 45+
4146 Phone: <?php echo $this->data['tData']['phone'] ?>
4247
4348 <?php } }
\ No newline at end of file
Index: trunk/extensions/TradeTrack/templates/TradeTrackScreenDetailsForm.php
@@ -6,7 +6,7 @@
77 <form method="post" action="<?php echo $this->data['tData']['formURL'] ?>" class="tradetrack-master" id="tradetrack-form">
88 <input type="hidden" name="doaction" value="details" />
99 <input type="hidden" name="tradetrack-purpose" value="<?php echo $this->data['tData']['purpose'] ?>" />
10 - <?php if ( $this->data['tData']['agreementType'] ) { ?>
 10+ <?php if ( isset ( $this->data['tData']['agreementType'] ) ) { ?>
1111 <input type="hidden" name="tradetrack-elements-agreement" value="<?php echo $this->data['tData']['agreementType'] ?>" />
1212 <?php } ?>
1313
@@ -73,18 +73,18 @@
7474 <input type="text" name="tradetrack-elements-orgname" maxlength="200" value="<?php echo $this->data['tData']['orgname'] ?>" /><br />
7575 </div>
7676 <div class="<?php echo ( $this->hasError( 'tradetrack-elements-email' ) ? 'tradetrack-element-error' : 'tradetrack-element' ) ?>">
77 - <label class="tradetrack-question-label"><?php echo wfMsg( 'tradetrack-about-label-email' ) ?></label>
 77+ <label class="tradetrack-question-label"><?php echo wfMsg( 'tradetrack-about-label-e-mail' ) ?></label>
7878 <span class="tradetrack-field-hint"
79 - title="<?php echo wfMsg( 'tradetrack-about-expanse-email' ) ?>"
80 - original-title="<?php echo wfMsg( 'tradetrack-about-expanse-email' ) ?>"></span><br style="clear:both" />
 79+ title="<?php echo wfMsg( 'tradetrack-about-expanse-e-mail' ) ?>"
 80+ original-title="<?php echo wfMsg( 'tradetrack-about-expanse-e-mail' ) ?>"></span><br style="clear:both" />
8181 <?php $this->showErrors( 'tradetrack-elements-email' ) ?>
8282 <input type="text" name="tradetrack-elements-email" maxlength="200" value="<?php echo $this->data['tData']['email'] ?>" /><br />
8383 </div>
84 - <div class="<?php echo ( $this->hasError( 'tradetrack-elements-confirmemail' ) ? 'tradetrack-element-error' : 'tradetrack-element' ) ?>">
85 - <label class="tradetrack-question-label"><?php echo wfMsg( 'tradetrack-about-label-confirmemail' ) ?></label>
 84+ <div class="<?php echo ( $this->hasError( 'tradetrack-elements-confirme-mail' ) ? 'tradetrack-element-error' : 'tradetrack-element' ) ?>">
 85+ <label class="tradetrack-question-label"><?php echo wfMsg( 'tradetrack-about-label-confirme-mail' ) ?></label>
8686 <span class="tradetrack-field-hint"
87 - title="<?php echo wfMsg( 'tradetrack-about-expanse-confirmemail' ) ?>"
88 - original-title="<?php echo wfMsg( 'tradetrack-about-expanse-confirmemail' ) ?>"></span><br style="clear:both" />
 87+ title="<?php echo wfMsg( 'tradetrack-about-expanse-confirme-mail' ) ?>"
 88+ original-title="<?php echo wfMsg( 'tradetrack-about-expanse-confirme-mail' ) ?>"></span><br style="clear:both" />
8989 <?php $this->showErrors( 'tradetrack-elements-confirmemail' ) ?>
9090 <input type="text" name="tradetrack-elements-confirmemail" maxlength="200" value="<?php echo $this->data['tData']['confirmemail'] ?>" /><br />
9191 </div>

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74414First run of i18n review: Consistenxy tweaks:...raymond06:49, 7 October 2010

Status & tagging log