Index: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php |
— | — | @@ -5,9 +5,9 @@ |
6 | 6 | * |
7 | 7 | * @file |
8 | 8 | * @ingroup Extensions |
| 9 | + * @version 1.3 |
9 | 10 | * @author David Pean <david.pean@gmail.com> |
10 | 11 | * @author Jack Phoenix <jack@countervandalism.net> |
11 | | - * @version 1.2 |
12 | 12 | * @link http://www.mediawiki.org/wiki/Extension:UserWelcome Documentation |
13 | 13 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
14 | 14 | */ |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | $wgExtensionCredits['parserhook'][] = array( |
22 | 22 | 'path' => __FILE__, |
23 | 23 | 'name' => 'UserWelcome', |
24 | | - 'version' => '1.2', |
| 24 | + 'version' => '1.3', |
25 | 25 | 'author' => array( 'David Pean', 'Jack Phoenix' ), |
26 | 26 | 'descriptionmsg' => 'userwelcome-desc', |
27 | 27 | 'url' => 'http://www.mediawiki.org/wiki/Extension:UserWelcome', |
— | — | @@ -60,9 +60,8 @@ |
61 | 61 | $user_level = new UserLevel( $stats_data['points'] ); |
62 | 62 | |
63 | 63 | // Safe links |
64 | | - $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'mp-userlevels-link' ) ); |
| 64 | + $level_link = Title::makeTitle( NS_HELP, wfMsgForContent( 'mp-userlevels-link' ) ); |
65 | 65 | $avatar_link = SpecialPage::getTitleFor( 'UploadAvatar' ); |
66 | | - $invite_link = Title::makeTitle( NS_SPECIAL, 'InviteContacts' ); |
67 | 66 | |
68 | 67 | // Make an avatar |
69 | 68 | $avatar = new wAvatar( $wgUser->getID(), 'l' ); |
— | — | @@ -88,10 +87,15 @@ |
89 | 88 | </div> |
90 | 89 | <div class="cleared"></div> |
91 | 90 | <div class="needed-points"> |
92 | | - <br /> |
93 | | - ' . wfMsgExt( 'mp-welcome-needed-points', 'parsemag', $level_link->escapeFullURL(), |
94 | | - $user_level->getNextLevelName(), $user_level->getPointsNeededToAdvance() ) . ' |
95 | | - </div> |
| 91 | + <br />' |
| 92 | + . wfMsgExt( |
| 93 | + 'mp-welcome-needed-points', |
| 94 | + 'parsemag', |
| 95 | + $level_link->escapeFullURL(), |
| 96 | + $user_level->getNextLevelName(), |
| 97 | + $user_level->getPointsNeededToAdvance() |
| 98 | + ) . |
| 99 | + '</div> |
96 | 100 | </div>'; |
97 | 101 | } |
98 | 102 | |
— | — | @@ -106,7 +110,8 @@ |
107 | 111 | wfLoadExtensionMessages( 'UserWelcome' ); |
108 | 112 | |
109 | 113 | // Get requests |
110 | | - $requests = getNewMessagesLink() . getRelationshipRequestLink() . getNewGiftLink() . getNewSystemGiftLink(); |
| 114 | + $requests = getNewMessagesLink() . getRelationshipRequestLink() . |
| 115 | + getNewGiftLink() . getNewSystemGiftLink(); |
111 | 116 | |
112 | 117 | $output = ''; |
113 | 118 | if ( $requests ) { |
— | — | @@ -129,7 +134,6 @@ |
130 | 135 | $foe_request_count = UserRelationship::getOpenRequestCount( $wgUser->getID(), 2 ); |
131 | 136 | $relationship_request_link = SpecialPage::getTitleFor( 'ViewRelationshipRequests' ); |
132 | 137 | |
133 | | - $rel_title = SpecialPage::getTitleFor( 'ViewRelationshipRequests' ); |
134 | 138 | $output = ''; |
135 | 139 | |
136 | 140 | if ( $friend_request_count ) { |
— | — | @@ -160,7 +164,9 @@ |
161 | 165 | if ( $gift_count ) { |
162 | 166 | $output .= '<p> |
163 | 167 | <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/icon_package_get.gif" alt="" border="0" /> |
164 | | - <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' . wfMsgExt( 'mp-request-new-gift', 'parsemag', $gift_count ) . '</a> |
| 168 | + <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' |
| 169 | + . wfMsgExt( 'mp-request-new-gift', 'parsemag', $gift_count ) . |
| 170 | + '</a> |
165 | 171 | </p>'; |
166 | 172 | } |
167 | 173 | return $output; |
— | — | @@ -176,7 +182,9 @@ |
177 | 183 | if ( $gift_count ) { |
178 | 184 | $output .= '<p> |
179 | 185 | <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/awardIcon.png" alt="" border="0" /> |
180 | | - <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' . wfMsgExt( 'mp-request-new-award', 'parsemag', $gift_count ) . '</a> |
| 186 | + <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' |
| 187 | + . wfMsgExt( 'mp-request-new-award', 'parsemag', $gift_count ) . |
| 188 | + '</a> |
181 | 189 | </p>'; |
182 | 190 | } |
183 | 191 | |
— | — | @@ -191,8 +199,10 @@ |
192 | 200 | if ( $new_messages ) { |
193 | 201 | $board_link = SpecialPage::getTitleFor( 'UserBoard' ); |
194 | 202 | $output .= '<p> |
195 | | - <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/emailIcon.gif" alt="email icon" border="" /> |
196 | | - <a href="' . $board_link->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'mp-request-new-message' ) . '</a> |
| 203 | + <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/emailIcon.gif" alt="" border="" /> |
| 204 | + <a href="' . $board_link->escapeFullURL() . '" rel="nofollow">' |
| 205 | + . wfMsg( 'mp-request-new-message' ) . |
| 206 | + '</a> |
197 | 207 | </p>'; |
198 | 208 | } |
199 | 209 | return $output; |