mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update not found image
This commit is contained in:
parent
d4801c1c54
commit
9246360990
1 changed files with 11 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
$configFile = dirname(__FILE__).'/../../videos/configuration.php';
|
||||
$configFile = dirname(__FILE__) . '/../../videos/configuration.php';
|
||||
require_once $configFile;
|
||||
session_write_close();
|
||||
|
||||
|
@ -18,6 +18,9 @@ if (preg_match('/videos\/(.*\/)?(.*)_thumbs(V2)?.jpg/', $imageURL, $matches) &&
|
|||
$jpg = Video::getPathToFile("{$matches[2]}.jpg");
|
||||
if (file_exists($jpg)) {
|
||||
$file = $jpg;
|
||||
if(preg_match('/_thumbsV2/', $imageURL)){
|
||||
convertImageIfNotExists($global['systemRootPath'] . $jpg, $imageURL, $advancedCustom->thumbsWidthPortrait / 2, $advancedCustom->thumbsHeightPortrait / 2, true);
|
||||
}
|
||||
$type = 'image/jpg';
|
||||
//header("HTTP/1.0 404 Not Found");
|
||||
header('Content-Type:' . $type);
|
||||
|
@ -29,17 +32,17 @@ if (preg_match('/videos\/(.*\/)?(.*)_thumbs(V2)?.jpg/', $imageURL, $matches) &&
|
|||
}
|
||||
|
||||
if (empty($_GET['notFound'])) {
|
||||
header("Location: ".getCDN()."view/img/image404.php?notFound=1");
|
||||
header("Location: " . getCDN() . "view/img/image404.php?notFound=1");
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
header("Pragma-directive: no-cache");
|
||||
header("Cache-directive: no-cache");
|
||||
header("Expires: 0");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
header("Pragma-directive: no-cache");
|
||||
header("Cache-directive: no-cache");
|
||||
header("Expires: 0");
|
||||
*
|
||||
*/
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue