Skip to content

Commit 4614982

Browse files
Set icon location for uploaded tracks
1 parent a5490b7 commit 4614982

File tree

1 file changed

+4
-1
lines changed
  • administrator/components/com_jtg/models

1 file changed

+4
-1
lines changed

administrator/components/com_jtg/models/files.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ function saveFiles()
853853
$targetdir = JPATH_SITE . '/images/jtrackgallery/uploaded_tracks/';
854854
$input = JFactory::getApplication()->input;
855855
$found = $input->getInt('found');
856+
$params = JComponentHelper::getParams('com_jtg');
856857

857858
for ($i = 0;$i < $found;$i++)
858859
{
@@ -866,7 +867,6 @@ function saveFiles()
866867
$catid = $catid ? implode(',', $catid) : '';
867868
}
868869
else {
869-
$params = JComponentHelper::getParams('com_jtg');
870870
$catid = $params->get('jtg_param_default_cat');
871871
}
872872
$level = $input->get('level_' . $i, 0, 'integer');
@@ -961,6 +961,7 @@ function saveFiles()
961961
{
962962
// file is OK
963963
$fileokay = true;
964+
$iconCoords = $gpsData->getIconCoords($params['jtg_param_icon_loc']);
964965
$start_n = $gpsData->start[1];
965966
$start_e = $gpsData->start[0];
966967
$coords = $gpsData->allCoords;
@@ -1011,6 +1012,8 @@ function saveFiles()
10111012
. "\n date='" . $date . "',"
10121013
. "\n start_n='" . $start_n . "',"
10131014
. "\n start_e='" . $start_e . "',"
1015+
. "\n icon_n='" . $iconCoords[1] . "',"
1016+
. "\n icon_e='" . $iconCoords[0] . "',"
10141017
. "\n distance='" . $distance . "',"
10151018
. "\n ele_asc='" . $totalAscent . "',"
10161019
. "\n ele_desc='" . $totalDescent . "',"

0 commit comments

Comments
 (0)