Code Duplication    Length = 5-5 lines in 2 locations

htdocs/lib/clicompatbase.inc.php 1 location

@@ 47-51 (lines=5) @@
44
45
// check for banned UAs
46
$useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
47
foreach ($opt['page']['banned_user_agents'] as $ua) {
48
    if (strpos($useragent, $ua) !== false) {
49
        die();
50
    }
51
}
52
53
// basic PHP settings
54
date_default_timezone_set($timezone);

htdocs/lib2/common.inc.php 1 location

@@ 68-72 (lines=5) @@
65
require_once __DIR__ . '/../config2/settings.inc.php';
66
require_once __DIR__ . '/../config2/verify-settings.inc.php';
67
68
foreach ($opt['page']['banned_user_agents'] as $ua) {
69
    if (strpos($useragent, $ua) !== false) {
70
        die();
71
    }
72
}
73
74
// backward compatibility for old settings
75
if ($opt['forum']['url'] == '' &&