check vw_modules, if the select list contains MC.HelpURL, otherwise run
/* Add Modules View */
/********************/
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}vw_Modules]') and OBJECTPROPERTY(id, N'IsView') = 1)
DROP VIEW {databaseOwner}[{objectQualifier}vw_Modules]
GO
CREATE VIEW {databaseOwner}[{objectQualifier}vw_Modules]
AS
SELECT
M.PortalID,
TM.TabId,
TM.TabModuleId,
M.ModuleID,
M.ModuleDefID,
TM.ModuleOrder,
TM.PaneName,
M.ModuleTitle,
TM.CacheTime,
TM.Alignment,
TM.Color,
TM.Border,
CASE WHEN LEFT(LOWER(TM.IconFile), 6) = 'fileid'
THEN
(SELECT Folder + FileName
FROM {objectQualifier}Files
WHERE 'fileid=' + convert(varchar,{objectQualifier}Files.FileID) = TM.IconFile
)
ELSE
TM.IconFile
END
AS IconFile,
M.AllTabs,
TM.Visibility,
M.IsDeleted,
M.Header,
M.Footer,
M.StartDate,
M.EndDate,
TM.ContainerSrc,
TM.DisplayTitle,
TM.DisplayPrint,
TM.DisplaySyndicate,
M.InheritViewPermissions,
DM.*,
MC.ModuleControlId,
MC.ControlSrc,
MC.ControlType,
MC.ControlTitle,
MC.HelpURL
FROM {objectQualifier}ModuleDefinitions AS MD
INNER JOIN {objectQualifier}Modules AS M ON MD.ModuleDefID = M.ModuleDefID
INNER JOIN {objectQualifier}DesktopModules AS DM ON MD.DesktopModuleID = DM.DesktopModuleID
INNER JOIN {objectQualifier}ModuleControls AS MC ON MD.ModuleDefID = MC.ModuleDefID
LEFT OUTER JOIN {objectQualifier}Tabs AS T
INNER JOIN {objectQualifier}TabModules AS TM ON T.TabID = TM.TabID
ON M.ModuleID = TM.ModuleID
WHERE (MC.ControlKey IS NULL)
GO