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;

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

@@ 416-420 (lines=5) @@
413
    $newsletterAdmin = new ModuleAdmin();
414
    echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter');
415
    $newslettertemplate = '';
416
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php')) {
417
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/newsletter.php';
418
    } else {
419
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/newsletter.php';
420
    }
421
    echo '<br />';
422
    $story           = new NewsStory();
423
    $exportedstories = array();
@@ 1335-1339 (lines=5) @@
1332
    global $xoopsModule, $xoopsConfig;
1333
    xoops_cp_header();
1334
    $myts = MyTextSanitizer::getInstance();
1335
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1336
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1337
    } else {
1338
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1339
    }
1340
    $statsAdmin = new ModuleAdmin();
1341
    echo $statsAdmin->addNavigation('index.php?op=stats');
1342
    $news   = new NewsStory();
@@ 1478-1482 (lines=5) @@
1475
    global $xoopsModule, $xoopsConfig, $xoopsModuleConfig, $cfg;
1476
    xoops_cp_header();
1477
    $myts = MyTextSanitizer::getInstance();
1478
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1479
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1480
    } else {
1481
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1482
    }
1483
    $metagenAdmin = new ModuleAdmin();
1484
    echo $metagenAdmin->addNavigation('index.php?op=metagen');
1485
    //echo "<h1>"._AM_NEWS_METAGEN."</h1>";
@@ 1646-1650 (lines=5) @@
1643
        $published    = 0;
1644
        $description  = '';
1645
        $keywords     = '';
1646
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1647
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1648
        } else {
1649
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1650
        }
1651
1652
        if ($xoopsModuleConfig['autoapprove'] == 1) {
1653
            $approve = 1;
@@ 1710-1714 (lines=5) @@
1707
        break;
1708
1709
    case 'edit':
1710
        if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
1711
            include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
1712
        } else {
1713
            include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
1714
        }
1715
        include_once XOOPS_ROOT_PATH . '/modules/news/submit.php';
1716
        break;
1717

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;