Skip to content

Commit

Permalink
get external source from entry's custom data
Browse files Browse the repository at this point in the history
  • Loading branch information
olampert committed Feb 25, 2020
1 parent 0c797c5 commit 780010f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions api_v3/web/analyticsSyncServe.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,8 @@ function getPartnerVertical($customData)

function getEntrySourceTypeInt($sourceType, $adminTags, $customData)
{
global $sourceFromAdminTag;
global $externalSources;
global $sourceFromAdminTag, $externalSources;

if (isset($customData['externalSource']))
{
if (isset($externalSources[$customData['externalSource']]))
{
return $externalSources[$customData['externalSource']];
}
}
// check for specific admin tags
$adminTags = explode(',', strtolower($adminTags));
foreach ($adminTags as $adminTag)
Expand All @@ -83,6 +75,12 @@ function getEntrySourceTypeInt($sourceType, $adminTags, $customData)
}
}

// check for external source
if (isset($customData['externalSource']) && isset($externalSources[$customData['externalSource']]))
{
return $externalSources[$customData['externalSource']];
}

// use the source type
return $sourceType;
}
Expand Down

0 comments on commit 780010f

Please sign in to comment.