Library fixes for TSM6

This commit is contained in:
Deon George
2011-06-26 22:47:20 +10:00
parent 9cfd1dc3df
commit fe62c848c4
6 changed files with 9 additions and 169 deletions

View File

@@ -124,7 +124,7 @@ class Model_LIBRARY extends ORMTSM {
foreach ($this->storagepools() as $spo)
foreach ($spo->VOLUME->find_all() as $vo)
if ($vo->MEDIA->STATUS != 'MOUNTABLEINLIB')
if (! $vo->MEDIA->inlib())
array_push($result,$vo);
Sort::masort($result,'VOLUME_NAME');

View File

@@ -20,5 +20,9 @@ class Model_MEDIA extends ORMTSM {
);
protected $_has_many = array(
);
public function inlib() {
return in_array($this->STATE,array('MOUNTABLEINLIB','Mountable in library'));
}
}
?>

View File

@@ -33,7 +33,7 @@ class Model_STGPOOL extends ORMTSM {
if (! isset($result[$inout]))
foreach ($this->VOLUME->find_all() as $vo) {
$state = ($vo->MEDIA->STATE == 'MOUNTABLEINLIB') ? 'in' : 'out';
$state = $vo->MEDIA->inlib() ? 'in' : 'out';
$result[$state][$vo->STATUS][] = $vo;
}