Browse Source

handle without inodes

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.0@84 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.0
Xuefer 15 years ago
parent
commit
24e475ca0c
  1. 7
      admin/xcache.php
  2. 10
      admin/xcache.tpl.php

7
admin/xcache.php

@ -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 ++;
}

10
admin/xcache.tpl.php

@ -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>

Loading…
Cancel
Save