Compare commits
2 commits
8276923634
...
4d7c3dbbc5
Author | SHA1 | Date | |
---|---|---|---|
4d7c3dbbc5 | |||
02830caae3 |
3 changed files with 4 additions and 4 deletions
|
@ -169,6 +169,7 @@ See LICENSE file for more detail.
|
||||||
|
|
||||||
- [W3c](https://www.w3schools.com/w3css/) for w3.css
|
- [W3c](https://www.w3schools.com/w3css/) for w3.css
|
||||||
- [Fork Awesome](https://forkaweso.me/Fork-Awesome/) for icon
|
- [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)
|
- [embed/embed](https://github.com/oscarotero/Embed) for embed (fav and og)
|
||||||
- [hassankhan/config](https://github.com/hassankhan/config) for config (config mananger)
|
- [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)
|
- [chrome-php/chrome](https://github.com/chrome-php/chrome) for chrome-php (wrapper for chrome dev-tool)
|
||||||
|
|
|
@ -33,18 +33,18 @@ class GetFav extends GetThumb {
|
||||||
|
|
||||||
if (!is_null($info->favicon)) {
|
if (!is_null($info->favicon)) {
|
||||||
if (!$favicon = @file_get_contents($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);
|
$this->db->addUpdate(2, $this->type);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} elseif (!is_null($info->icon)) {
|
} elseif (!is_null($info->icon)) {
|
||||||
if (!$favicon = @file_get_contents($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);
|
$this->db->addUpdate(2, $this->type);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
$this->db->addUpdate(2, $this->type);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,6 @@ class GetFav extends GetThumb {
|
||||||
if (!file_exists($this->requestImg) && $this->type === 'fav') {
|
if (!file_exists($this->requestImg) && $this->type === 'fav') {
|
||||||
$this->makeFavicon();
|
$this->makeFavicon();
|
||||||
}
|
}
|
||||||
//echo '<img src="data:image/png;base64,'.base64_encode(file_get_contents($this->requestImg)).'">';
|
|
||||||
header("Content-type: image/$this->fileFormat");
|
header("Content-type: image/$this->fileFormat");
|
||||||
header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
header('Expires: ', gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||||
echo file_get_contents($this->requestImg);
|
echo file_get_contents($this->requestImg);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in a new issue