[Vtigercrm-commits] [vtiger development] #7234: API: Enable option allow updates only in vtws_transferOwnership
vtiger development
vtiger-tickets at trac.vtiger.com
Wed Nov 23 05:05:29 PST 2011
#7234: API: Enable option allow updates only in vtws_transferOwnership
-------------------------+--------------------------------------------------
Reporter: prasad | Owner: developer
Type: enhancement | Status: new
Priority: unassigned | Milestone: Unassigned
Component: vtigercrm | Version: 5.3.0
Severity: Medium | Keywords:
-------------------------+--------------------------------------------------
To make the API more use, provide option to only update record and
option to avoid deletes. Explicit check before delete should be added as
shown:
File: include/Webservices/Utils.php
{{{
function vtws_transferOwnership($ownerId, $newOwnerId, '''$delete=true''')
{
// ...
if ($delete) {
$sql = "delete from vtiger_tracker where user_id=?";
$db->pquery($sql, array($ownerId));
}
// ...
if ($delete) {
$sql = "delete from vtiger_user2role where userid=?";
$db->pquery($sql, array($ownerId));
}
//...
if ($delete) {
$sql = "delete from vtiger_users2group where userid=?";
$db->pquery($sql, array($ownerId));
}
}}}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7234>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
More information about the vtigercrm-commits
mailing list