[xoops-cvslog 1586] CVS update: xoops2jp/html/modules/stdCache/blocks

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 1月 6日 (金) 12:04:26 JST


Index: xoops2jp/html/modules/stdCache/blocks/cacheclear.php
diff -u /dev/null xoops2jp/html/modules/stdCache/blocks/cacheclear.php:1.1.2.1
--- /dev/null	Fri Jan  6 12:04:26 2006
+++ xoops2jp/html/modules/stdCache/blocks/cacheclear.php	Fri Jan  6 12:04:26 2006
@@ -0,0 +1,24 @@
+<?php
+
+function Stdcache_cacheclear_show()
+{
+	$root =& XCube_Root::getSingleton();
+	$cache =& $root->getCacheSystem();
+	if (!$cache->enableCache()) {
+		return false;
+	}
+
+	if($handler = opendir(XOOPS_CACHE_PATH)) {
+		while(($file = readdir($handler)) !== false) {
+			if(preg_match("/\w+\.cache\.html$/", $file, $matches)) {
+				@unlink($matches[0]);
+			}
+		}
+		closedir($handler);
+	}
+	
+	$block['dmy'] = true;
+	return $block;
+}
+
+?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index