mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-20 15:08:00 +00:00
allow rendering of existing files
This commit is contained in:
@@ -79,6 +79,7 @@ function architect($url)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//we didn't find a hash. send error 404
|
//we didn't find a hash. send error 404
|
||||||
if($hash===false)
|
if($hash===false)
|
||||||
{
|
{
|
||||||
@@ -109,7 +110,7 @@ function architect($url)
|
|||||||
$extension = pathinfo($hash, PATHINFO_EXTENSION);
|
$extension = pathinfo($hash, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
|
|
||||||
foreach(loadAllContentControllers() as $cc)
|
foreach(loadAllContentControllers(true) as $cc)
|
||||||
{
|
{
|
||||||
if(in_array($extension,(new $cc)->getRegisteredExtensions()))
|
if(in_array($extension,(new $cc)->getRegisteredExtensions()))
|
||||||
{
|
{
|
||||||
@@ -473,10 +474,10 @@ function getStorageControllers()
|
|||||||
return $controllers;
|
return $controllers;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadAllContentControllers()
|
function loadAllContentControllers($all=false)
|
||||||
{
|
{
|
||||||
$allowedcontrollers = false;
|
$allowedcontrollers = false;
|
||||||
if(defined('CONTENTCONTROLLERS') && CONTENTCONTROLLERS != '')
|
if(defined('CONTENTCONTROLLERS') && CONTENTCONTROLLERS != '' && $all!==true)
|
||||||
{
|
{
|
||||||
$allowedcontrollers = array_map('strtolower', explode(',',CONTENTCONTROLLERS));
|
$allowedcontrollers = array_map('strtolower', explode(',',CONTENTCONTROLLERS));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user