Pārlūkot izejas kodu

Favicons : image pour 404

https://github.com/marienfressinaud/FreshRSS/issues/228
https://github.com/marienfressinaud/FreshRSS/issues/290
Alexandre Alapetite 12 gadi atpakaļ
vecāks
revīzija
0e9ed2a408
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      public/f.php

+ 2 - 0
public/f.php

@@ -50,6 +50,8 @@ $txtMTime = @filemtime($txt);
 if (($icoMTime == false) || ($txtMTime > $icoMTime)) {
 if (($icoMTime == false) || ($txtMTime > $icoMTime)) {
 	if ($txtMTime == false) {
 	if ($txtMTime == false) {
 		header('HTTP/1.1 404 Not Found');
 		header('HTTP/1.1 404 Not Found');
+		header('Content-Type: image/gif');
+		readfile(PUBLIC_PATH . '/themes/icons/grey.gif');	//TODO: Better 404 favicon
 		die();
 		die();
 	}
 	}
 	$url = file_get_contents($txt);
 	$url = file_get_contents($txt);