mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Refactor PHP.
This commit is contained in:
parent
6b071fc1e7
commit
48b788eaef
3 changed files with 10 additions and 10 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue