http://www.mediawiki.org/wiki/Special:Code/MediaWiki/64199
Revision: 64199 Author: ashley Date: 2010-03-25 22:41:19 +0000 (Thu, 25 Mar 2010) Log Message: ----------- SocialProfile: cleanup to UserWelcome and a fix for help page link (help pages are usually available only in the wiki's content language) Modified Paths: -------------- trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php Modified: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php =================================================================== --- trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php 2010-03-25 22:31:41 UTC (rev 64198) +++ trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php 2010-03-25 22:41:19 UTC (rev 64199) @@ -5,9 +5,9 @@ * * @file * @ingroup Extensions + * @version 1.3 * @author David Pean <david.p...@gmail.com> * @author Jack Phoenix <j...@countervandalism.net> - * @version 1.2 * @link http://www.mediawiki.org/wiki/Extension:UserWelcome Documentation * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ @@ -20,7 +20,7 @@ $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'UserWelcome', - 'version' => '1.2', + 'version' => '1.3', 'author' => array( 'David Pean', 'Jack Phoenix' ), 'descriptionmsg' => 'userwelcome-desc', 'url' => 'http://www.mediawiki.org/wiki/Extension:UserWelcome', @@ -60,9 +60,8 @@ $user_level = new UserLevel( $stats_data['points'] ); // Safe links - $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'mp-userlevels-link' ) ); + $level_link = Title::makeTitle( NS_HELP, wfMsgForContent( 'mp-userlevels-link' ) ); $avatar_link = SpecialPage::getTitleFor( 'UploadAvatar' ); - $invite_link = Title::makeTitle( NS_SPECIAL, 'InviteContacts' ); // Make an avatar $avatar = new wAvatar( $wgUser->getID(), 'l' ); @@ -88,10 +87,15 @@ </div> <div class="cleared"></div> <div class="needed-points"> - <br /> - ' . wfMsgExt( 'mp-welcome-needed-points', 'parsemag', $level_link->escapeFullURL(), - $user_level->getNextLevelName(), $user_level->getPointsNeededToAdvance() ) . ' - </div> + <br />' + . wfMsgExt( + 'mp-welcome-needed-points', + 'parsemag', + $level_link->escapeFullURL(), + $user_level->getNextLevelName(), + $user_level->getPointsNeededToAdvance() + ) . + '</div> </div>'; } @@ -106,7 +110,8 @@ wfLoadExtensionMessages( 'UserWelcome' ); // Get requests - $requests = getNewMessagesLink() . getRelationshipRequestLink() . getNewGiftLink() . getNewSystemGiftLink(); + $requests = getNewMessagesLink() . getRelationshipRequestLink() . + getNewGiftLink() . getNewSystemGiftLink(); $output = ''; if ( $requests ) { @@ -129,7 +134,6 @@ $foe_request_count = UserRelationship::getOpenRequestCount( $wgUser->getID(), 2 ); $relationship_request_link = SpecialPage::getTitleFor( 'ViewRelationshipRequests' ); - $rel_title = SpecialPage::getTitleFor( 'ViewRelationshipRequests' ); $output = ''; if ( $friend_request_count ) { @@ -160,7 +164,9 @@ if ( $gift_count ) { $output .= '<p> <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/icon_package_get.gif" alt="" border="0" /> - <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' . wfMsgExt( 'mp-request-new-gift', 'parsemag', $gift_count ) . '</a> + <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' + . wfMsgExt( 'mp-request-new-gift', 'parsemag', $gift_count ) . + '</a> </p>'; } return $output; @@ -176,7 +182,9 @@ if ( $gift_count ) { $output .= '<p> <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/awardIcon.png" alt="" border="0" /> - <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' . wfMsgExt( 'mp-request-new-award', 'parsemag', $gift_count ) . '</a> + <a href="' . $gifts_title->escapeFullURL() . '" rel="nofollow">' + . wfMsgExt( 'mp-request-new-award', 'parsemag', $gift_count ) . + '</a> </p>'; } @@ -191,8 +199,10 @@ if ( $new_messages ) { $board_link = SpecialPage::getTitleFor( 'UserBoard' ); $output .= '<p> - <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/emailIcon.gif" alt="email icon" border="" /> - <a href="' . $board_link->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'mp-request-new-message' ) . '</a> + <img src="' . $wgScriptPath . '/extensions/SocialProfile/images/emailIcon.gif" alt="" border="" /> + <a href="' . $board_link->escapeFullURL() . '" rel="nofollow">' + . wfMsg( 'mp-request-new-message' ) . + '</a> </p>'; } return $output; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs