Some functions had been moved away from include/items.php
This commit is contained in:
parent
6b44fbbda0
commit
3ace5d0d1d
3 changed files with 86 additions and 90 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue