Code Duplication    Length = 5-5 lines in 13 locations

admin/amsimport.php 2 locations

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

admin/index.php 5 locations

@@ 441-445 (lines=5) @@
438
    $newsletterAdmin = new ModuleAdmin();
439
    echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter');
440
    $newslettertemplate = '';
441
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php')) {
442
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php';
443
    } else {
444
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/newsletter.php';
445
    }
446
    echo '<br />';
447
    $story           = new NewsStory();
448
    $exportedstories = array();
@@ 1375-1379 (lines=5) @@
1372
    global $xoopsModule, $xoopsConfig;
1373
    xoops_cp_header();
1374
    $myts =& MyTextSanitizer::getInstance();
1375
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1376
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1377
    } else {
1378
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1379
    }
1380
    $statsAdmin = new ModuleAdmin();
1381
    echo $statsAdmin->addNavigation('index.php?op=stats');
1382
    $news   = new NewsStory();
@@ 1570-1574 (lines=5) @@
1567
    global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg;
1568
    xoops_cp_header();
1569
    $myts =& MyTextSanitizer::getInstance();
1570
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1571
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1572
    } else {
1573
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1574
    }
1575
    $metagenAdmin = new ModuleAdmin();
1576
    echo $metagenAdmin->addNavigation('index.php?op=metagen');
1577
    //echo "<h1>"._AM_NEWS_METAGEN."</h1>";
@@ 1738-1742 (lines=5) @@
1735
        $published    = 0;
1736
        $description  = '';
1737
        $keywords     = '';
1738
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1739
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1740
        } else {
1741
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1742
        }
1743
1744
        if ($xoopsModuleConfig['autoapprove'] == 1) {
1745
            $approve = 1;
@@ 1804-1808 (lines=5) @@
1801
        break;
1802
1803
    case 'edit':
1804
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1805
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1806
        } else {
1807
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1808
        }
1809
        include_once XOOPS_ROOT_PATH . '/modules/news/submit.php';
1810
        break;
1811

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,

blocks/news_top.php 1 location

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

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;