Compare commits

...

2 Commits

Author SHA1 Message Date
Knah Tsaeb 4d7c3dbbc5 Add missing credit 2024-03-20 10:35:43 +01:00
Knah Tsaeb 02830caae3 Fix missing favicon
Update default favicon
2024-03-20 10:33:35 +01:00
3 changed files with 4 additions and 4 deletions

View File

@ -169,6 +169,7 @@ See LICENSE file for more detail.
- [W3c](https://www.w3schools.com/w3css/) for w3.css
- [Fork Awesome](https://forkaweso.me/Fork-Awesome/) for icon
- [Iconify.design](https://icon-sets.iconify.design/iconamoon/star-off/) for default favicon
- [embed/embed](https://github.com/oscarotero/Embed) for embed (fav and og)
- [hassankhan/config](https://github.com/hassankhan/config) for config (config mananger)
- [chrome-php/chrome](https://github.com/chrome-php/chrome) for chrome-php (wrapper for chrome dev-tool)

View File

@ -33,18 +33,18 @@ class GetFav extends GetThumb {
if (!is_null($info->favicon)) {
if (!$favicon = @file_get_contents($info->favicon)) {
copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg);
copy(__DIR__ . '/../../src/images/error_fav.png', $this->demande->requestImg);
$this->db->addUpdate(2, $this->type);
return true;
}
} elseif (!is_null($info->icon)) {
if (!$favicon = @file_get_contents($info->icon)) {
copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg);
copy(__DIR__ . '/../../src/images/error_fav.png', $this->demande->requestImg);
$this->db->addUpdate(2, $this->type);
return true;
}
} else {
copy(__DIR__ . '/../../src/images/error_fav.' . $this->fileFormat, $this->demande->requestImg);
copy(__DIR__ . '/../../src/images/error_fav.png', $this->demande->requestImg);
$this->db->addUpdate(2, $this->type);
return true;
}
@ -95,7 +95,6 @@ class GetFav extends GetThumb {
if (!file_exists($this->requestImg) && $this->type === 'fav') {
$this->makeFavicon();
}
//echo '<img src="data:image/png;base64,'.base64_encode(file_get_contents($this->requestImg)).'">';
header("Content-type: image/$this->fileFormat");
header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT');
echo file_get_contents($this->requestImg);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB