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") {
|
||||
|
||||
$response = array(
|
||||
'php' => true,
|
||||
'zips' => class_exists("ZipArchive"),
|
||||
'thumbs' => GD_VERSION != "GD_VERSION"
|
||||
'php' => $h5ai->checks["php"],
|
||||
'zips' => $h5ai->checks["php"] && $h5ai->checks["zip"],
|
||||
'thumbs' => $h5ai->checks["php"] && $h5ai->checks["gd"]
|
||||
);
|
||||
echo json_encode($response);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,12 @@ class H5ai {
|
|||
|
||||
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;
|
||||
|
||||
global $H5AI_CONFIG;
|
||||
|
|
Loading…
Add table
Reference in a new issue