1
0
Fork 0

Some functions had been moved away from include/items.php

This commit is contained in:
Michael 2018-01-24 20:27:32 +00:00
commit 3ace5d0d1d
3 changed files with 86 additions and 90 deletions

View file

@ -238,7 +238,7 @@ class Delivery {
return;
}
$item_contact = get_item_contact($item,$icontacts);
$item_contact = self::getItemContact($item,$icontacts);
if (!$item_contact) {
return;
}
@ -505,4 +505,17 @@ class Delivery {
return;
}
private static function getItemContact($item, $contacts)
{
if (!count($contacts) || !is_array($item)) {
return false;
}
foreach ($contacts as $contact) {
if ($contact['id'] == $item['contact-id']) {
return $contact;
}
}
return false;
}
}