fix: replace custom safe_define function by define

This commit is contained in:
Robert Kaussow 2021-06-08 00:01:20 +02:00
parent 244e640e2e
commit c3d9f9a619
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -1,21 +1,15 @@
<?php
function safe_define($name, $value) {
if (!defined($name)) {
return define($name, $value);
}
}
define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')');
define('PHP_COMPRESSION', false);
define('COPY_SYSLOG_TO_STDERR', true);
define('MAX_LOG_SIZE', 1048576);
define('DATA_PATH', FRESHRSS_PATH . '/data');
safe_define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')');
safe_define('PHP_COMPRESSION', false);
safe_define('COPY_SYSLOG_TO_STDERR', true);
safe_define('MAX_LOG_SIZE', 1048576);
safe_define('DATA_PATH', FRESHRSS_PATH . '/data');
safe_define('UPDATE_FILENAME', DATA_PATH . '/update.php');
safe_define('USERS_PATH', DATA_PATH . '/users');
safe_define('ADMIN_LOG', USERS_PATH . '/_/log.txt');
safe_define('API_LOG', USERS_PATH . '/_/log_api.txt');
safe_define('CACHE_PATH', DATA_PATH . '/cache');
safe_define('PSHB_LOG', USERS_PATH . '/_/log_pshb.txt');
safe_define('PSHB_PATH', DATA_PATH . '/PubSubHubbub');
safe_define('TMP_PATH', CACHE_PATH);
define('UPDATE_FILENAME', DATA_PATH . '/update.php');
define('USERS_PATH', DATA_PATH . '/users');
define('ADMIN_LOG', USERS_PATH . '/_/log.txt');
define('API_LOG', USERS_PATH . '/_/log_api.txt');
define('CACHE_PATH', DATA_PATH . '/cache');
define('PSHB_LOG', USERS_PATH . '/_/log_pshb.txt');
define('PSHB_PATH', DATA_PATH . '/PubSubHubbub');
define('TMP_PATH', CACHE_PATH);