Code Duplication    Length = 4-7 lines in 2 locations

action.post.php 1 location

@@ 209-212 (lines=4) @@
206
                    $post_update2[] = $pid;
207
                }
208
            }
209
            if (count($post_update)) {
210
                $criteria = new \Criteria('post_id', '(' . implode(',', $post_update) . ')', 'IN');
211
                $postHandler->updateAll('pid', $post_id, $criteria, true);
212
            }
213
        }
214
215
        $forum_id = $postObject->getVar('forum_id');

class/PermissionForumHandler.php 1 location

@@ 137-143 (lines=7) @@
134
        // Create criteria for getting only the permissions regarding this module and this user's groups
135
        $criteria = new \CriteriaCompo(new \Criteria('gperm_modid', $modid));
136
        $criteria->add(new \Criteria('gperm_groupid', '(' . implode(',', $groups) . ')', 'IN'));
137
        if ($id) {
138
            if (is_array($id)) {
139
                $criteria->add(new \Criteria('gperm_itemid', '(' . implode(',', $id) . ')', 'IN'));
140
            } else {
141
                $criteria->add(new \Criteria('gperm_itemid', (int)$id));
142
            }
143
        }
144
        $gperm_names = implode(', ', $this->getValidItems($modid, $id));
145
146
        // Add criteria for gpermnames