Code Duplication    Length = 6-6 lines in 2 locations

admin/index.php 1 location

@@ 1828-1833 (lines=6) @@
1825
    $registry = new news_registryfile('news_metagen_options.txt');
1826
    $content  = '';
1827
    $content  = $registry->getfile();
1828
    if (xoops_trim($content) !== '') {
1829
        list($keywordscount, $keywordsorder) = explode(',', $content);
1830
    } else {
1831
        $keywordscount = $cfg['meta_keywords_count'];
1832
        $keywordsorder = $cfg['meta_keywords_order'];
1833
    }
1834
    $sform = new XoopsThemeForm(_OPTIONS, 'metagenoptions', XOOPS_URL . '/modules/news/admin/index.php', 'post');
1835
    $sform->addElement(new XoopsFormHidden('op', 'metagenoptions'), false);
1836
    $sform->addElement(new XoopsFormText(_AM_NEWS_META_KEYWORDS_CNT, 'keywordscount', 4, 6, $keywordscount), true);

include/functions.php 1 location

@@ 437-442 (lines=6) @@
434
    $registry = new news_registryfile('news_metagen_options.txt');
435
    //    $tcontent = '';
436
    $tcontent = $registry->getfile();
437
    if (xoops_trim($tcontent) !== '') {
438
        list($keywordscount, $keywordsorder) = explode(',', $tcontent);
439
    } else {
440
        $keywordscount = $cfg['meta_keywords_count'];
441
        $keywordsorder = $cfg['meta_keywords_order'];
442
    }
443
444
    $tmp = array();
445
    // Search for the "Minimum keyword length"