Parcourir la source

Ticket #4856 - Privacy: Membership levels from custom groups aren't deleted with deleted content.

AntonLV il y a 1 an
Parent
commit
fc433f957a
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      inc/classes/BxDolPrivacyQuery.php

+ 4 - 2
inc/classes/BxDolPrivacyQuery.php

@@ -282,8 +282,10 @@ class BxDolPrivacyQuery extends BxDolDb
             return true;
 
         $bResult = $this->query("DELETE FROM `sys_privacy_groups_custom` WHERE " . $sWhereClause . " LIMIT 1") !== false;
-        if($bResult)
-            $this->deleteGroupCustomMember(array('group_id' => $aGroup['id']));
+        if($bResult) {
+            $this->deleteGroupCustomMember(['group_id' => $aGroup['id']]);
+            $this->deleteGroupCustomMembership(['group_id' => $aGroup['id']]);
+        }
 
         return $bResult;
     }