mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-08 06:46:36 +02:00
Refactor PHP.
This commit is contained in:
@@ -141,7 +141,7 @@ class Bootstrap {
|
||||
$cmd = "which";
|
||||
}
|
||||
|
||||
foreach (["tar", "zip", "convert", "ffmpeg", "avconv", "du"] as $c) {
|
||||
foreach (["avconv", "convert", "du", "ffmpeg", "tar", "zip"] as $c) {
|
||||
$cmds[$c] = ($cmd !== false) && Util::exec_0($cmd . " " . $c);
|
||||
}
|
||||
|
||||
|
@@ -50,12 +50,12 @@ class App {
|
||||
|
||||
"HAS_WRITABLE_CACHE",
|
||||
|
||||
"HAS_CMD_TAR",
|
||||
"HAS_CMD_ZIP",
|
||||
"HAS_CMD_CONVERT",
|
||||
"HAS_CMD_FFMPEG",
|
||||
"HAS_CMD_AVCONV",
|
||||
"HAS_CMD_DU"
|
||||
"HAS_CMD_CONVERT",
|
||||
"HAS_CMD_DU",
|
||||
"HAS_CMD_FFMPEG",
|
||||
"HAS_CMD_TAR",
|
||||
"HAS_CMD_ZIP"
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
define("BASE_PATH", preg_replace("#[\\\\/]+#", "/", dirname(__FILE__)));
|
||||
$basepath = preg_replace("#[\\\\/]+#", "/", dirname(__FILE__));
|
||||
|
||||
require_once(BASE_PATH . "/inc/version-check.php");
|
||||
require_once(BASE_PATH . "/inc/class-bootstrap.php");
|
||||
require_once($basepath . "/inc/version-check.php");
|
||||
require_once($basepath . "/inc/class-bootstrap.php");
|
||||
|
||||
(new Bootstrap(BASE_PATH))->run();
|
||||
(new Bootstrap($basepath))->run();
|
||||
|
Reference in New Issue
Block a user