"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ajax/map.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

map.php  (glpi-9.3.3.tgz):map.php  (glpi-9.4.0.tgz)
skipping to change at line 55 skipping to change at line 55
]; ];
} else { } else {
$itemtype = $_POST['itemtype']; $itemtype = $_POST['itemtype'];
$params = $_POST['params']; $params = $_POST['params'];
$data = Search::prepareDatasForSearch($itemtype, $params); $data = Search::prepareDatasForSearch($itemtype, $params);
Search::constructSQL($data); Search::constructSQL($data);
Search::constructData($data); Search::constructData($data);
if ($itemtype == 'Location') { if ($itemtype == 'Location') {
$lat_field = array_search(21, $data['toview']); $lat_field = $itemtype . '_21';
$lng_field = array_search(20, $data['toview']); $lng_field = $itemtype . '_20';
$name_field = array_search(1, $data['toview']); $name_field = $itemtype . '_1';
} else { } else {
$lat_field = array_search(998, $data['toview']); $lat_field = $itemtype . '_998';
$lng_field = array_search(999, $data['toview']); $lng_field = $itemtype . '_999';
$name_field = array_search(3, $data['toview']); $name_field = $itemtype . '_3';
} }
if ($itemtype == 'Ticket') { if ($itemtype == 'Ticket') {
//duplicate search options... again! //duplicate search options... again!
$name_field = array_search(83, $data['toview']); $name_field = $itemtype . '_83';
} }
$rows = $data['data']['rows']; $rows = $data['data']['rows'];
$points = []; $points = [];
foreach ($rows as $row) { foreach ($rows as $row) {
$idx = $row['raw']["ITEM_$lat_field"] . ',' . $row['raw']["ITEM_$lng_field "]; $idx = $row['raw']["ITEM_$lat_field"] . ',' . $row['raw']["ITEM_$lng_field "];
if (isset($points[$idx])) { if (isset($points[$idx])) {
$points[$idx]['count'] += 1; $points[$idx]['count'] += 1;
} else { } else {
$points[$idx] = [ $points[$idx] = [
 End of changes. 3 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)