More minor library display fixes

This commit is contained in:
Deon George
2011-06-27 15:11:32 +10:00
parent c4ef5e2275
commit 183f9e3b74
4 changed files with 9 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ class Model_VOLUME extends ORMTSM {
// Age of a volume, based on last read/write access.
public function age() {
if (! $this->LAST_READ_DATE AND ! $this->LAST_WRITE_DATE)
if ((! $this->LAST_READ_DATE AND ! $this->LAST_WRITE_DATE) OR $this->STATUS == 'EMPTY')
return 0;
else
return (int)((time()-(strtotime(strtotime($this->LAST_READ_DATE) > strtotime($this->LAST_WRITE_DATE) ? $this->LAST_WRITE_DATE : $this->LAST_READ_DATE)))/86400);