Code Duplication    Length = 5-5 lines in 13 locations

blocks/news_archives.php 1 location

@@ 49-53 (lines=5) @@
46
    include_once XOOPS_ROOT_PATH . '/modules/news/class/class.newsstory.php';
47
    include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
48
    include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
49
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
50
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
51
    } else {
52
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
53
    }
54
55
    $months_arr    = array(
56
        1  => _CAL_JANUARY,

include/storyform.inc.php 1 location

@@ 29-33 (lines=5) @@
26
//  ------------------------------------------------------------------------ //
27
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
28
29
if (file_exists(XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php')) {
30
    include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
31
} else {
32
    include_once XOOPS_ROOT_PATH . '/language/english/calendar.php';
33
}
34
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
35
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
36
include_once XOOPS_ROOT_PATH . '/modules/news/config.php';

include/storyform.original.php 1 location

@@ 29-33 (lines=5) @@
26
//  ------------------------------------------------------------------------ //
27
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
28
29
if (file_exists(XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php')) {
30
    include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
31
} else {
32
    include_once XOOPS_ROOT_PATH . '/language/english/calendar.php';
33
}
34
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
35
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
36
include_once XOOPS_ROOT_PATH . '/modules/news/config.php';

newsbythisauthor.php 1 location

@@ 82-86 (lines=5) @@
79
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
80
global $xoopsUser;
81
82
if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
83
    include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php';
84
} else {
85
    include_once XOOPS_ROOT_PATH . '/modules/news/language/english/modinfo.php';
86
}
87
88
$uid = isset($_GET['uid']) ? (int)$_GET['uid'] : 0;
89
if (empty($uid)) {

submit.php 1 location

@@ 39-43 (lines=5) @@
36
include_once XOOPS_ROOT_PATH . '/class/uploader.php';
37
include_once XOOPS_ROOT_PATH . '/header.php';
38
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
39
if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/admin.php')) {
40
    include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/admin.php';
41
} else {
42
    include_once XOOPS_ROOT_PATH . '/modules/news/language/english/admin.php';
43
}
44
$myts      = MyTextSanitizer::getInstance();
45
$module_id = $xoopsModule->getVar('mid');
46
$storyid   = 0;

blocks/news_top.php 1 location

@@ 54-58 (lines=5) @@
51
    $displayname = news_getmoduleoption('displayname');
52
    $tabskin     = news_getmoduleoption('tabskin');
53
54
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
55
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
56
    } else {
57
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
58
    }
59
60
    $block['displayview'] = $options[8];
61
    $block['tabskin']     = $tabskin;

admin/amsimport.php 2 locations

@@ 57-61 (lines=5) @@
54
        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.";
55
    } else {
56
        // Launch the import
57
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/main.php')) {
58
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/main.php';
59
        } else {
60
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/main.php';
61
        }
62
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php')) {
63
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php';
64
        } else {
@@ 62-66 (lines=5) @@
59
        } else {
60
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/main.php';
61
        }
62
        if (file_exists(XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php')) {
63
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/' . $xoopsConfig['language'] . '/admin.php';
64
        } else {
65
            include_once XOOPS_ROOT_PATH . '/modules/AMS/language/english/admin.php';
66
        }
67
        $db = XoopsDatabaseFactory::getDatabaseConnection();
68
        // User's choices
69
        $use_forum    = (isset($_POST['useforum']) && $_POST['useforum'] == 1) ? 1 : 0;

admin/index.php 5 locations

@@ 618-622 (lines=5) @@
615
    $newsletterAdmin = new ModuleAdmin();
616
    echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter');
617
    $newslettertemplate = '';
618
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php')) {
619
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php';
620
    } else {
621
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/newsletter.php';
622
    }
623
    echo '<br>';
624
    $story           = new NewsStory();
625
    $exportedstories = array();
@@ 1568-1572 (lines=5) @@
1565
    global $xoopsModule, $xoopsConfig;
1566
    xoops_cp_header();
1567
    $myts = MyTextSanitizer::getInstance();
1568
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1569
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1570
    } else {
1571
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1572
    }
1573
    $statsAdmin = new ModuleAdmin();
1574
    echo $statsAdmin->addNavigation('index.php?op=stats');
1575
    $news   = new NewsStory();
@@ 1763-1767 (lines=5) @@
1760
    global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg;
1761
    xoops_cp_header();
1762
    $myts = MyTextSanitizer::getInstance();
1763
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1764
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1765
    } else {
1766
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1767
    }
1768
    $metagenAdmin = new ModuleAdmin();
1769
    echo $metagenAdmin->addNavigation('index.php?op=metagen');
1770
    //echo "<h1>"._AM_NEWS_METAGEN."</h1>";
@@ 1931-1935 (lines=5) @@
1928
        $published    = 0;
1929
        $description  = '';
1930
        $keywords     = '';
1931
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1932
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1933
        } else {
1934
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1935
        }
1936
1937
        if ($xoopsModuleConfig['autoapprove'] == 1) {
1938
            $approve = 1;
@@ 1995-1999 (lines=5) @@
1992
        break;
1993
1994
    case 'edit':
1995
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1996
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1997
        } else {
1998
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1999
        }
2000
        include_once XOOPS_ROOT_PATH . '/modules/news/submit.php';
2001
        break;
2002