Code Duplication    Length = 6-6 lines in 2 locations

class/utility.php 2 locations

@@ 235-240 (lines=6) @@
232
                $xml_set->appendChild($xml_url);
233
            }
234
            if (isset($mod['parent']) ? $mod['parent'] : null) {
235
                foreach ($mod['parent'] as $parent) {
236
                    $xml_parent = $xml->createElement('url');
237
                    $loc        = $xml->createElement('loc', htmlentities($GLOBALS['xoops']->url("www/modules/{$mod['directory']}/{$parent['url']}")));
238
                    $xml_parent->appendChild($loc);
239
                    $xml_set->appendChild($xml_parent);
240
                }
241
                $z = 0;
242
                //if ($mod["parent"][$z]["child"]) {
243
                if (isset($mod['parent'][$z]['child']) ? $mod['parent'][$z]['child'] : null) {
@@ 244-249 (lines=6) @@
241
                $z = 0;
242
                //if ($mod["parent"][$z]["child"]) {
243
                if (isset($mod['parent'][$z]['child']) ? $mod['parent'][$z]['child'] : null) {
244
                    foreach ($mod['parent'][$z]['child'] as $child) {
245
                        $xml_child = $xml->createElement('url');
246
                        $loc       = $xml->createElement('loc', htmlentities($GLOBALS['xoops']->url("www/modules/{$mod['directory']}/{$child['url']}")));
247
                        $xml_child->appendChild($loc);
248
                        $xml_set->appendChild($xml_child);
249
                    }
250
                    ++$z;
251
                }
252
            }