mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-12 03:06:22 +00:00
minor warning adjustments
This commit is contained in:
@@ -26,7 +26,10 @@ else if(!isFolderWritable(ROOT.DS.'tmp'))
|
|||||||
// check if client has permission to upload
|
// check if client has permission to upload
|
||||||
executeUploadPermission();
|
executeUploadPermission();
|
||||||
|
|
||||||
$hash = sanatizeString(trim($_REQUEST['hash']))?sanatizeString(trim($_REQUEST['hash'])):false;
|
if(isset($_REQUEST['hash']))
|
||||||
|
$hash = sanatizeString(trim($_REQUEST['hash']));
|
||||||
|
else
|
||||||
|
$hash = false;
|
||||||
|
|
||||||
// check for POST upload
|
// check for POST upload
|
||||||
if ($_FILES['file']["error"] == UPLOAD_ERR_OK)
|
if ($_FILES['file']["error"] == UPLOAD_ERR_OK)
|
||||||
|
|||||||
@@ -319,6 +319,9 @@ class ImageController implements ContentController
|
|||||||
|
|
||||||
function shouldAlwaysBeWebp()
|
function shouldAlwaysBeWebp()
|
||||||
{
|
{
|
||||||
|
//sanity check
|
||||||
|
if(!$_SERVER['HTTP_ACCEPT']) return false;
|
||||||
|
|
||||||
if(defined('ALWAYS_WEBP') && ALWAYS_WEBP && strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false )
|
if(defined('ALWAYS_WEBP') && ALWAYS_WEBP && strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false )
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user