Code Duplication    Length = 3-3 lines in 2 locations

htdocs/translate.php 1 location

@@ 408-410 (lines=3) @@
405
        if ($dh = opendir($opt['rootpath'] . $relbasedir)) {
406
            while (($file = readdir($dh)) !== false) {
407
                if ($file != '.' && $file != '..' && is_file($opt['rootpath'] . $relbasedir . $file)) {
408
                    if (substr($file, - (strlen($ext) + 1), strlen($ext) + 1) == '.' . $ext) {
409
                        unlink($opt['rootpath'] . $relbasedir . $file);
410
                    }
411
                }
412
            }
413
        }

htdocs/src/OcLegacy/Cache/WebCache.php 1 location

@@ 59-61 (lines=3) @@
56
            if ($dh = opendir($this->opt['rootpath'] . $relBaseDir)) {
57
                while (($file = readdir($dh)) !== false) {
58
                    if ($file !== '.' && $file !== '..' && is_file($this->opt['rootpath'] . $relBaseDir . $file)) {
59
                        if (substr($file, -(strlen($ext) + 1), strlen($ext) + 1) === '.' . $ext) {
60
                            unlink($this->opt['rootpath'] . $relBaseDir . $file);
61
                        }
62
                    }
63
                }
64
                closedir($dh);