Code Duplication    Length = 7-7 lines in 3 locations

code/controller/TranslatableCMSMainExtension.php 3 locations

@@ 148-154 (lines=7) @@
145
        return $this->owner->redirect($url);
146
    }
147
148
    public function updateLink(&$link)
149
    {
150
        $locale = $this->owner->Locale ? $this->owner->Locale : Translatable::get_current_locale();
151
        if ($locale) {
152
            $link = Controller::join_links($link, '?Locale=' . $locale);
153
        }
154
    }
155
156
    public function updateLinkWithSearch(&$link)
157
    {
@@ 156-162 (lines=7) @@
153
        }
154
    }
155
156
    public function updateLinkWithSearch(&$link)
157
    {
158
        $locale = $this->owner->Locale ? $this->owner->Locale : Translatable::get_current_locale();
159
        if ($locale) {
160
            $link = Controller::join_links($link, '?Locale=' . $locale);
161
        }
162
    }
163
164
    public function updateExtraTreeTools(&$html)
165
    {
@@ 170-176 (lines=7) @@
167
        $html = $this->LangForm()->forTemplate() . $html;
168
    }
169
170
    public function updateLinkPageAdd(&$link)
171
    {
172
        $locale = $this->owner->Locale ? $this->owner->Locale : Translatable::get_current_locale();
173
        if ($locale) {
174
            $link = Controller::join_links($link, '?Locale=' . $locale);
175
        }
176
    }
177
    
178
    /**
179
     * Returns a form with all languages with languages already used appearing first.