|
@@ -202,12 +202,19 @@ function html_only_entity_decode($text) {
|
|
|
return strtr($text, $htmlEntitiesOnly);
|
|
return strtr($text, $htmlEntitiesOnly);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function prepareSyslog() {
|
|
|
|
|
+ return openlog("FreshRSS", LOG_PERROR | LOG_PID, LOG_USER);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function customSimplePie($attributes = array()) {
|
|
function customSimplePie($attributes = array()) {
|
|
|
$system_conf = Minz_Configuration::get('system');
|
|
$system_conf = Minz_Configuration::get('system');
|
|
|
$limits = $system_conf->limits;
|
|
$limits = $system_conf->limits;
|
|
|
$simplePie = new SimplePie();
|
|
$simplePie = new SimplePie();
|
|
|
$simplePie->set_useragent(FRESHRSS_USERAGENT);
|
|
$simplePie->set_useragent(FRESHRSS_USERAGENT);
|
|
|
$simplePie->set_syslog($system_conf->simplepie_syslog_enabled);
|
|
$simplePie->set_syslog($system_conf->simplepie_syslog_enabled);
|
|
|
|
|
+ if ($system_conf->simplepie_syslog_enabled) {
|
|
|
|
|
+ prepareSyslog();
|
|
|
|
|
+ }
|
|
|
$simplePie->set_cache_location(CACHE_PATH);
|
|
$simplePie->set_cache_location(CACHE_PATH);
|
|
|
$simplePie->set_cache_duration($limits['cache_duration']);
|
|
$simplePie->set_cache_duration($limits['cache_duration']);
|
|
|
|
|
|
|
@@ -364,9 +371,9 @@ function get_user_configuration($username) {
|
|
|
join_path(FRESHRSS_PATH, 'config-user.default.php'));
|
|
join_path(FRESHRSS_PATH, 'config-user.default.php'));
|
|
|
} catch (Minz_ConfigurationNamespaceException $e) {
|
|
} catch (Minz_ConfigurationNamespaceException $e) {
|
|
|
// namespace already exists, do nothing.
|
|
// namespace already exists, do nothing.
|
|
|
- Minz_Log::warning($e->getMessage());
|
|
|
|
|
|
|
+ Minz_Log::warning($e->getMessage(), USERS_PATH . '/_/log.txt');
|
|
|
} catch (Minz_FileNotExistException $e) {
|
|
} catch (Minz_FileNotExistException $e) {
|
|
|
- Minz_Log::warning($e->getMessage());
|
|
|
|
|
|
|
+ Minz_Log::warning($e->getMessage(), USERS_PATH . '/_/log.txt');
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -375,14 +382,13 @@ function get_user_configuration($username) {
|
|
|
|
|
|
|
|
|
|
|
|
|
function httpAuthUser() {
|
|
function httpAuthUser() {
|
|
|
- if (isset($_SERVER['REMOTE_USER'])) {
|
|
|
|
|
|
|
+ if (!empty($_SERVER['REMOTE_USER'])) {
|
|
|
return $_SERVER['REMOTE_USER'];
|
|
return $_SERVER['REMOTE_USER'];
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (isset($_SERVER['REDIRECT_REMOTE_USER'])) {
|
|
|
|
|
|
|
+ } elseif (!empty($_SERVER['REDIRECT_REMOTE_USER'])) {
|
|
|
return $_SERVER['REDIRECT_REMOTE_USER'];
|
|
return $_SERVER['REDIRECT_REMOTE_USER'];
|
|
|
|
|
+ } elseif (!empty($_SERVER['HTTP_X_WEBAUTH_USER'])) {
|
|
|
|
|
+ return $_SERVER['HTTP_X_WEBAUTH_USER'];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return '';
|
|
return '';
|
|
|
}
|
|
}
|
|
|
|
|
|