Resolve "Resq 1.5 changes" #1556

Merged
korina.cordero merged 30 commits from 632-resq-1-5-changes into master-fix 2021-12-03 05:54:22 +00:00
2 changed files with 14 additions and 1 deletions
Showing only changes of commit 84844046f1 - Show all commits

View file

@ -3650,8 +3650,13 @@ class APIController extends Controller implements LoggedController
}
else
{
// TODO: limit locations to 6. If more than 6, pop the first one out
// limit locations to 6. If more than 6, pop the first one out
// add location to existing customer meta
$meta_count = count($c_meta->getAllMetaInfo());
if ($meta_count >= 6)
$c_meta->popMetaInfo();
$c_meta->addMetaInfo($name, $loc_info);
}

View file

@ -76,4 +76,12 @@ class CustomerMetadata
{
return $this->meta_info;
}
public function popMetaInfo()
{
if (count($this->meta_info) > 0)
{
array_shift($this->meta_info);
}
}
}