mirror of https://github.com/itflow-org/itflow
Fix Custom Links in the Top nav from breaking ITFlow if the database isnt updated to 1.4.6
This commit is contained in:
parent
1df98166bd
commit
910787c81c
50
top_nav.php
50
top_nav.php
|
|
@ -28,33 +28,37 @@
|
||||||
<!-- Right navbar links -->
|
<!-- Right navbar links -->
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
|
|
||||||
<!--Custom Nav Link -->
|
<?php if(CURRENT_DATABASE_VERSION > '1.4.5' ) { // Check DB Version REMOVE on Decemeber 1st 2024 -Johnny ?>
|
||||||
<?php
|
|
||||||
$sql_custom_links = mysqli_query($mysqli, "SELECT * FROM custom_links WHERE custom_link_location = 2 AND custom_link_archived_at IS NULL
|
|
||||||
ORDER BY custom_link_order ASC, custom_link_name ASC"
|
|
||||||
);
|
|
||||||
|
|
||||||
while ($row = mysqli_fetch_array($sql_custom_links)) {
|
<!--Custom Nav Link -->
|
||||||
$custom_link_name = nullable_htmlentities($row['custom_link_name']);
|
<?php
|
||||||
$custom_link_uri = nullable_htmlentities($row['custom_link_uri']);
|
$sql_custom_links = mysqli_query($mysqli, "SELECT * FROM custom_links WHERE custom_link_location = 2 AND custom_link_archived_at IS NULL
|
||||||
$custom_link_icon = nullable_htmlentities($row['custom_link_icon']);
|
ORDER BY custom_link_order ASC, custom_link_name ASC"
|
||||||
$custom_link_new_tab = intval($row['custom_link_new_tab']);
|
);
|
||||||
if ($custom_link_new_tab == 1) {
|
|
||||||
$target = "target='_blank' rel='noopener noreferrer'";
|
|
||||||
} else {
|
|
||||||
$target = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
while ($row = mysqli_fetch_array($sql_custom_links)) {
|
||||||
|
$custom_link_name = nullable_htmlentities($row['custom_link_name']);
|
||||||
|
$custom_link_uri = nullable_htmlentities($row['custom_link_uri']);
|
||||||
|
$custom_link_icon = nullable_htmlentities($row['custom_link_icon']);
|
||||||
|
$custom_link_new_tab = intval($row['custom_link_new_tab']);
|
||||||
|
if ($custom_link_new_tab == 1) {
|
||||||
|
$target = "target='_blank' rel='noopener noreferrer'";
|
||||||
|
} else {
|
||||||
|
$target = "";
|
||||||
|
}
|
||||||
|
|
||||||
<li class="nav-item" title="<?php echo $custom_link_name; ?>">
|
?>
|
||||||
<a href="<?php echo $custom_link_uri; ?>" <?php echo $target; ?> class="nav-link">
|
|
||||||
<i class="fas fa-<?php echo $custom_link_icon; ?> nav-icon"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php } ?>
|
<li class="nav-item" title="<?php echo $custom_link_name; ?>">
|
||||||
<!-- End Custom Nav Links -->
|
<a href="<?php echo $custom_link_uri; ?>" <?php echo $target; ?> class="nav-link">
|
||||||
|
<i class="fas fa-<?php echo $custom_link_icon; ?> nav-icon"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
<!-- End Custom Nav Links -->
|
||||||
|
|
||||||
|
<?php } // End DB Check ?>
|
||||||
|
|
||||||
<!-- New Notifications Dropdown -->
|
<!-- New Notifications Dropdown -->
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue