don't display backend links without front connection on "Showing all objects" gv map
authorgithub138 <m.ehinger@ltur.de>
Tue, 26 Feb 2013 12:57:09 +0000 (13:57 +0100)
committergithub138 <m.ehinger@ltur.de>
Wed, 24 Jul 2013 11:24:14 +0000 (13:24 +0200)
linkmgmt.php

index 7fbcd83..c2bb534 100644 (file)
@@ -1187,8 +1187,16 @@ class linkmgmt_gvmap {
                        $where = " WHERE Object.id = ?";
                        $qparams[] = $object_id;
 
-                       if(!$allports)
+                       if(!$allports) {
                                $where .= " AND remotePort.id is not NULL";
+
+                               if($linktype != 'front') {
+                                       $join .= "LEFT JOIN Link as FrontLink on Port.id in (FrontLink.porta ,FrontLink.portb)
+                                                 LEFT JOIN Link as FrontRemoteLink on remotePort.id in (FrontRemoteLink.porta, FrontRemoteLink.portb)
+                                               ";
+                                       $where .= " AND FrontLink.porta is not NULL AND FrontRemoteLink.porta is not NULL";
+                               }
+                       }
                }
                else
                {