http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62785

Revision: 62785
Author:   siebrand
Date:     2010-02-21 18:39:18 +0000 (Sun, 21 Feb 2010)

Log Message:
-----------
* do not display some fields if $wgAccountRequestExtraInfo is false
* add dummy message 'requestaccount-areas' and update Translate accordingly

Modified Paths:
--------------
    trunk/extensions/ConfirmAccount/ConfirmAccount.i18n.php
    trunk/extensions/ConfirmAccount/UserCredentials_body.php
    trunk/extensions/Translate/groups/mediawiki-defines.txt

Modified: trunk/extensions/ConfirmAccount/ConfirmAccount.i18n.php
===================================================================
--- trunk/extensions/ConfirmAccount/ConfirmAccount.i18n.php     2010-02-21 
18:19:39 UTC (rev 62784)
+++ trunk/extensions/ConfirmAccount/ConfirmAccount.i18n.php     2010-02-21 
18:39:18 UTC (rev 62785)
@@ -26,6 +26,7 @@
        'requestaccount-acc-text'   => 'Your e-mail address will be sent a 
confirmation message once this request is submitted.
 Please respond by clicking on the confirmation link provided by the e-mail.
 Also, your password will be e-mailed to you when your account is created.',
+       'requestaccount-areas' => '', # Do not translate this message to other 
languages
        'requestaccount-areas-text' => 'Select the topic areas below in which 
you have formal expertise or would like to do the most work in.',
        'requestaccount-ext-text'   => 'The following information is kept 
private and will only be used for this request.
 You may want to list contacts such a phone number to aid in identify 
confirmation.',

Modified: trunk/extensions/ConfirmAccount/UserCredentials_body.php
===================================================================
--- trunk/extensions/ConfirmAccount/UserCredentials_body.php    2010-02-21 
18:19:39 UTC (rev 62784)
+++ trunk/extensions/ConfirmAccount/UserCredentials_body.php    2010-02-21 
18:39:18 UTC (rev 62785)
@@ -144,19 +144,25 @@
 
                $form .= '<fieldset>';
                $form .= '<legend>' . wfMsgHtml( 'usercredentials-leg-other' ) 
. '</legend>';
-               $form .= '<p>' . wfMsgHtml( 'usercredentials-attach' ) . ' ';
-               if ( $row->acd_filename ) {
-                       $form .= $this->skin->makeKnownLinkObj( $titleObj, 
htmlspecialchars( $row->acd_filename ),
-                               'file=' . $row->acd_storage_key );
-               } else {
-                       $form .= wfMsgHtml( 'confirmaccount-none-p' );
+
+               global $wgAccountRequestExtraInfo ;
+
+               if( $wgAccountRequestExtraInfo ) {
+                       $form .= '<p>' . wfMsgHtml( 'usercredentials-attach' ) 
. ' ';
+                       if ( $row->acd_filename ) {
+                               $form .= $this->skin->makeKnownLinkObj( 
$titleObj, htmlspecialchars( $row->acd_filename ),
+                                       'file=' . $row->acd_storage_key );
+                       } else {
+                               $form .= wfMsgHtml( 'confirmaccount-none-p' );
+                       }
+                       $form .= "</p><p>" . wfMsgHtml( 'usercredentials-notes' 
) . "</p>\n";
+                       $form .= "<p><textarea tabindex='1' readonly='readonly' 
name='wpNotes' id='wpNotes' rows='3' cols='80' style='width:100%'>" .
+                               htmlspecialchars( $row->acd_notes ) .
+                               "</textarea></p>\n";
+                       $form .= "<p>" . wfMsgHtml( 'usercredentials-urls' ) . 
"</p>\n";
+                       $form .= ConfirmAccountsPage::parseLinks( 
$row->acd_urls );
                }
-               $form .= "</p><p>" . wfMsgHtml( 'usercredentials-notes' ) . 
"</p>\n";
-               $form .= "<p><textarea tabindex='1' readonly='readonly' 
name='wpNotes' id='wpNotes' rows='3' cols='80' style='width:100%'>" .
-                       htmlspecialchars( $row->acd_notes ) .
-                       "</textarea></p>\n";
-               $form .= "<p>" . wfMsgHtml( 'usercredentials-urls' ) . "</p>\n";
-               $form .= ConfirmAccountsPage::parseLinks( $row->acd_urls );
+
                if ( $wgUser->isAllowed( 'requestips' ) ) {
                        $blokip = SpecialPage::getTitleFor( 'blockip' );
                        $form .= "<p>" . wfMsgHtml( 'usercredentials-ip' ) . " 
" . htmlspecialchars( $row->acd_ip ) . "</p>\n";

Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt
===================================================================
--- trunk/extensions/Translate/groups/mediawiki-defines.txt     2010-02-21 
18:19:39 UTC (rev 62784)
+++ trunk/extensions/Translate/groups/mediawiki-defines.txt     2010-02-21 
18:39:18 UTC (rev 62785)
@@ -215,6 +215,7 @@
 aliasfile = ConfirmAccount/ConfirmAccount.alias.php
 descmsg = confirmedit-desc
 optional = requestaccount-info, requestaccount-footer
+ignored = requestaccount-areas
 
 Confirm Edit
 aliasfile = ConfirmEdit/ConfirmEdit.alias.php



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to