Removes temp dir references.

This commit is contained in:
Lars Jung 2012-10-05 21:27:27 +02:00
parent f6832982bb
commit e53f261c69
4 changed files with 2 additions and 15 deletions

View File

@ -33,10 +33,6 @@ html.no-js( lang="en" )
span.test-label cache directory
span.test-result ?
div.test-info web server has write access
li.test( data-id="temp" )
span.test-label temp directory
span.test-result ?
div.test-info web server has write access
li.test( data-id="thumbs" )
span.test-label image thumbs
span.test-result ?

View File

@ -88,7 +88,7 @@ else if ($action === "getarchive") {
list($id, $as) = check_keys(array("id", "as"));
json_fail(2, "file not found", !preg_match("/^package-/", $id));
$target = $h5ai->getTempAbsPath() . "/" . $id;
$target = $h5ai->getCacheAbsPath() . "/" . $id;
json_fail(3, "file not found", !file_exists($target));
header("Content-Type: application/octet-stream");
@ -110,7 +110,6 @@ else if ($action === "getchecks") {
$gd = array_key_exists("JPG Support", $gdinfo) && $gdinfo["JPG Support"] || array_key_exists("JPEG Support", $gdinfo) && $gdinfo["JPEG Support"];
}
$cache = @is_writable($h5ai->getCacheAbsPath());
$temp = @is_writable($h5ai->getTempAbsPath());
$tar = @preg_match("/tar$/", `which tar`) > 0;
$zip = @preg_match("/zip$/", `which zip`) > 0;
$convert = @preg_match("/convert$/", `which convert`) > 0;
@ -121,7 +120,6 @@ else if ($action === "getchecks") {
"php" => $php,
"cache" => $cache,
"thumbs" => $gd,
"temp" => $temp,
"archive" => $archive,
"tar" => $tar,
"zip" => $zip,

View File

@ -29,7 +29,7 @@ class Archive {
return 404;
}
$target = $this->h5ai->getTempAbsPath() . "/package-" . sha1(microtime(true) . rand()) . "." . $format;
$target = $this->h5ai->getCacheAbsPath() . "/package-" . sha1(microtime(true) . rand()) . "." . $format;
try {
if ($execution === "shell") {

View File

@ -127,13 +127,6 @@ class H5ai {
}
public function getTempAbsPath() {
// return H5ai::normalize_path(sys_get_temp_dir());
return $this->h5aiAbsPath . '/cache';
}
public function getOptions() {
return $this->options;