forked from FreshRSS/FreshRSS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customisable constants.local.php (FreshRSS#1725)
- Loading branch information
Showing
2 changed files
with
42 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
constants.local.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,50 @@ | ||
<?php | ||
//NB: Do not edit; use ./constants.local.php instead. | ||
|
||
//<Not customisable> | ||
define('FRESHRSS_VERSION', '1.8.1-dev'); | ||
define('FRESHRSS_WEBSITE', 'https://freshrss.org'); | ||
define('FRESHRSS_WIKI', 'https://freshrss.github.io/FreshRSS/'); | ||
|
||
define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')'); | ||
define('FRESHRSS_PATH', __DIR__); | ||
define('PUBLIC_PATH', FRESHRSS_PATH . '/p'); | ||
define('PUBLIC_TO_INDEX_PATH', '/i'); | ||
define('INDEX_PATH', PUBLIC_PATH . PUBLIC_TO_INDEX_PATH); | ||
define('PUBLIC_RELATIVE', '..'); | ||
define('LIB_PATH', FRESHRSS_PATH . '/lib'); | ||
define('APP_PATH', FRESHRSS_PATH . '/app'); | ||
define('EXTENSIONS_PATH', FRESHRSS_PATH . '/extensions'); | ||
//</Not customisable> | ||
|
||
function safe_define($name, $value) { | ||
if (!defined($name)) { | ||
return define($name, $value); | ||
} | ||
} | ||
|
||
if (file_exists(__DIR__ . '/constants.local.php')) { | ||
//Include custom / local settings: | ||
include(__DIR__ . '/constants.local.php'); | ||
} | ||
|
||
safe_define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')'); | ||
|
||
// PHP text output compression http://php.net/ob_gzhandler (better to do it at Web server level) | ||
define('PHP_COMPRESSION', false); | ||
safe_define('PHP_COMPRESSION', false); | ||
|
||
// Maximum log file size in Bytes, before it will be divided by two | ||
define('MAX_LOG_SIZE', 1048576); | ||
|
||
// Constantes de chemins | ||
define('FRESHRSS_PATH', dirname(__FILE__)); | ||
|
||
define('PUBLIC_PATH', FRESHRSS_PATH . '/p'); | ||
define('PUBLIC_TO_INDEX_PATH', '/i'); | ||
define('INDEX_PATH', PUBLIC_PATH . PUBLIC_TO_INDEX_PATH); | ||
define('PUBLIC_RELATIVE', '..'); | ||
|
||
define('DATA_PATH', FRESHRSS_PATH . '/data'); | ||
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('LIB_PATH', FRESHRSS_PATH . '/lib'); | ||
define('APP_PATH', FRESHRSS_PATH . '/app'); | ||
define('EXTENSIONS_PATH', FRESHRSS_PATH . '/extensions'); | ||
|
||
define('TMP_PATH', sys_get_temp_dir()); | ||
safe_define('MAX_LOG_SIZE', 1048576); | ||
|
||
//This directory must be writable | ||
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'); | ||
|
||
//Directory used for feed mutex with *.freshrss.lock files. Must be writable. | ||
safe_define('TMP_PATH', sys_get_temp_dir()); |