This commit is contained in:
dopaminereceptionist 2020-05-15 07:07:51 +00:00 committed by GitHub
commit 748d1162a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -405,13 +405,15 @@ func (s *Site) handlePageRequest(c *gin.Context) {
// Destroy page if it is opened and primed
if p.IsPrimedForSelfDestruct && !isLocked && !p.IsEncrypted {
p.Update("<center><em>This page has self-destructed. You cannot return to it.</em></center>\n\n" + p.Text.GetCurrent())
p.Erase()
if p.IsPublished {
command = "/read"
} else {
command = "/view"
if command != "/raw" {
p.Update("<center><em>This page has self-destructed. You cannot return to it.</em></center>\n\n" + p.Text.GetCurrent())
if p.IsPublished {
command = "/read"
} else {
command = "/view"
}
}
p.Erase()
}
if command == "/erase" {
if !isLocked && !p.IsEncrypted {