Code Duplication    Length = 5-5 lines in 2 locations

include/functions.php 2 locations

@@ 182-186 (lines=5) @@
179
    foreach (array_keys($category_parent) as $j) {
180
        $Path .= $category_parent[$j]->getVar($title) . $prefix;
181
    }
182
    if (array_key_exists($key, $category_array)) {
183
        $first_category = $category_array[$key]->getVar($title);
184
    } else {
185
        $first_category = '';
186
    }
187
    $Path .= $first_category;
188
189
    return $Path;
@@ 204-208 (lines=5) @@
201
            $Path = $xoopsModule->name() . $prefix;
202
        }
203
    } else {
204
        if (array_key_exists($key, $category_array)) {
205
            $first_category = $category_array[$key]->getVar($title);
206
        } else {
207
            $first_category = '';
208
        }
209
        $Path = $first_category . $prefix;
210
    }
211
    foreach (array_keys($category_parent) as $j) {