Add a "last activity" method to quickly determine when a list was last used. Bump version.

This commit is contained in:
Mahlon E. Smith 2017-05-24 15:42:39 -07:00
parent b463593c26
commit 33b3c08d75
3 changed files with 15 additions and 1 deletions

View file

@ -664,6 +664,16 @@ class Ezmlm::List
end
### Return a Time object for the last activity on the list, or nil
### if archiving is disabled or there are no posts.
###
def last_activity
file = self.listdir + 'archnum'
return unless file.exist?
return file.stat.mtime
end
### Parse all thread indexes into a single array that can be used
### as a lookup table.
###