Code Duplication    Length = 9-10 lines in 2 locations

code/model/Translatable.php 2 locations

@@ 825-834 (lines=10) @@
822
        $existingGroupID = $this->getTranslationGroup($originalID);
823
824
        // Remove any existing groups if overwrite flag is set
825
        if ($existingGroupID && $overwrite) {
826
            $sql = sprintf(
827
                'DELETE FROM "%s_translationgroups" WHERE "TranslationGroupID" = %d AND "OriginalID" = %d',
828
                $baseDataClass,
829
                $existingGroupID,
830
                $this->owner->ID
831
            );
832
            DB::query($sql);
833
            $existingGroupID = null;
834
        }
835
836
        // Add to group (only if not in existing group or $overwrite flag is set)
837
        if (!$existingGroupID) {
@@ 837-845 (lines=9) @@
834
        }
835
836
        // Add to group (only if not in existing group or $overwrite flag is set)
837
        if (!$existingGroupID) {
838
            $sql = sprintf(
839
                'INSERT INTO "%s_translationgroups" ("TranslationGroupID","OriginalID") VALUES (%d,%d)',
840
                $baseDataClass,
841
                $originalID,
842
                $this->owner->ID
843
            );
844
            DB::query($sql);
845
        }
846
    }
847
848
    /**