Skip to content

Commit c945bca

Browse files
author
mreishman
committed
finished with file folder changes?
1 parent 26353ac commit c945bca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/php/commonFunctions.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,21 @@ function returnArrayOfGroups($file)
323323

324324
function scanDirForTests($dir, $showSubFolderTests, $fileInfo)
325325
{
326-
$stuffToReturn = "<ul style=\"list-style: none;\" >No Files Found In Directory";
326+
$stuffToReturn = "<ul style=\"list-style: none;\" >No Files Found In Directory: ".$dir;
327327
$files = array_diff(scandir($dir), array('..', '.'));
328328
if($files !== array())
329329
{
330330
$stuffToReturn = "<ul style=\"list-style: none;\" >";
331331
$stuffToReturn .= "<li>".$dir."</li>";
332+
$counter = 0;
332333
foreach($files as $key => $value)
333334
{
334335
$path = realpath($dir.DIRECTORY_SEPARATOR.$value);
335336
if(isset($fileInfo[$path]) && isset($fileInfo[$path]["Include"]) && $fileInfo[$path]["Include"] !== "true")
336337
{
337338
continue;
338339
}
340+
$counter++;
339341
if(is_file($path) && returnArrayOfTests(file($path), $path) !== array())
340342
{
341343
$stuffToReturn .= "<li><input onchange=\"getFileList();\" type='checkbox' name=\"".$path."\">".$value."</li>";
@@ -345,6 +347,10 @@ function scanDirForTests($dir, $showSubFolderTests, $fileInfo)
345347
$stuffToReturn .= scanDirForTests($path, $showSubFolderTests, $fileInfo);
346348
}
347349
}
350+
if($counter === 0)
351+
{
352+
$stuffToReturn = "<ul>";
353+
}
348354
}
349355
$stuffToReturn .= "</ul>";
350356
return $stuffToReturn;

0 commit comments

Comments
 (0)