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

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