r1361 + bugfix: nameless object in link list could not be clicked
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 6 Dec 2007 12:12:10 +0000 (12:12 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 6 Dec 2007 12:12:10 +0000 (12:12 +0000)
ChangeLog
TODO
inc/database.php

index ac17d3fe8b43db2f313936a3d17b6694d77b4f49..531ca2a100ecfd2966a0c4792386288422cf47fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
        bugfix: adjusted hardcoded values in VLAN trigger
        bugfix: adjusted HW, SW and port types in SNMP data collector
        bugfix: Cisco connector: tolerate switch ports in suspended state
+       bugfix: nameless object in link list could not be clicked
        new feature: UI option to control asset tag warning
 0.14.7 2007-12-05
        bugfix: provide better SQL dumps for new installations
diff --git a/TODO b/TODO
index 1a35823e1b2758d6411bc1c7ac06ec6e65e20168..f0525d2fd0ed0bb73db2ff29af6f196b22c22a5d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,7 +10,7 @@
        - connected objects in distinct rack rows
        - last history entries
        - warranty expiration
-- bug: can't view/click on remote side in port list, if remote side is nameless
++ bug: can't view/click on remote side in port list, if remote side is nameless
 - bug: cannot update port 'e4/4', if port 'e 4/4' exists
 - use user ID instead of username where possible
 - check words usage before deletion from a chapter
index 5400bb79960bc8a0da3fb75be7bf7da95790c578..788c4056334e02ab1fb384311dbeeccd63c95a80 100644 (file)
@@ -275,6 +275,12 @@ function getObjectPortsAndLinks ($object_id = 0)
                        $ret[$count]['remote_name'] = htmlentities ($row['RemotePort_name'], ENT_QUOTES);
                        $ret[$count]['remote_object_id'] = $row['RemotePort_object_id'];
                        $ret[$count]['remote_object_name'] = $row['RackObject_name'];
+                       // Save on displayedName() calls.
+                       if (empty ($row['RackObject_name']) and !empty ($row['RemotePort_object_id']))
+                       {
+                               $oi = getObjectInfo ($row['RemotePort_object_id']);
+                               $ret[$count]['remote_object_name'] = displayedName ($oi);
+                       }
                        $count++;
                }
        }