Code Duplication    Length = 9-10 lines in 2 locations

code/model/Translatable.php 2 locations

@@ 864-873 (lines=10) @@
861
        $existingGroupID = $this->getTranslationGroup($originalID);
862
        
863
        // Remove any existing groups if overwrite flag is set
864
        if ($existingGroupID && $overwrite) {
865
            $sql = sprintf(
866
                'DELETE FROM "%s_translationgroups" WHERE "TranslationGroupID" = %d AND "OriginalID" = %d',
867
                $baseDataClass,
868
                $existingGroupID,
869
                $this->owner->ID
870
            );
871
            DB::query($sql);
872
            $existingGroupID = null;
873
        }
874
        
875
        // Add to group (only if not in existing group or $overwrite flag is set)
876
        if (!$existingGroupID) {
@@ 876-884 (lines=9) @@
873
        }
874
        
875
        // Add to group (only if not in existing group or $overwrite flag is set)
876
        if (!$existingGroupID) {
877
            $sql = sprintf(
878
                'INSERT INTO "%s_translationgroups" ("TranslationGroupID","OriginalID") VALUES (%d,%d)',
879
                $baseDataClass,
880
                $originalID,
881
                $this->owner->ID
882
            );
883
            DB::query($sql);
884
        }
885
    }
886
    
887
    /**