Fix missing favicon
Update default favicon
This commit is contained in:
parent
8276923634
commit
02830caae3
2 changed files with 3 additions and 4 deletions
|
@ -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