Code Duplication    Length = 8-10 lines in 2 locations

htdocs/lib/common.inc.php 1 location

@@ 14-23 (lines=10) @@
11
12
use Oc\Util\CBench;
13
14
if (isset($opt['rootpath'])) {
15
    $rootpath = $opt['rootpath'];
16
} else {
17
    if (isset($rootpath)) {
18
        $opt['rootpath'] = $rootpath;
19
    } else {
20
        $rootpath = './';
21
        $opt['rootpath'] = $rootpath;
22
    }
23
}
24
25
// we are in HTML-mode ... maybe plain (for CLI scripts)
26
global $interface_output, $bScriptExecution;

htdocs/lib/clicompatbase.inc.php 1 location

@@ 26-33 (lines=8) @@
23
    $interface_output = 'plain';
24
}
25
26
if (isset($opt['rootpath'])) {
27
    $rootpath = $opt['rootpath'];
28
} elseif (isset($rootpath)) {
29
    $opt['rootpath'] = $rootpath;
30
} else {
31
    $rootpath = __DIR__ . '/../';
32
    $opt['rootpath'] = $rootpath;
33
}
34
35
// yepp, we will use UTF-8
36
mb_internal_encoding('UTF-8');