Changeset 4 for trunk


Ignore:
Timestamp:
Sep 8, 2016, 11:14:39 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: PassengerCount table column usage.
  • Fixed: Google map with empty waypoints.
Location:
trunk/Modules
Files:
2 edited

Legend:

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

    r1 r4  
    142142    array_shift($WayPoints);
    143143    array_pop($WayPoints);
     144    if(count($WayPoints) > 0)
     145      $WaypointsQuery = '&waypoints='.implode('|', $WayPoints);
     146      else $WaypointsQuery = '';
    144147
    145148    $Output = '<iframe width="'.$this->Width.'" height="'.$this->Height.'" frameborder="0" scrolling="no" '.
    146149      'marginheight="0" marginwidth="0" src="'.'https://www.google.com/maps/embed/v1/directions'.
    147       '?key='.$this->Key.'&origin='.$this->Path[0].'&waypoints='.implode('|', $WayPoints).
     150      '?key='.$this->Key.'&origin='.$this->Path[0].$WaypointsQuery.
    148151      '&destination='.$this->Path[count($this->Path) - 1].''.
    149152      '" style="border: 1px solid black"></iframe>';
  • trunk/Modules/Ride/Ride.php

    r3 r4  
    7070  `Sequence` int(11) NOT NULL,
    7171  `Price` int(11) NOT NULL,
    72   `PassengerCount` int(11) NOT NULL,
    7372  PRIMARY KEY (`Id`),
    7473  KEY `Ride` (`Ride`)
     
    8382  `RideStopFrom` int(11) NOT NULL,
    8483  `RideStopTo` int(11) NOT NULL,
     84  `PassengerCount` int(11) NOT NULL,
    8585  PRIMARY KEY (`Id`),
    8686  KEY `User` (`User`),
     
    130130    $Output = '<img src="" width="200" height="50" alt="Logo"/> '.
    131131      '<a href="'.$this->System->Link('/hledat/').'">Hledat jízdu</a> nebo '.
    132       '<a href="'.$this->System->Link('/nabídnout/').'">Nabídnout jízdu</a>';
     132      '<a href="'.$this->System->Link('/nova-jizda/').'">Nabídnout jízdu</a>';
    133133    return($Output);
    134134  }
     
    343343        '<tr><td>&nbsp;</td></tr>';
    344344    }
    345     $Output .= '</table';
     345    $Output .= '</table>';
    346346
    347347    return($Output);
     
    465465            'Price' => $TrackItem['Price'],
    466466            'Sequence' => $Index,
     467            'PassengerCount' => 0,
    467468          ));
    468469        }
Note: See TracChangeset for help on using the changeset viewer.