Code Duplication    Length = 5-5 lines in 11 locations

admin/amsimport.php 2 locations

@@ 50-54 (lines=5) @@
47
        echo "<br><br>If you check the two last options then the forum's link and all the external links will be added at the end of the body text.";
48
    } else {
49
        // Launch the import
50
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/main.php')) {
51
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/main.php';
52
        } else {
53
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/main.php';
54
        }
55
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php')) {
56
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php';
57
        } else {
@@ 55-59 (lines=5) @@
52
        } else {
53
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/main.php';
54
        }
55
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php')) {
56
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php';
57
        } else {
58
            require_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/admin.php';
59
        }
60
        $db = XoopsDatabaseFactory::getDatabaseConnection();
61
        // User's choices
62
        $use_forum    = (isset($_POST['useforum']) && 1 == $_POST['useforum']) ? 1 : 0;

admin/index.php 5 locations

@@ 536-540 (lines=5) @@
533
    $adminObject = \Xmf\Module\Admin::getInstance();
534
    $adminObject->displayNavigation('index.php?op=configurenewsletter');
535
    $newslettertemplate = '';
536
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php')) {
537
        require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php';
538
    } else {
539
        require_once XOOPS_ROOT_PATH . '/modules/news/language/english/newsletter.php';
540
    }
541
    echo '<br>';
542
    $story           = new NewsStory();
543
    $exportedstories = [];
@@ 1483-1487 (lines=5) @@
1480
    global $xoopsModule, $xoopsConfig;
1481
    xoops_cp_header();
1482
    $myts = MyTextSanitizer::getInstance();
1483
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1484
        require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1485
    } else {
1486
        require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1487
    }
1488
    $adminObject = \Xmf\Module\Admin::getInstance();
1489
    $adminObject->displayNavigation('index.php?op=stats');
1490
    $news   = new NewsStory();
@@ 1662-1666 (lines=5) @@
1659
    global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg;
1660
    xoops_cp_header();
1661
    $myts = MyTextSanitizer::getInstance();
1662
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1663
        require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1664
    } else {
1665
        require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1666
    }
1667
    $adminObject = \Xmf\Module\Admin::getInstance();
1668
    $adminObject->displayNavigation('index.php?op=metagen');
1669
    //echo "<h1>"._AM_NEWS_METAGEN."</h1>";
@@ 1830-1834 (lines=5) @@
1827
        $published    = 0;
1828
        $description  = '';
1829
        $keywords     = '';
1830
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1831
            require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1832
        } else {
1833
            require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1834
        }
1835
1836
        if (1 == $xoopsModuleConfig['autoapprove']) {
1837
            $approve = 1;
@@ 1894-1898 (lines=5) @@
1891
        break;
1892
1893
    case 'edit':
1894
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1895
            require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1896
        } else {
1897
            require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1898
        }
1899
        require_once XOOPS_ROOT_PATH . '/modules/news/submit.php';
1900
        break;
1901

blocks/news_archives.php 1 location

@@ 41-45 (lines=5) @@
38
    require_once XOOPS_ROOT_PATH . '/modules/news/class/class.newsstory.php';
39
    require_once XOOPS_ROOT_PATH . '/modules/news/class/utility.php';
40
    require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
41
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
42
        require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
43
    } else {
44
        require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
45
    }
46
47
    $months_arr    = [
48
        1  => _CAL_JANUARY,

blocks/news_top.php 1 location

@@ 47-51 (lines=5) @@
44
    $displayname = NewsUtility::getModuleOption('displayname');
45
    $tabskin     = NewsUtility::getModuleOption('tabskin');
46
47
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
48
        require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
49
    } else {
50
        require_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
51
    }
52
53
    $block['displayview'] = $options[8];
54
    $block['tabskin']     = $tabskin;

newsbythisauthor.php 1 location

@@ 76-80 (lines=5) @@
73
require_once XOOPS_ROOT_PATH . '/modules/news/class/utility.php';
74
global $xoopsUser;
75
76
if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
77
    require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php';
78
} else {
79
    require_once XOOPS_ROOT_PATH . '/modules/news/language/english/modinfo.php';
80
}
81
82
$uid = isset($_GET['uid']) ? (int)$_GET['uid'] : 0;
83
if (empty($uid)) {

submit.php 1 location

@@ 31-35 (lines=5) @@
28
require_once XOOPS_ROOT_PATH . '/class/uploader.php';
29
require_once XOOPS_ROOT_PATH . '/header.php';
30
require_once XOOPS_ROOT_PATH . '/modules/news/class/utility.php';
31
if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/admin.php')) {
32
    require_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/admin.php';
33
} else {
34
    require_once XOOPS_ROOT_PATH . '/modules/news/language/english/admin.php';
35
}
36
$myts      = MyTextSanitizer::getInstance();
37
$module_id = $xoopsModule->getVar('mid');
38
$storyid   = 0;