19 declare(strict_types=1);
32 $res = $this->db->queryF(
33 "SELECT * FROM settings WHERE module = %s AND keyword = %s",
35 [
'forum',
'frm_mod_tpl_perm_revocation']
38 $row = $this->db->fetchAssoc(
$res);
40 $this->db->manipulateF(
41 "DELETE FROM settings WHERE module = %s AND keyword = %s",
43 [
'forum',
'frm_mod_tpl_perm_revocation']
49 $res = $this->db->queryF(
50 "SELECT obj_id FROM object_data WHERE type = %s AND title = %s",
52 [
'rolt',
'il_frm_moderator']
55 $row = $this->db->fetchAssoc(
$res);
56 if (!isset($row[
'obj_id'])) {
60 $rol_id = (
int) $row[
'obj_id'];
62 $res = $this->db->query(
63 "SELECT ops_id FROM rbac_operations WHERE " . $this->db->in(
65 [
'edit_permission',
'delete',
'copy'],
71 $rows = $this->db->fetchAll(
$res);
76 $operations_to_remove = [];
77 foreach ($rows as $row) {
78 $operations_to_remove[] = (
int) $row[
'ops_id'];
81 foreach ($operations_to_remove as $op_id) {
82 $this->db->manipulateF(
83 "DELETE FROM rbac_templates WHERE rol_id = %s AND type = %s AND ops_id = %s AND parent = %s",
85 [$rol_id,
'frm', $op_id, 8]
prepare(ilDBInterface $db)