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

@@ -27,13 +27,17 @@ class Model_LIBVOLUME extends ORMTSM {
switch (strtolower($this->STATUS)) {
case 'scratch': return strtolower($this->STATUS);
case 'private':
if ($this->VOLUME->STATUS == 'EMPTY')
return 'empty';
switch (strtolower($this->LAST_USE)) {
case 'dbbackup':
case 'data':
return strtolower($this->LAST_USE);
default: return ($this->VOLUME->STATUS == 'EMPTY') ? 'empty' : 'unknown';
default: return 'unkown';
}
default: return 'notcheckedin';
}
}
@@ -80,7 +84,7 @@ class Model_LIBVOLUME extends ORMTSM {
}
public function removable() {
return ($this->usage() == 'dbbackup' OR ($this->usage() != 'scratch' AND $this->VOLUME->STGPOOL->POOLTYPE != 'PRIMARY')) ? TRUE : FALSE;
return ($this->usage() == 'dbbackup' OR (! in_array($this->usage(),array('empty','scratch')) AND $this->VOLUME->STGPOOL->POOLTYPE != 'PRIMARY')) ? TRUE : FALSE;
}
}
?>