1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

Issue: #223 Temporary core image added for testing. File Inspector fix. Known Issue: Missing non-core files in results.

This commit is contained in:
Cameron
2016-03-17 21:27:58 -07:00
parent 9d3e1ad5e7
commit b941eba39c
2 changed files with 2534 additions and 4418 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -542,6 +542,7 @@ class file_inspector {
$path = $dir.'/'.$key;
$child_open = false;
$child_end = true;
$dir_icon = 'folder_check';
$sub_text .= $this -> inspect($value, $deprecated[$key], $level, $path, $child_end, $child_expand);
$tree_end = false;
if ($child_expand)
@@ -607,6 +608,7 @@ class file_inspector {
{
$this -> count['pass']['num']++;
$this -> count['pass']['size'] += $this -> files[$dir_id][$fid]['size'];
if ($_POST['core'] != 'fail')
{
$this -> files[$dir_id][$fid]['icon'] = 'file_check';
@@ -616,6 +618,7 @@ class file_inspector {
{
unset($this -> files[$dir_id][$fid]);
$known[$dir_id][$fid] = true;
}
}
break;
@@ -626,6 +629,7 @@ class file_inspector {
if ($_POST['core'] != 'fail')
{
$this -> files[$dir_id][$fid]['icon'] = 'file_uncalc';
}
else
{
@@ -673,9 +677,12 @@ class file_inspector {
}
}
if ($_POST['noncore'] || $_POST['oldcore'])
if (!empty($_POST['noncore']) || !empty($_POST['oldcore']))
{
$handle = opendir($dir.'/');
if(!$handle = opendir($dir.'/'))
{
//e107::getMessage()->addInfo("Couldn't Open : ".$dir);
}
while (is_resource($handle) && false !== ($readdir = readdir($handle)))
{
@@ -729,7 +736,9 @@ class file_inspector {
$aid = strtolower($readdir);
if (!isset($this -> files[$dir_id][$aid]['file']) && !$known[$dir_id][$aid]) {
if (!isset($this -> files[$dir_id][$aid]['file']) && !$known[$dir_id][$aid])
{
if (strpos($dir.'/'.$readdir, 'htmlarea') === false) {
if (isset($deprecated[$readdir]))
{
@@ -741,11 +750,14 @@ class file_inspector {
$this -> count['deprecated']['size'] += $this -> files[$dir_id][$aid]['size'];
$dir_icon = 'folder_old';
}
} else {
}
else
{
if ($_POST['noncore'])
{
$this -> files[$dir_id][$aid]['file'] = ($_POST['type'] == 'tree') ? $readdir : $dir.'/'.$readdir;
$this -> files[$dir_id][$aid]['size'] = filesize($dir.'/'.$readdir);
//echo "<br />dir: ".$dir.'/'.$readdir. " ( ".$this -> files[$dir_id][$aid]['size'].")";
$this -> files[$dir_id][$aid]['icon'] = 'file_unknown';
$this -> count['unknown']['num']++;
$this -> count['unknown']['size'] += $this -> files[$dir_id][$aid]['size'];
@@ -1047,8 +1059,10 @@ class file_inspector {
$text .= "</table>
</dit><br />";
echo e107::getMessage()->render();
echo $text;
//$ns -> tablerender(FR_LAN_1.'...', $text);
}
@@ -1446,7 +1460,7 @@ $text .= ".d { margin: 2px 0px 1px 8px; cursor: pointer; white-space: nowrap }
.w { padding: 1px 0px 1px 8px; vertical-align: bottom; width: 90% }
.i { width: 16px; height: 16px }
.e { width: 9px; height: 9px }
i.fa-folder-open-o, i.fa-times-circle-o, .d { cursor:pointer }
i.fa-folder-open-o, i.fa-times-circle-o { cursor:pointer }
-->
</style>\n";