Refactor PHP.

This commit is contained in:
Lars Jung 2015-05-10 01:39:18 +02:00
parent 6b071fc1e7
commit 48b788eaef
3 changed files with 10 additions and 10 deletions

View file

@ -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);
}

View file

@ -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"
]);
}

View file

@ -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();