cvs: pear-core /tests/PEAR_Command_Auth teardown.php.inc
| From: | Greg Beaver | Date: | Tue, 21 Feb 2006 01:19:15 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Auth teardown.php.inc | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4562@lists.php.net to get a copy of this message | ||
cellog Tue Feb 21 01:19:15 2006 UTC
Added files:
/pear-core/tests/PEAR_Command_Auth teardown.php.inc
Log:
add missing teardown
http://cvs.php.net/viewcvs.cgi/pear-core/tests/PEAR_Command_Auth/teardown.php.inc?view=markup&rev=1.1
Index: pear-core/tests/PEAR_Command_Auth/teardown.php.inc
+++ pear-core/tests/PEAR_Command_Auth/teardown.php.inc
<?php
$server = 'pear.Chiara';
//$server = 'test.pear.php.net';
$temp_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'testinstallertemp';
function cleanall($dir = null)
{
if ($dir !== null) {
$statedir = $dir;
} else {
$statedir = $GLOBALS['statedir'];
}
clearstatcache();
if (file_exists($statedir)) {
$dp = opendir($statedir);
while ($ent = readdir($dp)) {
if (in_array($ent, array('.', '..'))) {
continue;
}
if (is_dir($statedir . DIRECTORY_SEPARATOR . $ent)) {
cleanall($statedir . DIRECTORY_SEPARATOR . $ent);
continue;
}
unlink($statedir . DIRECTORY_SEPARATOR . $ent);
}
closedir($dp);
rmdir($statedir);
}
}
cleanall($temp_path);
?>