Jelajahi Sumber

Manual merge /dev

Alexandre Alapetite 7 tahun lalu
induk
melakukan
6bc49e137e
5 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 1 1
      CHANGELOG.md
  2. 1 0
      Docker/Dockerfile
  3. 3 0
      constants.php
  4. 1 1
      lib/lib_rss.php
  5. 1 1
      p/scripts/main.js

+ 1 - 1
CHANGELOG.md

@@ -11,7 +11,7 @@
 		* Performance: Disable unused Apache modules
 		* Add option to mount custom `.htaccess` for HTTP authentication
 		* Docker logs gets PHP syslog messages (e.g. from cron job and when fetching external content)
-	* Send a copy of PHP syslog messages to STDERR [#2208](https://github.com/FreshRSS/FreshRSS/pull/2208)
+	* New environment variable `COPY_SYSLOG_TO_STDERR` or in `constants.local.php` to copy PHP syslog messages to STDERR [#2213](https://github.com/FreshRSS/FreshRSS/pull/2213)
 	* Run Docker cron job with Apache user instead of root [#2208](https://github.com/FreshRSS/FreshRSS/pull/2208)
 	* Accept HTTP header `X-WebAuth-User` for delegated HTTP Authentication [#2204](https://github.com/FreshRSS/FreshRSS/pull/2204)
 * API

+ 1 - 0
Docker/Dockerfile

@@ -23,6 +23,7 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
 	echo "17,37 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \
 		/var/spool/cron/crontabs/root
 
+ENV COPY_SYSLOG_TO_STDERR On
 ENV CRON_MIN ''
 ENTRYPOINT ["./Docker/entrypoint.sh"]
 

+ 3 - 0
constants.php

@@ -32,6 +32,9 @@ safe_define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS
 // PHP text output compression http://php.net/ob_gzhandler (better to do it at Web server level)
 safe_define('PHP_COMPRESSION', false);
 
+// For cases when syslog is not available
+safe_define('COPY_SYSLOG_TO_STDERR', isset($_SERVER['COPY_SYSLOG_TO_STDERR']) ? filter_var($_SERVER['COPY_SYSLOG_TO_STDERR'], FILTER_VALIDATE_BOOLEAN) : false);
+
 // Maximum log file size in Bytes, before it will be divided by two
 safe_define('MAX_LOG_SIZE', 1048576);
 

+ 1 - 1
lib/lib_rss.php

@@ -203,7 +203,7 @@ function html_only_entity_decode($text) {
 }
 
 function prepareSyslog() {
-	return openlog("FreshRSS", LOG_PERROR | LOG_PID, LOG_USER);
+	return COPY_SYSLOG_TO_STDERR ? openlog("FreshRSS", LOG_PERROR | LOG_PID, LOG_USER) : false;
 }
 
 function customSimplePie($attributes = array()) {

+ 1 - 1
p/scripts/main.js

@@ -581,7 +581,7 @@ function init_column_categories() {
 			}
 		});
 		$(this).parent().next('.tree-folder-items').slideToggle(300, function () {
-			//Workaround for Gecko bug in Firefox 64-65(+?):
+			//Workaround for Gecko bug 1514498 in Firefox 64
 			const sidebar = document.getElementById('sidebar');
 			if (sidebar && sidebar.scrollHeight > sidebar.clientHeight &&	//if needs scrollbar
 				sidebar.scrollWidth >= sidebar.offsetWidth) {	//but no scrollbar