Code Duplication    Length = 5-5 lines in 2 locations

admin/main.php 1 location

@@ 187-191 (lines=5) @@
184
//Check Language
185
$lang = $GLOBALS['xoopsConfig']['language'];
186
// GET various variables from language folder
187
if (file_exists($helper->path('language/' . $lang . '/js/variables.js'))) {
188
    $GLOBALS['xoTheme']->addScript($helper->url('language/' . $lang . '/js/variables.js'));
189
} else {
190
    $GLOBALS['xoTheme']->addScript($helper->url('language/english/js/variables.js'));
191
}
192
193
$adminscript = <<<SCRIPT
194
        var smallworld_url="XOOPS_URL/modules/smallworld/";

admin/useradmin.php 1 location

@@ 99-103 (lines=5) @@
96
//Check Language
97
$lang = $GLOBALS['xoopsConfig']['language'];
98
// GET various variables from language folder
99
if (file_exists($helper->path('language/' . $lang . '/js/variables.js'))) {
100
    $GLOBALS['xoTheme']->addScript($helper->url('language/' . $lang . '/js/variables.js'));
101
} else {
102
    $GLOBALS['xoTheme']->addScript($helper->url('language/english/js/variables.js'));
103
}
104
105
$adminscript = <<<SCRIPT
106
        var smallworld_url="XOOPS_URL/modules/smallworld/";