mirror of
https://github.com/e107inc/e107.git
synced 2025-08-14 10:34:23 +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:
File diff suppressed because it is too large
Load Diff
@@ -542,6 +542,7 @@ class file_inspector {
|
|||||||
$path = $dir.'/'.$key;
|
$path = $dir.'/'.$key;
|
||||||
$child_open = false;
|
$child_open = false;
|
||||||
$child_end = true;
|
$child_end = true;
|
||||||
|
$dir_icon = 'folder_check';
|
||||||
$sub_text .= $this -> inspect($value, $deprecated[$key], $level, $path, $child_end, $child_expand);
|
$sub_text .= $this -> inspect($value, $deprecated[$key], $level, $path, $child_end, $child_expand);
|
||||||
$tree_end = false;
|
$tree_end = false;
|
||||||
if ($child_expand)
|
if ($child_expand)
|
||||||
@@ -607,6 +608,7 @@ class file_inspector {
|
|||||||
{
|
{
|
||||||
$this -> count['pass']['num']++;
|
$this -> count['pass']['num']++;
|
||||||
$this -> count['pass']['size'] += $this -> files[$dir_id][$fid]['size'];
|
$this -> count['pass']['size'] += $this -> files[$dir_id][$fid]['size'];
|
||||||
|
|
||||||
if ($_POST['core'] != 'fail')
|
if ($_POST['core'] != 'fail')
|
||||||
{
|
{
|
||||||
$this -> files[$dir_id][$fid]['icon'] = 'file_check';
|
$this -> files[$dir_id][$fid]['icon'] = 'file_check';
|
||||||
@@ -616,6 +618,7 @@ class file_inspector {
|
|||||||
{
|
{
|
||||||
unset($this -> files[$dir_id][$fid]);
|
unset($this -> files[$dir_id][$fid]);
|
||||||
$known[$dir_id][$fid] = true;
|
$known[$dir_id][$fid] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -626,6 +629,7 @@ class file_inspector {
|
|||||||
if ($_POST['core'] != 'fail')
|
if ($_POST['core'] != 'fail')
|
||||||
{
|
{
|
||||||
$this -> files[$dir_id][$fid]['icon'] = 'file_uncalc';
|
$this -> files[$dir_id][$fid]['icon'] = 'file_uncalc';
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
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)))
|
while (is_resource($handle) && false !== ($readdir = readdir($handle)))
|
||||||
{
|
{
|
||||||
@@ -729,7 +736,9 @@ class file_inspector {
|
|||||||
|
|
||||||
$aid = strtolower($readdir);
|
$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 (strpos($dir.'/'.$readdir, 'htmlarea') === false) {
|
||||||
if (isset($deprecated[$readdir]))
|
if (isset($deprecated[$readdir]))
|
||||||
{
|
{
|
||||||
@@ -741,11 +750,14 @@ class file_inspector {
|
|||||||
$this -> count['deprecated']['size'] += $this -> files[$dir_id][$aid]['size'];
|
$this -> count['deprecated']['size'] += $this -> files[$dir_id][$aid]['size'];
|
||||||
$dir_icon = 'folder_old';
|
$dir_icon = 'folder_old';
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if ($_POST['noncore'])
|
if ($_POST['noncore'])
|
||||||
{
|
{
|
||||||
$this -> files[$dir_id][$aid]['file'] = ($_POST['type'] == 'tree') ? $readdir : $dir.'/'.$readdir;
|
$this -> files[$dir_id][$aid]['file'] = ($_POST['type'] == 'tree') ? $readdir : $dir.'/'.$readdir;
|
||||||
$this -> files[$dir_id][$aid]['size'] = filesize($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 -> files[$dir_id][$aid]['icon'] = 'file_unknown';
|
||||||
$this -> count['unknown']['num']++;
|
$this -> count['unknown']['num']++;
|
||||||
$this -> count['unknown']['size'] += $this -> files[$dir_id][$aid]['size'];
|
$this -> count['unknown']['size'] += $this -> files[$dir_id][$aid]['size'];
|
||||||
@@ -1047,8 +1059,10 @@ class file_inspector {
|
|||||||
$text .= "</table>
|
$text .= "</table>
|
||||||
</dit><br />";
|
</dit><br />";
|
||||||
|
|
||||||
|
echo e107::getMessage()->render();
|
||||||
echo $text;
|
echo $text;
|
||||||
|
|
||||||
|
|
||||||
//$ns -> tablerender(FR_LAN_1.'...', $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% }
|
.w { padding: 1px 0px 1px 8px; vertical-align: bottom; width: 90% }
|
||||||
.i { width: 16px; height: 16px }
|
.i { width: 16px; height: 16px }
|
||||||
.e { width: 9px; height: 9px }
|
.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";
|
</style>\n";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user