Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Madhuk
vtigercrm
Commits
2f2ddd22
Commit
2f2ddd22
authored
5 years ago
by
Uma
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #167 Record deletion clean ModComments
parent
a9dbfc68
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php
+12
-0
12 additions, 0 deletions
...r/modules/RecycleBin/modules/RecycleBin/models/Module.php
with
12 additions
and
0 deletions
pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php
+
12
−
0
View file @
2f2ddd22
...
...
@@ -149,6 +149,9 @@ class RecycleBin_Module_Model extends Vtiger_Module_Model {
$query
=
'DELETE FROM vtiger_relatedlists_rb WHERE entityid in('
.
generateQuestionMarks
(
$recordIds
)
.
')'
;
$db
->
pquery
(
$query
,
array
(
$recordIds
));
// Delete related mod comments
$this
->
deleteRelatedComments
(
$recordIds
);
// TODO - Remove records from module tables and other related stores.
$query
=
'DELETE FROM vtiger_modtracker_basic WHERE crmid in('
.
generateQuestionMarks
(
$recordIds
)
.
')'
;
...
...
@@ -244,4 +247,13 @@ class RecycleBin_Module_Model extends Vtiger_Module_Model {
public
function
isQuickSearchEnabled
()
{
return
true
;
}
public
function
deleteRelatedComments
(
$recordIds
)
{
$db
=
PearDatabase
::
getInstance
();
$query
=
'DELETE vtiger_crmentity.* FROM vtiger_crmentity '
.
'INNER JOIN vtiger_modcomments ON vtiger_modcomments.modcommentsid = vtiger_crmentity.crmid '
.
'WHERE vtiger_modcomments.related_to in('
.
generateQuestionMarks
(
$recordIds
)
.
')'
;
$db
->
pquery
(
$query
,
array
(
$recordIds
));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment