Allow users to upload small archives.
Fix the ordering of functions in topic.Delete.
This commit is contained in:
parent
f88b8d9777
commit
f227aadb6d
@ -64,12 +64,14 @@ var AllowedFileExts = StringList{
|
||||
"mp3", "mp4", "avi", "wmv", "webm", // video
|
||||
|
||||
"otf", "woff2", "woff", "ttf", "eot", // fonts
|
||||
|
||||
"bz2", "zip", "gz", "7z", "tar", "cab","rar", // archives
|
||||
}
|
||||
var ImageFileExts = StringList{
|
||||
"png", "jpg", "jpe","jpeg","jif","jfi","jfif", "svg", "bmp", "gif", "tiff","tif", "webp", /* "apng",*/
|
||||
}
|
||||
var ArchiveFileExts = StringList{
|
||||
"bz2", "zip", "gz", "7z", "tar", "cab",
|
||||
"bz2", "zip", "gz", "7z", "tar", "cab","rar",
|
||||
}
|
||||
var ExecutableFileExts = StringList{
|
||||
"exe", "jar", "phar", "shar", "iso",
|
||||
|
@ -342,16 +342,15 @@ func (t *Topic) Delete() error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = Forums.RemoveTopic(t.ParentID)
|
||||
if err != nil && err != ErrNoRows {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = topicStmts.delete.Exec(t.ID)
|
||||
t.cacheRemove()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = Forums.RemoveTopic(t.ParentID)
|
||||
if err != nil && err != ErrNoRows {
|
||||
return err
|
||||
}
|
||||
_, err = topicStmts.deleteActivitySubs.Exec(t.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user