mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
Case insensitive array_diff for files, test on windows
This commit is contained in:
@@ -74,7 +74,7 @@ ERROR: INVALID PATH</h1></center>';
|
||||
$path = $_POST['path'];
|
||||
$path = rtrim($_POST['path'], "/");
|
||||
$path = $path . DIRECTORY_SEPARATOR;
|
||||
|
||||
|
||||
if (!is_dir($path)) {
|
||||
echo '<center><h1 style="font-family:Lato; color:#880000;"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
ERROR: INVALID PATH</h1></center>';
|
||||
|
@@ -29,9 +29,9 @@ class D2Files {
|
||||
];
|
||||
$glob = glob($_SESSION['path'].'*.txt');
|
||||
foreach ($glob as $g){
|
||||
$files[] = strtolower(basename($g));
|
||||
$files[] = basename($g);
|
||||
}
|
||||
$this->files = array_diff($files, $filesToIgnore);
|
||||
$this->files = array_udiff($files, $filesToIgnore, 'strcasecmp');
|
||||
return $this->files;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user