mirror of
https://github.com/Combodo/iTop.git
synced 2026-06-17 21:36:38 +02:00
Compare commits
1 Commits
feature/89
...
feature/96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcea589a35 |
@@ -300,7 +300,7 @@
|
||||
*
|
||||
* Add the current contact associated Person to the contacts_list of this Ticket
|
||||
* No error if there is no associated Person or if the Person is already in the list
|
||||
* @return bool Return true on success
|
||||
* @return bool Return true if link was created, false otherwise
|
||||
*/
|
||||
</comment>
|
||||
<static>false</static>
|
||||
@@ -314,12 +314,11 @@
|
||||
$oLnk = MetaModel::NewObject('lnkContactToTicket');
|
||||
$oLnk->Set('contact_id', $iPersonId);
|
||||
$oLnk->Set('ticket_id', $this->GetKey());
|
||||
$oContactsSet->AddItem($oLnk);
|
||||
$this->Set('contacts_list', $oContactsSet);
|
||||
$this->DBUpdate();
|
||||
$oLnk->DBInsert();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}]]></code>
|
||||
<arguments/>
|
||||
</method>
|
||||
@@ -328,7 +327,7 @@
|
||||
*
|
||||
* Remove the current user associated Person from the contacts_list of this Ticket
|
||||
* No error if there is no associated Person or if the Person is not in the list
|
||||
* @return bool Return true
|
||||
* @return bool Return true if link was deleted, false otherwise
|
||||
*/
|
||||
</comment>
|
||||
<static>false</static>
|
||||
@@ -340,14 +339,12 @@
|
||||
$oContactsSet = $this->Get('contacts_list');
|
||||
foreach ($oContactsSet as $oLnk) {
|
||||
if ($oLnk->Get('contact_id') == $iPersonId) {
|
||||
$oContactsSet->RemoveItem($oLnk->GetKey());
|
||||
$this->Set('contacts_list', $oContactsSet);
|
||||
$this->DBUpdate();
|
||||
$oLnk->DBDelete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}]]></code>
|
||||
<arguments/>
|
||||
</method>
|
||||
|
||||
Reference in New Issue
Block a user