Ignore:
Timestamp:
Feb 4, 2016, 5:03:08 PM (9 years ago)
Author:
chronos
Message:
  • Fixed: Page javascript script was not loaded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Map/Map.php

    r745 r796  
    2222  function ShowPosition()
    2323  {
    24     $DbResult = $this->Database->select('MapPosition', '*', 'Id='.$_GET['i']);
     24    $DbResult = $this->Database->select('MapPosition', '*', '`Id`='.$_GET['i']);
    2525    if($DbResult->num_rows > 0)
    2626    {
     
    5151    function initialize()
    5252    {
     53
    5354      if (GBrowserIsCompatible())
    5455      {
     
    8889      {
    8990        NetworkLinks = [';
    90     $DbResult = $this->Database->query('SELECT * FROM NetworkLink WHERE Interface1 <> 0 AND Interface2 <> 0');
     91    $DbResult = $this->Database->query('SELECT * FROM `NetworkLink` WHERE (`Interface1` <> 0) AND (`Interface2` <> 0)');
    9192    while($Link = $DbResult->fetch_assoc())
    9293    {
    93       $DbResult2 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Pos FROM NetworkDevice '.
    94         'JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition '.
    95         'WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface1'].')');
    96       $DbResult3 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Pos FROM NetworkDevice '.
    97         'JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition '.
    98         'WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface2'].')');
     94      $DbResult2 = $this->Database->query('SELECT `NetworkDevice`.`Used`, `MapPosition`.`Pos` FROM `NetworkDevice` '.
     95        'JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '.
     96        'WHERE `NetworkDevice`.`Id` = (SELECT `NetworkInterface`.`Device` FROM `NetworkInterface` WHERE `NetworkInterface`.`Id` = '.$Link['Interface1'].')');
     97      $DbResult3 = $this->Database->query('SELECT `NetworkDevice`.`Used`, `MapPosition`.`Pos` FROM `NetworkDevice` '.
     98        'JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '.
     99        'WHERE `NetworkDevice`.`Id` = (SELECT `NetworkInterface`.`Device` FROM `NetworkInterface` WHERE `NetworkInterface`.`Id` = '.$Link['Interface2'].')');
    99100      if(($DbResult2->num_rows > 0) and ($DbResult3->num_rows > 0))
    100101      {
     
    136137        NetworkDevices = [';
    137138
    138     $DbResult = $this->Database->query('SELECT GROUP_CONCAT(NetworkDevice.Name SEPARATOR ",") AS Name, '.
    139       'MapPosition.Pos AS Pos, MapPosition.Name AS NodeName '.
    140       'FROM NetworkDevice LEFT JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition '.
    141       'WHERE (NetworkDevice.Used=1) AND (NetworkDevice.MapPosition IS NOT NULL) '.
    142       'GROUP BY NetworkDevice.MapPosition');
     139    $DbResult = $this->Database->query('SELECT GROUP_CONCAT(`NetworkDevice`.`Name` SEPARATOR ",") AS `Name`, '.
     140      '`MapPosition`.`Pos` AS `Pos`, `MapPosition`.`Name` AS `NodeName` '.
     141      'FROM `NetworkDevice` LEFT JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '.
     142      'WHERE (`NetworkDevice`.`Used`=1) AND (`NetworkDevice`.`MapPosition` IS NOT NULL) '.
     143      'GROUP BY `NetworkDevice`.`MapPosition`');
    143144    while($Device = $DbResult->fetch_assoc())
    144145    {
Note: See TracChangeset for help on using the changeset viewer.