Private GIT

Skip to content
Snippets Groups Projects
Commit 6a6740b8 authored by Miha Petkovsek's avatar Miha Petkovsek
Browse files

Merge branch 'routing_module' of https://github.com/phpipam/phpipam into routing_module

parents 7aab0479 682cb504
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,7 @@ $readonly = $_POST['action']=="delete" ? "readonly" : "";
<select name="bgp_type" class="form-control input-w-auto input-sm">
<?php
foreach (["internal", "external"] as $type) {
$selected = $bgp->bgp_type == $type ? "selected" : "";
$selected = isset($bgp->bgp_type) && $bgp->bgp_type == $type ? "selected" : "";
print "<option value='$type' $selected>$type</option>";
}
?>
......@@ -110,7 +110,7 @@ $readonly = $_POST['action']=="delete" ? "readonly" : "";
if($customers!=false) {
foreach($customers as $customer) {
if ($customer->id == $bgp->customer_id) { print '<option value="'. $customer->id .'" selected>'.$customer->title.'</option>'; }
if (isset($bgp->customer_id) && $customer->id == $bgp->customer_id) { print '<option value="'. $customer->id .'" selected>'.$customer->title.'</option>'; }
else { print '<option value="'. $customer->id .'">'.$customer->title.'</option>'; }
}
}
......@@ -136,7 +136,7 @@ $readonly = $_POST['action']=="delete" ? "readonly" : "";
if($circuits!=false) {
foreach($circuits as $circuit) {
if ($circuit->id == $bgp->circuit_id) { print '<option value="'. $circuit->id .'" selected>'.$circuit->cid.'</option>'; }
if (isset($bgp->circuit_id) && $circuit->id == $bgp->circuit_id) { print '<option value="'. $circuit->id .'" selected>'.$circuit->cid.'</option>'; }
else { print '<option value="'. $circuit->id .'">'.$circuit->cid.'</option>'; }
}
}
......@@ -162,7 +162,7 @@ $readonly = $_POST['action']=="delete" ? "readonly" : "";
if($vrfs!=false) {
foreach($vrfs as $vrf) {
if ($vrf->vrfId == $bgp->vrf_id) { print '<option value="'. $vrf->vrfId .'" selected>'.$vrf->name.'</option>'; }
if (isset($bgp->vrf_id) && $vrf->vrfId == $bgp->vrf_id) { print '<option value="'. $vrf->vrfId .'" selected>'.$vrf->name.'</option>'; }
else { print '<option value="'. $vrf->vrfId .'">'.$vrf->name.'</option>'; }
}
}
......
......@@ -34,8 +34,8 @@ else {
if( (strlen($customer->long)>0 && strlen($customer->lat))) {
// description and apostrophe fix
$customer->description = strlen($customer->description)>0 ? "<span class=\'text-muted\'>".escape_input($customer->description)."</span>" : "";
$customer->description = str_replace(array("\r\n","\n","\r"), "<br>", $customer->description );
$customer->note = strlen($customer->note)>0 ? "<span class=\'text-muted\'>".escape_input($customer->note)."</span>" : "";
$customer->note = str_replace(array("\r\n","\n","\r"), "<br>", $customer->note );
?>
<script type="text/javascript">
$(document).ready(function() {
......@@ -49,7 +49,7 @@ else {
});
map.addMarker({
title: "'<?php print addslashes($customer->name); ?>'",
title: "'<?php print addslashes($customer->title); ?>'",
lat: '<?php print escape_input($customer->lat); ?>',
lng: '<?php print escape_input($customer->long); ?>'
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment