From 0e12d39b618480b29c43a7f61af7a85ab8fdded8 Mon Sep 17 00:00:00 2001 From: Christian Haschek Date: Mon, 2 Nov 2015 21:00:36 +0100 Subject: [PATCH] added new settings to hide pictshare upload form or hide the fact that you're running pictshare --- inc/core.php | 29 ++++++++++++++++++++++------- inc/example.config.inc.php | 11 +++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/inc/core.php b/inc/core.php index a3f14eb..aadb82d 100644 --- a/inc/core.php +++ b/inc/core.php @@ -59,14 +59,29 @@ function whatToDo($url) if(!is_array($data) || !$data['hash']) { - if($_POST['submit']==$pm->translate(3)) - $o=$pm->ProcessUploads(); - else - $o.= $pm->renderUploadForm(); - - $vars['content'] = $o; - $vars['slogan'] = $pm->translate(2); + if((UPLOAD_FORM_LOCATION && $url==UPLOAD_FORM_LOCATION) || (!UPLOAD_FORM_LOCATION && $url='/')) + { + if($_POST['submit']==$pm->translate(3)) + $o=$pm->ProcessUploads(); + else + $o.= $pm->renderUploadForm(); + + $vars['content'] = $o; + $vars['slogan'] = $pm->translate(2); + + } + if(!$vars && LOW_PROFILE) + { + header('HTTP/1.0 404 Not Found'); + exit(); + } + else if(!$vars) + { + $vars['content'] = $pm->translate(12); + $vars['slogan'] = $pm->translate(2); + } + render($vars); } else diff --git a/inc/example.config.inc.php b/inc/example.config.inc.php index b0dc67a..a1cc7c7 100644 --- a/inc/example.config.inc.php +++ b/inc/example.config.inc.php @@ -1,5 +1,16 @@