Code Duplication    Length = 5-5 lines in 11 locations

admin/functions.php 1 location

@@ 34-38 (lines=5) @@
31
function bookshop_adminMenu($currentoption = 0, $breadcrumb = '')
32
{
33
    global $xoopsConfig, $xoopsModule;
34
    if (file_exists(XOOPS_ROOT_PATH . '/modules/bookshop/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
35
        include_once XOOPS_ROOT_PATH . '/modules/bookshop/language/' . $xoopsConfig['language'] . '/modinfo.php';
36
    } else {
37
        include_once XOOPS_ROOT_PATH . '/modules/bookshop/language/english/modinfo.php';
38
    }
39
    global $adminmenu;
40
    include __DIR__ . '/menu.php';
41

admin/main.php 3 locations

@@ 127-131 (lines=5) @@
124
$manual_meta = bookshop_getmoduleoption('manual_meta');
125
126
global $xoopsConfig;
127
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
128
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
129
} else {
130
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
131
}
132
133
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php')) {
134
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php';
@@ 133-137 (lines=5) @@
130
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
131
}
132
133
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php')) {
134
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php';
135
} else {
136
    include_once BOOKSHOP_PATH . 'language/english/main.php';
137
}
138
139
// ******************************************************************************************************************************************
140
// **** Main ********************************************************************************************************************************
@@ 2054-2058 (lines=5) @@
2051
        bookshop_htitle(_MI_BOOKSHOP_ADMENU7, 4);
2052
2053
        $newslettertemplate = '';
2054
        if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/newsletter.php')) {
2055
            include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/newsletter.php';
2056
        } else {
2057
            include_once BOOKSHOP_PATH . 'language/english/newsletter.php';
2058
        }
2059
        echo '<br>';
2060
        $removebr      = $removehtml = false;
2061
        $removebr      = isset($_POST['removebr']) ? (int)$_POST['removebr'] : 0;

all-books.php 1 location

@@ 63-67 (lines=5) @@
60
$xoopsTpl->assign('pdf_catalog', bookshop_getmoduleoption('pdf_catalog'));
61
62
bookshop_setCSS();
63
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
64
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
65
} else {
66
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
67
}
68
69
$title = _MI_BOOKSHOP_SMNAME6 . ' - ' . bookshop_get_module_name();
70
bookshop_set_metas($title, $title);

author.php 1 location

@@ 88-92 (lines=5) @@
85
}
86
87
bookshop_setCSS();
88
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
89
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
90
} else {
91
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
92
}
93
94
$title = $auth_type . ' : ' . $author->getVar('auth_name') . ' ' . $author->getVar('auth_firstname') . ' - ' . bookshop_get_module_name();
95
bookshop_set_metas($title, $title, bookshop_createmeta_keywords($author->getVar('auth_name') . ' ' . $author->getVar('auth_firstname') . ' ' . $author->getVar('auth_bio')));

caddy.php 1 location

@@ 142-146 (lines=5) @@
139
}
140
141
bookshop_setCSS();
142
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
143
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
144
} else {
145
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
146
}
147
148
$title = _MI_BOOKSHOP_SMNAME1 . ' - ' . bookshop_get_module_name();
149
bookshop_set_metas($title, $title);

categories-map.php 1 location

@@ 63-67 (lines=5) @@
60
}
61
62
bookshop_setCSS();
63
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
64
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
65
} else {
66
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
67
}
68
69
$title = _MI_BOOKSHOP_SMNAME4 . ' - ' . bookshop_get_module_name();
70
bookshop_set_metas($title, $title);

include/common.php 1 location

@@ 56-60 (lines=5) @@
53
// Définition des images
54
if (!defined('_BOOKSHOP_EDIT')) {
55
    global $xoopsConfig;
56
    if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php')) {
57
        include BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/main.php';
58
    } else {
59
        include BOOKSHOP_PATH . 'language/english/main.php';
60
    }
61
}
62
$icones = array(
63
    'edit'    => "<img src='" . BOOKSHOP_IMAGES_URL . "edit.png' alt='" . _BOOKSHOP_EDIT . "' align='middle' />",

pdf/catalog.php 1 location

@@ 51-55 (lines=5) @@
48
$tblBooks = $h_bookshop_books->getRecentBooks(0, 0, $cat_cid);
49
50
if (count($tblBooks) > 0) {
51
    if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
52
        include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
53
    } else {
54
        include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
55
    }
56
    $Tpl->assign('details', $details);
57
    $tblAuthors = $tbl_tmp = $tblAuthorsPerBook = array();
58
    $tblAuthors = $h_bookshop_booksauthors->getObjects(new Criteria('ba_book_id', '(' . implode(',', array_keys($tblBooks)) . ')', 'IN'), true);

whoswho.php 1 location

@@ 55-59 (lines=5) @@
52
$xoopsTpl->assign('authors', $tblAnnuaire);
53
54
bookshop_setCSS();
55
if (file_exists(BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php')) {
56
    include_once BOOKSHOP_PATH . 'language/' . $xoopsConfig['language'] . '/modinfo.php';
57
} else {
58
    include_once BOOKSHOP_PATH . 'language/english/modinfo.php';
59
}
60
61
$title = _MI_BOOKSHOP_SMNAME5 . ' - ' . bookshop_get_module_name();
62
bookshop_set_metas($title, $title);