mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-31 15:28:19 -04:00
Removes temp dir references.
This commit is contained in:
parent
f6832982bb
commit
e53f261c69
4 changed files with 2 additions and 15 deletions
|
@ -33,10 +33,6 @@ html.no-js( lang="en" )
|
||||||
span.test-label cache directory
|
span.test-label cache directory
|
||||||
span.test-result ?
|
span.test-result ?
|
||||||
div.test-info web server has write access
|
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" )
|
li.test( data-id="thumbs" )
|
||||||
span.test-label image thumbs
|
span.test-label image thumbs
|
||||||
span.test-result ?
|
span.test-result ?
|
||||||
|
|
|
@ -88,7 +88,7 @@ else if ($action === "getarchive") {
|
||||||
list($id, $as) = check_keys(array("id", "as"));
|
list($id, $as) = check_keys(array("id", "as"));
|
||||||
json_fail(2, "file not found", !preg_match("/^package-/", $id));
|
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));
|
json_fail(3, "file not found", !file_exists($target));
|
||||||
|
|
||||||
header("Content-Type: application/octet-stream");
|
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"];
|
$gd = array_key_exists("JPG Support", $gdinfo) && $gdinfo["JPG Support"] || array_key_exists("JPEG Support", $gdinfo) && $gdinfo["JPEG Support"];
|
||||||
}
|
}
|
||||||
$cache = @is_writable($h5ai->getCacheAbsPath());
|
$cache = @is_writable($h5ai->getCacheAbsPath());
|
||||||
$temp = @is_writable($h5ai->getTempAbsPath());
|
|
||||||
$tar = @preg_match("/tar$/", `which tar`) > 0;
|
$tar = @preg_match("/tar$/", `which tar`) > 0;
|
||||||
$zip = @preg_match("/zip$/", `which zip`) > 0;
|
$zip = @preg_match("/zip$/", `which zip`) > 0;
|
||||||
$convert = @preg_match("/convert$/", `which convert`) > 0;
|
$convert = @preg_match("/convert$/", `which convert`) > 0;
|
||||||
|
@ -121,7 +120,6 @@ else if ($action === "getchecks") {
|
||||||
"php" => $php,
|
"php" => $php,
|
||||||
"cache" => $cache,
|
"cache" => $cache,
|
||||||
"thumbs" => $gd,
|
"thumbs" => $gd,
|
||||||
"temp" => $temp,
|
|
||||||
"archive" => $archive,
|
"archive" => $archive,
|
||||||
"tar" => $tar,
|
"tar" => $tar,
|
||||||
"zip" => $zip,
|
"zip" => $zip,
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Archive {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = $this->h5ai->getTempAbsPath() . "/package-" . sha1(microtime(true) . rand()) . "." . $format;
|
$target = $this->h5ai->getCacheAbsPath() . "/package-" . sha1(microtime(true) . rand()) . "." . $format;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($execution === "shell") {
|
if ($execution === "shell") {
|
||||||
|
|
|
@ -127,13 +127,6 @@ class H5ai {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getTempAbsPath() {
|
|
||||||
|
|
||||||
// return H5ai::normalize_path(sys_get_temp_dir());
|
|
||||||
return $this->h5aiAbsPath . '/cache';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getOptions() {
|
public function getOptions() {
|
||||||
|
|
||||||
return $this->options;
|
return $this->options;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue