[Tweak] Removed one db call to oqrs in menu. Set variable and check on variable instead of two calls.

pull/1942/head
Andreas 2023-01-17 20:58:23 +01:00
rodzic 64261b4d87
commit 7e9e23e9b7
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -239,8 +239,10 @@ if ($logbooks_locations_array) {
} else {
$location_list = null;
}
$oqrs_requests = $CI->oqrs_model->oqrs_requests($location_list);
?>
<a class="dropdown-item" href="<?php echo site_url('oqrs/requests');?>" title="OQRS Requests"><i class="fa fa-id-card"></i> OQRS Requests <?php if ($CI->oqrs_model->oqrs_requests($location_list) > 0) { echo "<span class=\"badge badge-light\">".$CI->oqrs_model->oqrs_requests($location_list)."</span>"; } ?></a>
<a class="dropdown-item" href="<?php echo site_url('oqrs/requests');?>" title="OQRS Requests"><i class="fa fa-id-card"></i> OQRS Requests <?php if ($oqrs_requests > 0) { echo "<span class=\"badge badge-light\">".$oqrs_requests."</span>"; } ?></a>
<a class="dropdown-item" href="<?php echo site_url('qslprint');?>" title="Print Requested QSLs"><i class="fas fa-print"></i> Print Requested QSLs</a>