- Timestamp:
- May 31, 2009, 9:10:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/is/topologie-gen.php
r222 r223 70 70 $this->border[0]=0; 71 71 $mark = array(); 72 $markskip = 0; 72 73 73 74 do { … … 75 76 $query = 'SELECT dev.id AS id FROM NetworkDevice dev WHERE dev.name = "'.$TopHostName.'" LIMIT 0,1'; 76 77 } else { 77 $query = 'SELECT trg. idAS id FROM NetworkDevice dev, NetworkInterface ifc, NetworkLink lnk, NetworkInterface trg WHERE ifc.device = dev.id AND lnk.interface2 = ifc.id AND lnk.interface1 = trg.id AND dev.used=1 AND ';78 $query = 'SELECT trg.device AS id FROM NetworkDevice dev, NetworkInterface ifc, NetworkLink lnk, NetworkInterface trg WHERE ifc.device = dev.id AND lnk.interface2 = ifc.id AND lnk.interface1 = trg.id AND dev.used=1 AND '; 78 79 $query .= ' dev.id = '.$parentNode->index.' ORDER BY id'; 79 $query .= ' LIMIT '. count($parentNode->children).',1';80 $query .= ' LIMIT '.(count($parentNode->children)+$markskip).',1'; 80 81 } 81 82 $DbResult = $Database->query($query); 82 83 $item = $DbResult->fetch_array(); 83 84 if ($item) { 84 // echo $item['id'].' <br/>';85 // echo $item['id'].','.$parentNode->index.','.$level.'<br/>'; 85 86 // flush(); 86 87 if (!isset($mark[$item['id']])) { … … 99 100 $level++; 100 101 $this->border[$level] = 0; 102 $markskip = 0; 103 } else { 104 $markskip++; 101 105 } 102 106 } else { … … 104 108 $parentNode = $currentNode->parentItem; 105 109 $level--; 110 $markskip = 0; 106 111 } 107 112 } while($level >= 1);
Note:
See TracChangeset
for help on using the changeset viewer.