mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-08 10:32:23 -04:00
Moves PHP feature checks into main class.
This commit is contained in:
parent
972be7677c
commit
eb7f3878b1
2 changed files with 9 additions and 3 deletions
|
@ -146,9 +146,9 @@ else if ($action === "getzip") {
|
||||||
else if ($action === "checks") {
|
else if ($action === "checks") {
|
||||||
|
|
||||||
$response = array(
|
$response = array(
|
||||||
'php' => true,
|
'php' => $h5ai->checks["php"],
|
||||||
'zips' => class_exists("ZipArchive"),
|
'zips' => $h5ai->checks["php"] && $h5ai->checks["zip"],
|
||||||
'thumbs' => GD_VERSION != "GD_VERSION"
|
'thumbs' => $h5ai->checks["php"] && $h5ai->checks["gd"]
|
||||||
);
|
);
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,12 @@ class H5ai {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|
||||||
|
$this->checks = array(
|
||||||
|
"php" => version_compare(PHP_VERSION, "5.2.0") >= 0,
|
||||||
|
"zip" => class_exists("ZipArchive"),
|
||||||
|
"gd" => GD_VERSION != "GD_VERSION"
|
||||||
|
);
|
||||||
|
|
||||||
$this->h5aiAbsPath = H5AI_ABS_PATH;
|
$this->h5aiAbsPath = H5AI_ABS_PATH;
|
||||||
|
|
||||||
global $H5AI_CONFIG;
|
global $H5AI_CONFIG;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue