Location: PHPKode > projects > Viscacha > classes/cron/jobs/deletesearch.php
<?php
if (defined('VISCACHA_CORE') == false) { die('Error: Hacking Attempt'); }

global $filesystem;

$dir = 'cache/search/';
$d = dir($dir);
while (false !== ($entry = $d->read())) {
	if ($entry != '.htaccess' && $entry != 'index.htm' && !is_dir($dir.$entry) && file_exists($dir.$entry) && fileatime($dir.$entry) < time()-60*60*24*7) {
		$filesystem->unlink($dir.$entry);
	}
}
$d->close();

?>
Return current item: Viscacha