1
0
Fork 0

handle without inodes

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.0@84 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.0
Xuefer 2006-06-18 01:29:08 +00:00
parent 9980dfc47a
commit 24e475ca0c
2 changed files with 14 additions and 3 deletions

View File

@ -162,10 +162,15 @@ case XC_TYPE_VAR:
}
if ($type == XC_TYPE_PHP) {
$inodes = array();
$haveinode = false;
foreach ($cachelist['cache_list'] as $e) {
if (!isset($e['inode'])) {
break;
}
$haveinode = true;
$i = &$inodes[$e['inode']];
if (isset($i) && $i == 1) {
set_error("duplicate inode $e[inode]");
trigger_error("duplicate inode $e[inode]");
}
$i ++;
}

View File

@ -163,9 +163,11 @@ if ($cachelist) {
<?php if ($isphp) { ?>
<th><a href="javascript:" onclick="resort(this); return false">SrcSize</a></th>
<th><a href="javascript:" onclick="resort(this); return false">Modify</a></th>
<?php if ($haveinode) { ?>
<th><a href="javascript:" onclick="resort(this); return false">device</a></th>
<th><a href="javascript:" onclick="resort(this); return false">inode</a></th>
<?php } ?>
<?php } ?>
<th><a href="javascript:" onclick="resort(this); return false">Access</a></th>
<th><a href="javascript:" onclick="resort(this); return false">Create</a></th>
<?php if ($listname == 'Deleted') { ?>
@ -202,9 +204,13 @@ ENTRY;
echo <<<ENTRY
<td int="{$entry['sourcesize']}">{$sourcesize}</td>
<td int="{$entry['mtime']}">{$mtime}</td>
<td int="{$entry['device']}">{$entry['device']}</td>
<td int="{$entry['inode']}">{$entry['inode']}</td>
ENTRY;
if (isset($entry['inode'])) {
echo <<<ENTRY
<td int="{$entry['device']}">{$entry['device']}</td>
<td int="{$entry['inode']}">{$entry['inode']}</td>
ENTRY;
}
}
echo <<<ENTRY
<td int="{$entry['atime']}">{$atime}</td>