Page create - Recycle Bin Check
After Delete Page, Cant create page of same name #1645 issue. Added check and message if the page is in the recycle bin.
This commit is contained in:
		| @ -322,6 +322,12 @@ | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     if(!PagePathIsDeleted(page.Path, page.SiteId, _pageList)) | ||||
|                     { | ||||
|                         AddModuleMessage(string.Format(Localizer["Message.Page.Deleted"], _path), MessageType.Warning); | ||||
|                         return; | ||||
|                     } | ||||
|  | ||||
|                     if (!PagePathIsUnique(page.Path, page.SiteId, _pageList)) | ||||
|                     { | ||||
|                         AddModuleMessage(string.Format(Localizer["Message.Page.Exists"], _path), MessageType.Warning); | ||||
| @ -412,4 +418,9 @@ | ||||
|     { | ||||
|         return !existingPages.Any(page => page.SiteId == siteId && page.Path == pagePath); | ||||
|     } | ||||
|  | ||||
|     private static bool PagePathIsDeleted(string pagePath, int siteId, List<Page> existingPages) | ||||
|     { | ||||
|         return !existingPages.Any(page => page.SiteId == siteId && page.Path == pagePath && page.IsDeleted == true); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Leigh
					Leigh