Code Duplication    Length = 7-7 lines in 4 locations

manager/captcha.php 1 location

@@ 14-20 (lines=7) @@
11
    ];
12
}
13
14
if (!empty($config['root']) && file_exists($config['root']. '/index.php')) {
15
    require_once $config['root'] . '/index.php';
16
} else {
17
    echo "<h3>Unable to load configuration settings</h3>";
18
    echo "Please run the EVO <a href='../install'>install utility</a>";
19
    exit;
20
}
21
22
$modx->getDatabase()->connect();
23
$modx->getSettings();

manager/index.php 1 location

@@ 74-80 (lines=7) @@
71
    ];
72
}
73
74
if (!empty($config['core']) && file_exists($config['core'] . '/bootstrap.php')) {
75
    require_once $config['core'] . '/bootstrap.php';
76
} else {
77
    echo "<h3>Unable to load configuration settings</h3>";
78
    echo "Please run the EVO <a href='../install'>install utility</a>";
79
    exit;
80
}
81
82
if (! isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
83
    header('HTTP/1.0 404 Not Found');

manager/media/style/default/ajax.php 1 location

@@ 15-21 (lines=7) @@
12
    ];
13
}
14
15
if (!empty($config['root']) && file_exists($config['root']. '/index.php')) {
16
    require_once $config['root'] . '/index.php';
17
} else {
18
    echo "<h3>Unable to load configuration settings</h3>";
19
    echo "Please run the EVO <a href='../install'>install utility</a>";
20
    exit;
21
}
22
23
$modx->getSettings();
24

manager/processors/login.processor.php 1 location

@@ 19-25 (lines=7) @@
16
        'root' => dirname(__DIR__, 2)
17
    ];
18
}
19
if (!empty($config['root']) && file_exists($config['root']. '/index.php')) {
20
    require_once $config['root'] . '/index.php';
21
} else {
22
    echo "<h3>Unable to load configuration settings</h3>";
23
    echo "Please run the EVO <a href='../install'>install utility</a>";
24
    exit;
25
}
26
27
$modx->getSettings();
28
$modx->invokeEvent('OnManagerPageInit');