Index: branches/5.1.x/install/upgrades.sql =================================================================== diff -u -N -r13186 -r13466 --- branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13186) +++ branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13466) @@ -66,3 +66,11 @@ # ===== v 5.1.0-B1 ===== UPDATE Modules SET Path = 'modules/in-link/' WHERE `Name` = 'In-Link'; DELETE FROM ConfigurationValues WHERE VariableName IN ('StartValidationTime', 'LastExpirationTime', 'Link_Root'); + +UPDATE CustomField +SET ValueList = '=+||SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM CountryStates WHERE Type = 2 ORDER BY StateCountryId DESC, IsoCode ASC' +WHERE ValueList = '=+||SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM StdDestinations WHERE DestType = 2 AND (DestParentId = 225 OR DestParentId = 38) ORDER BY DestParentId DESC, DestAbbr ASC'; + +UPDATE CustomField +SET ValueList = '=+||SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM CountryStates WHERE Type = 1 ORDER BY IsoCode ASC' +WHERE ValueList = '=+||SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC'; Index: branches/5.1.x/install/install_data.sql =================================================================== diff -u -N -r13442 -r13466 --- branches/5.1.x/install/install_data.sql (.../install_data.sql) (revision 13442) +++ branches/5.1.x/install/install_data.sql (.../install_data.sql) (revision 13466) @@ -2,10 +2,10 @@ INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_Highlight_OpenTag', '', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_Highlight_CloseTag', '', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_RatingToPop', '5', 'In-Link', 'in-link:configuration_output', '', '', '', NULL, NULL, 0, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField', 'Name', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'Name=la_Link_Name,Description=la_Link_Description,Url=la_Link_URL,CreatedOn=la_opt_CreatedOn,Hits=la_Link_Hits,CachedRating=la_opt_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 4) AND (IsSystem = 0)', 10.01, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField2', 'Description', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'Name=la_Link_Name,Description=la_Link_Description,Url=la_Link_URL,CreatedOn=la_opt_CreatedOn,Hits=la_Link_Hits,CachedRating=la_opt_Rating,SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 4) AND (IsSystem = 0)', 10.02, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder2', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField', 'Name', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'Name=la_Link_Name||Description=la_Link_Description||Url=la_Link_URL||CreatedOn=la_opt_CreatedOn||Hits=la_Link_Hits||CachedRating=la_opt_Rating||SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 4) AND (IsSystem = 0)', 10.01, 1, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield_prompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.01, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortField2', 'Description', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'Name=la_Link_Name||Description=la_Link_Description||Url=la_Link_URL||CreatedOn=la_opt_CreatedOn||Hits=la_Link_Hits||CachedRating=la_opt_Rating||SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM CustomField WHERE (Type = 4) AND (IsSystem = 0)', 10.02, 1, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_SortOrder2', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_sortfield2_prompt', 'select', '', 'asc=la_common_ascending||desc=la_common_descending', 10.02, 2, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Links', '10', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Links_Short', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_perpage_short_prompt', 'text', '', '', 10.04, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_NewDays', '100', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_newdays_prompt', 'text', '', '', 10.05, 0, 1, NULL); @@ -17,18 +17,18 @@ INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ShowPick', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_editorspick_prompt', 'checkbox', '', '', 10.11, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_UrlStatus', '', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_link_urlstatus_prompt', 'checkbox', '', '', 10.12, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Value', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 10.13, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.13, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_ReviewDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.13, 2, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Value', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.14, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.14, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'link_RatingDelay_Interval', '2419200', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.14, 2, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_MaxCategories', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_MaxCategories', 'text', NULL, NULL, 10.15, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_EnableGoogleMaps', '0', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_LinkEnableGoogleMaps', 'checkbox', NULL, NULL, 10.16, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_GoogleMapsAPIKey', '', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_fld_LinkGoogleMapsAPIKey', 'text', NULL, NULL, 10.17, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_EnableLinkContactForm', '1', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_config_EnableLinkContactForm', 'checkbox', NULL, NULL, 10.18, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ReciprocalLinkChecking', '0', 'In-Link', 'in-link:configuration_output', 'la_Text_Links', 'la_config_ReciprocalLinkChecking', 'checkbox', NULL, NULL, 10.19, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort', 'CreatedOn', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.01, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.01, 2, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort2', 'ReviewText', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn', 20.02, 1, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder2', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending,desc=la_common_Descending', 20.02, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort', 'CreatedOn', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.01, 1, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder', 'desc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.01, 2, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsSort2', 'ReviewText', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'ReviewText=la_opt_CommentText||CreatedOn=la_opt_CreatedOn', 20.02, 1, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Link_ReviewsOrder2', 'asc', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_link_sortreviews2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 20.02, 2, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_LinkReviews', '10', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_review_perpage_prompt', 'text', NULL, NULL, 20.03, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_LinkReviews_Short', '3', 'In-Link', 'in-link:configuration_output', 'la_Text_Reviews', 'la_review_perpage_short_prompt', 'text', NULL, NULL, 20.04, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'l_CategoryTemplate', '/in-link/designs/section', 'In-Link', 'in-link:configuration_output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 30.01, 0, 0, NULL); @@ -107,8 +107,8 @@ INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkAddress', 'lu_fld_LinkAddress', 0, 'la_section_BusinessLocation', 'la_fld_LinkAddress', 'text', 'size="40"', '', 1, 1, 0, 0); INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCity', 'lu_fld_LinkCity', 0, 'la_section_BusinessLocation', 'la_fld_LinkCity', 'text', 'size="40"', '', 2, 1, 0, 0); INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkZipCode', 'lu_fld_LinkZipCode', 0, 'la_section_BusinessLocation', 'la_fld_LinkZipCode', 'text', NULL, '', 4, 1, 0, 0); -INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkState', 'lu_fld_LinkState', 0, 'la_section_BusinessLocation', 'la_fld_LinkState', 'select', '=+||SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM StdDestinations WHERE DestType = 2 AND (DestParentId = 225 OR DestParentId = 38) ORDER BY DestParentId DESC, DestAbbr ASC', '', 3, 1, 0, 0); -INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCountry', 'lu_fld_LinkCountry', 0, 'la_section_BusinessLocation', 'la_fld_LinkCountry', 'select', '=+||SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC', '', 5, 1, 0, 0); +INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkState', 'lu_fld_LinkState', 0, 'la_section_BusinessLocation', 'la_fld_LinkState', 'select', '=+||SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM CountryStates WHERE Type = 2 ORDER BY StateCountryId DESC, IsoCode ASC', '', 3, 1, 0, 0); +INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCountry', 'lu_fld_LinkCountry', 0, 'la_section_BusinessLocation', 'la_fld_LinkCountry', 'select', '=+||SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM CountryStates WHERE Type = 1 ORDER BY IsoCode ASC', '', 5, 1, 0, 0); INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkPhone', 'lu_fld_LinkPhone', 0, 'la_section_BusinessLocation', 'la_fld_LinkPhone', 'text', NULL, '', 6, 1, 0, 0); INSERT INTO ItemTypes VALUES (4, 'In-Link', 'l', 'Link', 'Name', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_Links', 1, 'in-link/admin/addlink.php', 'clsLink', 'Link');