Code Duplication    Length = 6-6 lines in 2 locations

include/functions.php 2 locations

@@ 211-216 (lines=6) @@
208
                $xml_url->appendChild($loc);
209
            }
210
            if (isset($mod['parent']) ? $mod['parent'] : null) {
211
                foreach ($mod['parent'] as $parent) {
212
                    $xml_parent = $xml->createElement('url');
213
                    $loc        = $xml->createElement('loc', htmlentities($GLOBALS['xoops']->url("www/modules/{$mod['directory']}/{$parent['url']}")));
214
                    $xml_parent->appendChild($loc);
215
                    $xml_url->appendChild($xml_parent);
216
                }
217
                $z = 0;
218
                //if ($mod["parent"][$z]["child"]) {
219
                if (isset($mod['parent'][$z]['child']) ? $mod['parent'][$z]['child'] : null) {
@@ 220-225 (lines=6) @@
217
                $z = 0;
218
                //if ($mod["parent"][$z]["child"]) {
219
                if (isset($mod['parent'][$z]['child']) ? $mod['parent'][$z]['child'] : null) {
220
                    foreach ($mod['parent'][$z]['child'] as $child) {
221
                        $xml_child = $xml->createElement('url');
222
                        $loc       = $xml->createElement('loc', htmlentities($GLOBALS['xoops']->url("www/modules/{$mod['directory']}/{$child['url']}")));
223
                        $xml_child->appendChild($loc);
224
                        $xml_url->appendChild($xml_child);
225
                    }
226
                    ++$z;
227
                }
228
            }