Skip to content
Snippets Groups Projects
Commit 411fb8ea authored by Prasad's avatar Prasad
Browse files

Fixes #1091::Uma::Report sharing has been addressed

parents 42115df8 c60556b6
No related branches found
No related tags found
No related merge requests found
......@@ -578,16 +578,16 @@ class Reports_Record_Model extends Vtiger_Record_Model {
$db->pquery('INSERT INTO vtiger_reportsharing(reportid, shareid, setype) VALUES (?,?,?)',
array($reportId, $sharingInfo[$i]['id'], $sharingInfo[$i]['type']));
}
//On every report save delete information from below tables and insert new to avoid
// confusion in updating
$db->pquery('DELETE FROM vtiger_report_shareusers WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharegroups WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharerole WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharers WHERE reportid=?',array($reportId));
$members = $this->get('members',array());
if(!empty($members)) {
//On every report save delete information from below tables and insert new to avoid
// confusion in updating
$db->pquery('DELETE FROM vtiger_report_shareusers WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharegroups WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharerole WHERE reportid=?',array($reportId));
$db->pquery('DELETE FROM vtiger_report_sharers WHERE reportid=?',array($reportId));
$noOfMembers = count($members);
for ($i = 0; $i < $noOfMembers; ++$i) {
$id = $members[$i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment