Code Duplication    Length = 3-3 lines in 7 locations

blocks/block.php 1 location

@@ 31-33 (lines=3) @@
28
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
29
30
$current_path = __FILE__;
31
if (DIRECTORY_SEPARATOR !== '/') {
32
    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
33
}
34
$url_arr = explode('/', strstr($current_path, '/modules/'));
35
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
36
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/class/Utility.php';

class/Utility.php 1 location

@@ 36-38 (lines=3) @@
33
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
34
35
$current_path = __FILE__;
36
if (DIRECTORY_SEPARATOR !== '/') {
37
    $current_path = str_replace(strpos($current_path, '\\\\', 2) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $current_path);
38
}
39
$url_arr               = explode('/', strstr($current_path, '/modules/'));
40
$GLOBALS['moddirname'] = $url_arr[2];
41

include/functions.php 1 location

@@ 35-37 (lines=3) @@
32
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
33
34
$current_path = __FILE__;
35
if (DIRECTORY_SEPARATOR !== '/') {
36
    $current_path = str_replace(strpos($current_path, '\\\\', 2) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $current_path);
37
}
38
$url_arr               = explode('/', strstr($current_path, '/modules/'));
39
$GLOBALS['moddirname'] = $url_arr[2];
40

language/english/admin.php 1 location

@@ 10-12 (lines=3) @@
7
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
8
9
$current_path = __FILE__;
10
if (DIRECTORY_SEPARATOR !== '/') {
11
    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12
}
13
$url_arr = explode('/', strstr($current_path, '/modules/'));
14
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
15

language/english/blocks.php 1 location

@@ 10-12 (lines=3) @@
7
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
8
9
$current_path = __FILE__;
10
if (DIRECTORY_SEPARATOR !== '/') {
11
    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12
}
13
$url_arr = explode('/', strstr($current_path, '/modules/'));
14
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
15

language/english/main.php 1 location

@@ 10-12 (lines=3) @@
7
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
8
9
$current_path = __FILE__;
10
if (DIRECTORY_SEPARATOR !== '/') {
11
    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12
}
13
$url_arr = explode('/', strstr($current_path, '/modules/'));
14
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
15

language/english/modinfo.php 1 location

@@ 10-12 (lines=3) @@
7
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
8
9
$current_path = __FILE__;
10
if (DIRECTORY_SEPARATOR !== '/') {
11
    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12
}
13
$url_arr = explode('/', strstr($current_path, '/modules/'));
14
include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
15