r90798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90797‎ | r90798 | r90799 >
Date:20:03, 25 June 2011
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: proper URL building in UserProfile/UserProfilePage.php
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -865,6 +865,8 @@
866866 UserActivity::getTypeIcon( $item['type'] ) . '" alt="" border="0" />';
867867 }
868868
 869+ $viewGift = SpecialPage::getTitleFor( 'ViewGift' );
 870+
869871 switch( $item['type'] ) {
870872 case 'edit':
871873 $item_html .= wfMsg( 'user-recent-activity-edit' ) . " {$page_link} {$item_time}
@@ -889,7 +891,7 @@
890892 '" border="0" alt="" />';
891893 $item_html .= wfMsg( 'user-recent-activity-gift-sent' ) . " {$user_link_2} {$item_time}
892894 <div class=\"item\">
893 - <a href=\"" . $wgScriptPath . "/index.php?title=Special:ViewGift&gift_id={$item['id']}\" rel=\"nofollow\">
 895+ <a href=\"" . $viewGift->escapeFullURL( "gift_id={$item['id']}" ) . "\" rel=\"nofollow\">
894896 {$gift_image}
895897 {$item['pagetitle']}
896898 </a>
@@ -901,9 +903,9 @@
902904 '" border="0" alt="" />';
903905 $item_html .= wfMsg( 'user-recent-activity-gift-rec' ) . " {$user_link_2} {$item_time}</span>
904906 <div class=\"item\">
905 - <a href=\"" . $wgScriptPath . "/index.php?title=Special:ViewGift&gift_id={$item['id']}\" rel=\"nofollow\">
 907+ <a href=\"" . $viewGift->escapeFullURL( "gift_id={$item['id']}" ) . "\" rel=\"nofollow\">
906908 {$gift_image}
907 - {$item["pagetitle"]}
 909+ {$item['pagetitle']}
908910 </a>
909911 </div>";
910912 break;
@@ -911,9 +913,10 @@
912914 $gift_image = "<img src=\"{$wgUploadPath}/awards/" .
913915 SystemGifts::getGiftImage( $item['namespace'], 'm' ) .
914916 '" border="0" alt="" />';
 917+ $viewSystemGift = SpecialPage::getTitleFor( 'ViewSystemGift' );
915918 $item_html .= wfMsg( 'user-recent-system-gift' ) . " {$item_time}
916919 <div class=\"user-home-item-gift\">
917 - <a href=\"" . $wgScriptPath . "/index.php?title=Special:ViewSystemGift&gift_id={$item['id']}\" rel=\"nofollow\">
 920+ <a href=\"" . $viewSystemGift->escapeFullURL( "gift_id={$item['id']}" ) . "\" rel=\"nofollow\">
918921 {$gift_image}
919922 {$item['pagetitle']}
920923 </a>

Status & tagging log