Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue where the wrong deletion date was shown in recycle bin #6078

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 *****/
/************************************************************/