Code Duplication    Length = 6-6 lines in 2 locations

manager/media/rss/rss_parse.inc 2 locations

@@ 525-530 (lines=6) @@
522
        // cast the XML to a known encoding
523
        // @see http://php.net/iconv
524
525
        if (function_exists('iconv'))  {
526
            $encoded_source = iconv($in_enc,'UTF-8', $source);
527
            if ($encoded_source) {
528
                return array(xml_parser_create('UTF-8'), $encoded_source);
529
            }
530
        }
531
532
        // iconv didn't work, try mb_convert_encoding
533
        // @see http://php.net/mbstring
@@ 534-539 (lines=6) @@
531
532
        // iconv didn't work, try mb_convert_encoding
533
        // @see http://php.net/mbstring
534
        if(function_exists('mb_convert_encoding')) {
535
            $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc );
536
            if ($encoded_source) {
537
                return array(xml_parser_create('UTF-8'), $encoded_source);
538
            }
539
        }
540
541
        // else
542
        $this->error("Feed is in an unsupported character encoding. ($in_enc) " .