Index: branches/5.2.x/install/upgrades.sql
===================================================================
diff -u -r14962 -r15010
--- branches/5.2.x/install/upgrades.sql	(.../upgrades.sql)	(revision 14962)
+++ branches/5.2.x/install/upgrades.sql	(.../upgrades.sql)	(revision 15010)
@@ -144,29 +144,27 @@
 
 UPDATE SearchConfig
 SET DisplayName = REPLACE(DisplayName, 'lu_', 'lc_')
-WHERE DisplayName IN (
-	'lu_field_linkid', 'lu_field_url'
-);
+WHERE DisplayName IN ('lu_field_linkid', 'lu_field_url');
 
-UPDATE ConfigurationValues
+UPDATE SystemSettings
 SET Section = 'in-portal:configure_advanced', ModuleOwner = 'In-Portal', Heading = 'la_section_Settings3rdPartyAPI', DisplayOrder = 80.02
 WHERE VariableName = 'l_GoogleMapsAPIKey';
 
-UPDATE ConfigurationValues
+UPDATE SystemSettings
 SET DisplayOrder = DisplayOrder - 0.01
 WHERE VariableName IN ('l_EnableLinkContactForm', 'ReciprocalLinkChecking');
 
-UPDATE Phrase
+UPDATE LanguageLabels
 SET Module = 'In-Link'
 WHERE PhraseKey IN ('LA_LINK_CREATEDON', 'LA_LINK_DESCRIPTION', 'LA_LINK_HITS', 'LA_LINK_NAME', 'LA_LINK_URL');
 
-DELETE FROM Phrase
+DELETE FROM LanguageLabels
 WHERE PhraseKey IN (
 	'LA_LINK_URLSTATUS_PROMPT', 'LA_TEXT_LINK_SEARCH', 'LA_LINK_CATCHEDRATING',
 	'LA_LINK_CATCHEDREVIEWSQTY', 'LA_LINK_CATCHEDVOTESQTY'
 );
 
-DELETE FROM ConfigurationValues
+DELETE FROM SystemSettings
 WHERE VariableName IN (
 	'Link_Highlight_OpenTag', 'Link_Highlight_CloseTag', 'Link_RatingToPop', 'Link_UrlStatus',
 	'Search_Link_CatchedRating', 'Search_Link_CatchedReviewsQty', 'Search_Link_CatchedVotesQty',
@@ -175,9 +173,13 @@
 	'Search_Link_Priority', 'Search_Link_ResourceId', 'Search_Link_ReviewById', 'Search_Link_Status', 'Search_Link_Url'
 );
 
-UPDATE ConfigurationValues
+UPDATE SystemSettings
 SET DisplayOrder = DisplayOrder - 0.01
 WHERE VariableName IN (
 	'link_ReviewDelay_Value', 'link_ReviewDelay_Interval', 'link_RatingDelay_Value', 'link_RatingDelay_Interval',
 	'l_MaxCategories', 'l_EnableGoogleMaps', 'l_EnableLinkContactForm', 'ReciprocalLinkChecking'
 );
+
+UPDATE SearchConfig
+SET ForeignField = 'Users.Username'
+WHERE ForeignField = 'PortalUser.Username' AND ModuleName = 'In-Link';
