Removed constant IS_CONSOLE
This commit is contained in:
parent
bcfc5578de
commit
c1d8beb5f0
|
@ -11,8 +11,6 @@
|
|||
|
||||
use PHPCensor\Console\Application;
|
||||
|
||||
define('IS_CONSOLE', true);
|
||||
|
||||
error_reporting(-1);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
* @link http://www.phptesting.org/
|
||||
*/
|
||||
|
||||
use PHPCensor\Logging\LoggerConfig;
|
||||
|
||||
if (!defined('ROOT_DIR')) {
|
||||
define('ROOT_DIR', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
@ -39,10 +37,6 @@ if (!defined('IS_WIN')) {
|
|||
|
||||
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||
|
||||
if (defined('IS_CONSOLE') && IS_CONSOLE) {
|
||||
$loggerConfig = LoggerConfig::newFromFile(APP_DIR . "loggerconfig.php");
|
||||
}
|
||||
|
||||
// Load configuration if present:
|
||||
$conf = [];
|
||||
$conf['b8']['app']['namespace'] = 'PHPCensor';
|
||||
|
@ -60,8 +54,4 @@ if (!defined('APP_URL') && !empty($config)) {
|
|||
define('APP_URL', $config->get('php-censor.url', '') . '/');
|
||||
}
|
||||
|
||||
if (!defined('IS_CONSOLE')) {
|
||||
define('IS_CONSOLE', false);
|
||||
}
|
||||
|
||||
\PHPCensor\Helper\Lang::init($config);
|
||||
|
|
|
@ -39,10 +39,6 @@ if (!defined('IS_WIN')) {
|
|||
|
||||
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||
|
||||
if (defined('IS_CONSOLE') && IS_CONSOLE) {
|
||||
$loggerConfig = LoggerConfig::newFromFile(APP_DIR . "loggerconfig.php");
|
||||
}
|
||||
|
||||
// Load configuration if present:
|
||||
$conf = [];
|
||||
$conf['b8']['app']['namespace'] = 'PHPCensor';
|
||||
|
@ -60,8 +56,4 @@ if (!defined('APP_URL') && !empty($config)) {
|
|||
define('APP_URL', $config->get('php-censor.url', '') . '/');
|
||||
}
|
||||
|
||||
if (!defined('IS_CONSOLE')) {
|
||||
define('IS_CONSOLE', false);
|
||||
}
|
||||
|
||||
\PHPCensor\Helper\Lang::init($config, 'en');
|
||||
|
|
Loading…
Reference in a new issue