diff options
| author | 2015-05-10 00:06:27 +0200 | |
|---|---|---|
| committer | 2015-05-10 00:06:27 +0200 | |
| commit | e0f9621f4075c486e1568c5cb8e4d690b4c8c57c (patch) | |
| tree | faca8935a698a8ec2a66d4f895ed018cc5151e67 /lib/lib_rss.php | |
| parent | 71c4c3da5eb78f9146f70e4c1c7690157d6bce63 (diff) | |
| parent | 2bfc4dbf8b19cd2b892526ef65a966ff3bfef718 (diff) | |
Merge pull request #815 from Alkarex/Logging
SimplePie logging of HTTP requests
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index e5fe73041..65a1a8e04 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -123,6 +123,7 @@ function customSimplePie() { $limits = $system_conf->limits; $simplePie = new SimplePie(); $simplePie->set_useragent(_t('gen.freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ') ' . SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION); + $simplePie->set_syslog($system_conf->simplepie_syslog_enabled); $simplePie->set_cache_location(CACHE_PATH); $simplePie->set_cache_duration($limits['cache_duration']); $simplePie->set_timeout($limits['timeout']); @@ -180,7 +181,7 @@ function sanitizeHTML($data, $base = '') { function get_content_by_parsing ($url, $path) { require_once (LIB_PATH . '/lib_phpQuery.php'); - Minz_Log::notice('FreshRSS GET ' . url_remove_credentials($url)); + Minz_Log::notice('FreshRSS GET ' . SimplePie_Misc::url_remove_credentials($url)); $html = file_get_contents ($url); if ($html) { @@ -429,13 +430,3 @@ function array_push_unique(&$array, $value) { function array_remove(&$array, $value) { $array = array_diff($array, array($value)); } - - -/** - * Sanitize a URL by removing HTTP credentials. - * @param $url the URL to sanitize. - * @return the same URL without HTTP credentials. - */ -function url_remove_credentials($url) { - return preg_replace('/[^\/]*:[^:]*@/', '', $url); -} |
