Only list enabled Storage Areas

pull/2881/head
Isaac Connor 2020-03-04 10:46:59 -05:00
parent 077b8888f9
commit ac00ca0ad8
2 changed files with 8 additions and 5 deletions

View File

@ -352,7 +352,7 @@ if ( ZM_OPT_USE_AUTH and $user ) {
?> ?>
<p class="navbar-text"> <p class="navbar-text">
<i class="material-icons">account_circle</i> <i class="material-icons">account_circle</i>
<?php echo makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?> <?php echo makePopupLink('?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == 'builtin')) ?>
</p> </p>
<?php <?php
} }
@ -396,7 +396,7 @@ if ( (!ZM_OPT_USE_AUTH) or $user ) {
?> ?>
<li><?php echo translate('Storage') ?>: <li><?php echo translate('Storage') ?>:
<?php <?php
$storage_areas = ZM\Storage::find(); $storage_areas = ZM\Storage::find(array('Enabled'=>true));
$storage_paths = null; $storage_paths = null;
$storage_areas_with_no_server_id = array(); $storage_areas_with_no_server_id = array();
foreach ( $storage_areas as $area ) { foreach ( $storage_areas as $area ) {

View File

@ -901,9 +901,12 @@ if ( $monitor->Type() == 'Local' ) {
<?php <?php
if ( $monitor->Type() == 'Remote' ) { if ( $monitor->Type() == 'Remote' ) {
?> ?>
<tr id="RTSPDescribe"<?php if ( $monitor->Protocol()!= 'rtsp' ) { echo ' style="display:none;"'; } ?>><td><?php echo translate('RTSPDescribe') ?>&nbsp;(<?php echo makePopupLink( '?view=optionhelp&amp;option=OPTIONS_RTSPDESCRIBE', 'zmOptionHelp', 'optionhelp', '?' ) ?>) </td><td><input type="checkbox" name="newMonitor[RTSPDescribe]" value="1"<?php if ( $monitor->RTSPDescribe() ) { ?> checked="checked"<?php } ?>/></td></tr> <tr id="RTSPDescribe"<?php if ( $monitor->Protocol()!= 'rtsp' ) { echo ' style="display:none;"'; } ?>>
<td><?php echo translate('RTSPDescribe') ?>&nbsp;(<?php echo makePopupLink( '?view=optionhelp&amp;option=OPTIONS_RTSPDESCRIBE', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
<td><input type="checkbox" name="newMonitor[RTSPDescribe]" value="1"<?php if ( $monitor->RTSPDescribe() ) { ?> checked="checked"<?php } ?>/></td>
</tr>
<?php <?php
} } # end if monitor->Type() == 'Remote'
break; break;
} }
case 'storage' : case 'storage' :
@ -913,7 +916,7 @@ if ( $monitor->Type() == 'Local' ) {
<td> <td>
<?php <?php
$storage_areas = array(0=>'Default'); $storage_areas = array(0=>'Default');
foreach ( ZM\Storage::find(NULL, array('order'=>'lower(Name)')) as $Storage ) { foreach ( ZM\Storage::find(array('Enabled'=>true), array('order'=>'lower(Name)')) as $Storage ) {
$storage_areas[$Storage->Id()] = $Storage->Name(); $storage_areas[$Storage->Id()] = $Storage->Name();
} }
echo htmlSelect('newMonitor[StorageId]', $storage_areas, $monitor->StorageId()); echo htmlSelect('newMonitor[StorageId]', $storage_areas, $monitor->StorageId());