r83166 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83165‎ | r83166 | r83167 >
Date:20:01, 3 March 2011
Author:jdpond
Status:ok (Comments)
Tags:
Comment:
Coding Standards Changes. RELEASE-NOTES and ExtendedParamsExample.php to UTF-8. Also fixed local variables to start lower case.
Modified paths:
  • /trunk/extensions/NewUserNotif/ExtendedParamsExample.php (modified) (history)
  • /trunk/extensions/NewUserNotif/NewUserNotif.class.php (modified) (history)
  • /trunk/extensions/NewUserNotif/RELEASE-NOTES (modified) (history)

Diff [purge]

Index: trunk/extensions/NewUserNotif/NewUserNotif.class.php
@@ -87,11 +87,11 @@
8888 */
8989 private function makeSubject( $recipient, $user ) {
9090 global $wgSitename;
91 - $SubjectLine = "";
92 - wfRunHooks( 'NewUserNotifSubject', array( &$this, &$SubjectLine, $wgSitename, $recipient, $user ) );
93 - if (!strlen($SubjectLine) )
 91+ $subjectLine = "";
 92+ wfRunHooks( 'NewUserNotifSubject', array( &$this, &$subjectLine, $wgSitename, $recipient, $user ) );
 93+ if (!strlen($subjectLine) )
9494 return wfMsgForContent( 'newusernotifsubj', $wgSitename );
95 - return $SubjectLine;
 95+ return $subjectLine;
9696 }
9797
9898 /**
@@ -102,9 +102,9 @@
103103 */
104104 private function makeMessage( $recipient, $user ) {
105105 global $wgSitename, $wgContLang;
106 - $MessageBody = "";
107 - wfRunHooks( 'NewUserNotifBody', array( &$this, &$MessageBody, $wgSitename, $recipient, $user ) );
108 - if (!strlen($MessageBody) )
 106+ $messageBody = "";
 107+ wfRunHooks( 'NewUserNotifBody', array( &$this, &$messageBody, $wgSitename, $recipient, $user ) );
 108+ if (!strlen($messageBody) )
109109 return wfMsgForContent(
110110 'newusernotifbody',
111111 $recipient,
@@ -114,7 +114,7 @@
115115 $wgContLang->date( wfTimestampNow() ),
116116 $wgContLang->time( wfTimestampNow() )
117117 );
118 - return $MessageBody;
 118+ return $messageBody;
119119 }
120120
121121 /**
Index: trunk/extensions/NewUserNotif/ExtendedParamsExample.php
@@ -37,18 +37,18 @@
3838 * This function creates additional parameters which can be used in the email notification Subject Line for new users
3939 *
4040 * @param $callobj NewUserNotifier object (this).
41 - * @param $SubjectLine String: Returns the message subject line
42 - * @param $SiteName Site Name of the Wiki
 41+ * @param $subjectLine String: Returns the message subject line
 42+ * @param $siteName Site Name of the Wiki
4343 * @param $recipient Email/User Name of the Message Recipient.
4444 * @param $user User name of the added user
4545 * @return true
4646 */
4747
48 -function efNewUserNotifSubject ( $callobj , $SubjectLine , $SiteName , $recipient , $user )
 48+function efNewUserNotifSubject ( $callobj , $subjectLine , $siteName , $recipient , $user )
4949 {
50 - $SubjectLine = wfMsgForContent(
 50+ $subjectLine = wfMsgForContent(
5151 'newusernotifsubj',
52 - $SiteName, // $1 Site Name
 52+ $siteName, // $1 Site Name
5353 $user->getName() // $2 User Name
5454 );
5555 return ( true );
@@ -58,26 +58,26 @@
5959 * This function creates additional parameters which can be used in the email notification message body for new users
6060 *
6161 * @param $callobj NewUserNotifier object (this).
62 - * @param $MessageBody String: Returns the message body.
63 - * @param $SiteName Site Name of the Wiki
 62+ * @param $messageBody String: Returns the message body.
 63+ * @param $siteName Site Name of the Wiki
6464 * @param $recipient Email/User Name of the Message Recipient.
6565 * @param $user User name of the added user
6666 * @return true
6767 */
6868
69 -function efNewUserNotifBody ( $callobj , $MessageBody , $SiteName , $recipient , $user )
 69+function efNewUserNotifBody ( $callobj , $messageBody , $siteName , $recipient , $user )
7070 {
7171 global $wgContLang;
72 - $MessageBody = wfMsgForContent(
 72+ $messageBody = wfMsgForContent(
7373 'newusernotifbody',
7474 $recipient, // $1 Recipient (of notification message)
7575 $user->getName(), // $2 User Name
76 - $SiteName, // $3 Site Name
 76+ $siteName, // $3 Site Name
7777 $wgContLang->timeAndDate( wfTimestampNow() ), // $4 Time and date stamp
7878 $wgContLang->date( wfTimestampNow() ), // $5 Date Stamp
7979 $wgContLang->time( wfTimestampNow() ), // $6 Time Stamp
8080 $user->getEmail(), // $7 email
81 - rawurlencode($SiteName), // $8 Site name encoded for email message link
 81+ rawurlencode($siteName), // $8 Site name encoded for email message link
8282 wfGetIP(), // $9 Submitter's IP Address
8383 rawurlencode($user->getName()) // $10 User Name encoded for email message link
8484 );
Index: trunk/extensions/NewUserNotif/RELEASE-NOTES
@@ -1,7 +1,7 @@
22 NEW USER EMAIL NOTIFICATION EXTENSION
33
44 Version 1.5
5 - � 2006-2007 Rob Church, maintained by jpond
 5+ © 2006-2007 Rob Church, maintained by jpond
66
77 This is free software licenced under the GNU General Public Licence. Please
88 see http://www.gnu.org/copyleft/gpl.html for further details, including the

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83151(Bug 27831) Allow Custom Parameters for Subject and Message - Version 1.5.2jdpond17:51, 3 March 2011

Comments

#Comment by Jpond (talk | contribs)   20:05, 3 March 2011

these are Coding Standards Changes to r83151. RELEASE-NOTES and ExtendedParamsExample.php to UTF-8. Also fixed local variables to start lower case.

Status & tagging log