Skip to content

Commit

Permalink
Merge pull request #6078 from ufoloko/ShowCorrectDeletedDateRecycleBin
Browse files Browse the repository at this point in the history
  • Loading branch information
david-poindexter authored Jun 21, 2024
2 parents 6bb29fc + 080bae1 commit 03f04a4
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
1 change: 1 addition & 0 deletions DNN Platform/Website/DotNetNuke.Website.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,7 @@
<Content Include="Providers\DataProviders\SqlDataProvider\09.11.01.SqlDataProvider" />
<Content Include="Providers\DataProviders\SqlDataProvider\09.11.02.SqlDataProvider" />
<Content Include="Providers\DataProviders\SqlDataProvider\09.12.01.SqlDataProvider" />
<Content Include="Providers\DataProviders\SqlDataProvider\09.13.04.SqlDataProvider" />
<None Include="web.Debug.config">
<DependentUpon>web.config</DependentUpon>
</None>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/************************************************************/
/***** SqlDataProvider *****/
/***** *****/
/***** *****/
/***** Note: To manually execute this script you must *****/
/***** perform a search and replace operation *****/
/***** for {databaseOwner} and {objectQualifier} *****/
/***** *****/
/************************************************************/

/* Fix Deleted Date for Recycle Bin Items #6074 */
/**************************************/

IF OBJECT_ID(N'{databaseOwner}[{objectQualifier}vw_Modules]', N'V') IS NOT NULL
DROP VIEW {databaseOwner}[{objectQualifier}vw_Modules]
GO

CREATE VIEW {databaseOwner}[{objectQualifier}vw_Modules]
AS
SELECT
M.PortalID AS [OwnerPortalID],
DM.PackageID,
T.PortalID,
TM.TabID,
TM.TabModuleID,
M.ModuleID,
M.ModuleDefID,
TM.ModuleOrder,
TM.PaneName,
TM.ModuleTitle,
TM.CacheTime,
TM.CacheMethod,
TM.Alignment,
TM.Color,
TM.Border,
CASE WHEN TM.IconFile LIKE 'fileid=%'
THEN (SELECT IsNull(Folder, '') + [FileName] FROM {databaseOwner}[{objectQualifier}vw_Files]
WHERE FileId = CAST(SUBSTRING(TM.IconFile, 8, 10) AS Int))
ELSE Coalesce(TM.IconFile,'')
END AS IconFile,
TM.Visibility,
TM.Header,
TM.Footer,
TM.ContainerSrc,
TM.DisplayTitle,
TM.DisplayPrint,
TM.DisplaySyndicate,
TM.IsWebSlice,
TM.WebSliceTitle,
TM.WebSliceExpiryDate,
TM.WebSliceTTL,
TM.UniqueId,
TM.VersionGuid,
TM.DefaultLanguageGuid,
TM.LocalizedVersionGuid,
TM.CultureCode,
M.AllTabs,
M.StartDate,
M.EndDate,
T.StartDate AS TabStartDate,
T.EndDate AS TabEndDate,
M.InheritViewPermissions,
M.IsShareable,
M.IsShareableViewOnly,
TM.CreatedByUserID,
TM.CreatedOnDate,
TM.LastModifiedByUserID,
TM.LastModifiedOnDate,
M.LastContentModifiedOnDate,
MD.DesktopModuleID,
MD.DefaultCacheTime,
MD.DefinitionName,
MC.ModuleControlID,
DM.BusinessControllerClass,
DM.IsAdmin,
DM.SupportedFeatures,
CI.ContentItemID,
CI.Content,
CI.ContentTypeID,
CI.ContentKey,
CI.Indexed,
CI.StateID,
TM.IsDeleted AS IsDeleted,
M.IsDeleted AS IsModuleDeleted,
T.IsDeleted AS IsTabDeleted
FROM {databaseOwner}[{objectQualifier}ModuleDefinitions] AS MD
INNER JOIN {databaseOwner}[{objectQualifier}Modules] AS M ON M.ModuleDefID = MD.ModuleDefID
INNER JOIN {databaseOwner}[{objectQualifier}ModuleControls] AS MC ON MD.ModuleDefID = MC.ModuleDefID
INNER JOIN {databaseOwner}[{objectQualifier}DesktopModules] AS DM ON MD.DesktopModuleID = DM.DesktopModuleID
LEFT JOIN {databaseOwner}[{objectQualifier}ContentItems] AS CI ON M.ContentItemID = CI.ContentItemID
LEFT JOIN {databaseOwner}[{objectQualifier}TabModules] AS TM ON M.ModuleID = TM.ModuleID
LEFT JOIN {databaseOwner}[{objectQualifier}Tabs] AS T ON TM.TabID = T.TabID
WHERE (MC.ControlKey IS NULL)
GO

/************************************************************/
/***** SqlDataProvider *****/
/************************************************************/

0 comments on commit 03f04a4

Please sign in to comment.