Some functions had been moved away from include/items.php
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user