http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90798
Revision: 90798
Author: ashley
Date: 2011-06-25 20:03:39 +0000 (Sat, 25 Jun 2011)
Log Message:
-----------
SocialProfile: proper URL building in UserProfile/UserProfilePage.php
Modified Paths:
--------------
trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
Modified: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
===================================================================
--- trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
2011-06-25 19:51:06 UTC (rev 90797)
+++ trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
2011-06-25 20:03:39 UTC (rev 90798)
@@ -865,6 +865,8 @@
UserActivity::getTypeIcon( $item['type'] ) . '" alt="" border="0" />';
}
+ $viewGift = SpecialPage::getTitleFor(
'ViewGift' );
+
switch( $item['type'] ) {
case 'edit':
$item_html .= wfMsg(
'user-recent-activity-edit' ) . " {$page_link} {$item_time}
@@ -889,7 +891,7 @@
'" border="0" alt=""
/>';
$item_html .= wfMsg(
'user-recent-activity-gift-sent' ) . " {$user_link_2} {$item_time}
<div class=\"item\">
- <a href=\"" .
$wgScriptPath . "/index.php?title=Special:ViewGift&gift_id={$item['id']}\"
rel=\"nofollow\">
+ <a href=\"" .
$viewGift->escapeFullURL( "gift_id={$item['id']}" ) . "\" rel=\"nofollow\">
{$gift_image}
{$item['pagetitle']}
</a>
@@ -901,9 +903,9 @@
'" border="0" alt=""
/>';
$item_html .= wfMsg(
'user-recent-activity-gift-rec' ) . " {$user_link_2} {$item_time}</span>
<div
class=\"item\">
- <a
href=\"" . $wgScriptPath .
"/index.php?title=Special:ViewGift&gift_id={$item['id']}\" rel=\"nofollow\">
+ <a
href=\"" . $viewGift->escapeFullURL( "gift_id={$item['id']}" ) . "\"
rel=\"nofollow\">
{$gift_image}
-
{$item["pagetitle"]}
+
{$item['pagetitle']}
</a>
</div>";
break;
@@ -911,9 +913,10 @@
$gift_image = "<img
src=\"{$wgUploadPath}/awards/" .
SystemGifts::getGiftImage( $item['namespace'], 'm' ) .
'" border="0" alt=""
/>';
+ $viewSystemGift =
SpecialPage::getTitleFor( 'ViewSystemGift' );
$item_html .= wfMsg(
'user-recent-system-gift' ) . " {$item_time}
<div
class=\"user-home-item-gift\">
- <a
href=\"" . $wgScriptPath .
"/index.php?title=Special:ViewSystemGift&gift_id={$item['id']}\"
rel=\"nofollow\">
+ <a
href=\"" . $viewSystemGift->escapeFullURL( "gift_id={$item['id']}" ) . "\"
rel=\"nofollow\">
{$gift_image}
{$item['pagetitle']}
</a>
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs