From 3a6c987347e9b4bda53d367b13aaa4e13e5bc845 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Jun 2020 01:05:11 +0200 Subject: [PATCH] allow rendering of existing files --- inc/core.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/core.php b/inc/core.php index eadcda4..bbf27e8 100644 --- a/inc/core.php +++ b/inc/core.php @@ -79,6 +79,7 @@ function architect($url) } } + //we didn't find a hash. send error 404 if($hash===false) { @@ -109,7 +110,7 @@ function architect($url) $extension = pathinfo($hash, PATHINFO_EXTENSION); - foreach(loadAllContentControllers() as $cc) + foreach(loadAllContentControllers(true) as $cc) { if(in_array($extension,(new $cc)->getRegisteredExtensions())) { @@ -473,10 +474,10 @@ function getStorageControllers() return $controllers; } -function loadAllContentControllers() +function loadAllContentControllers($all=false) { $allowedcontrollers = false; - if(defined('CONTENTCONTROLLERS') && CONTENTCONTROLLERS != '') + if(defined('CONTENTCONTROLLERS') && CONTENTCONTROLLERS != '' && $all!==true) { $allowedcontrollers = array_map('strtolower', explode(',',CONTENTCONTROLLERS)); }