Library fixes for TSM6
This commit is contained in:
@@ -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');
|
||||
|
@@ -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'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user