Changeset 340 for dev/common/admin/option_acache.php
- Timestamp:
- 10/14/08 22:17:05 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin/option_acache.php
r317 r340 10 10 options::fadd('Ignore pages', 'cache_ignore', 'edit:size:60'); 11 11 options::fadd('Cache times', 'cache_times', 'edit:size:60'); 12 13 options::cat('Advanced', 'Cache', 'Killmail Cache'); 14 options::fadd('Killmail Caching enabled','km_cache_enabled','checkbox'); 15 options::fadd('Killmail Cache directory', 'km_cache_dir', 'edit:size:40'); 16 options::fadd('Cached Killmails', 'none', 'custom', array('admin_acache', 'getKillmails')); 12 17 13 18 options::cat('Advanced', 'Cache', 'Reinforced'); … … 34 39 } 35 40 } 41 42 function getKillmails() 43 { 44 if (config::get('km_cache_dir')) 45 { 46 $dir = config::get('km_cache_dir'); 47 $count = 0; 48 if(is_dir($dir)) 49 { 50 if($handle = opendir($dir)) 51 { 52 while(($file = readdir($handle)) !== false) 53 { 54 $count++; 55 } 56 closedir($handle); 57 } 58 } 59 return $count - 2; 60 } 61 else 62 { 63 return 0; 64 } 65 } 36 66 } 37 67 ?>