diff --git a/includes/config.template.php b/includes/config.template.php index d4bbe5c..f369559 100644 --- a/includes/config.template.php +++ b/includes/config.template.php @@ -3,10 +3,6 @@ define("CONFIG_SITE_NAME", "Uguu"); //Site root URL define("CONFIG_ROOT_URL", "http://path.to.uguu"); -//Enable this if you use a subdomain for serving uploaded files -define("CONFIG_SUBUPLOAD_URL_ENABLED", "false"); -//Only define this if the above is set to true -define("CONFIG_SUBUPLOAD_URL", "http://a.uguu.se"); //Path to uploaded files define("CONFIG_FILES_PATH", "/path/to/uguu/public/files/"); //Path to Uguu's files diff --git a/includes/core.php b/includes/core.php index 2321a2e..87a2d78 100644 --- a/includes/core.php +++ b/includes/core.php @@ -45,12 +45,7 @@ function save_file ($file, $name, $arg, $type){ move_uploaded_file($file,CONFIG_FILES_PATH.$file_name); //Check if html or plain text should be returned if($type==='tool'){ - //Return url+filename to the user (plain text) - if(CONFIG_SUBUPLOAD_URL_ENABLED == "true"){ - echo CONFIG_SUBUPLOAD_URL.'/'.urlencode($file_name); - }else{ - echo CONFIG_ROOT_URL.'/files/'.urlencode($file_name); - } + echo CONFIG_ROOT_URL.'/'.urlencode($file_name); exit(0); }elseif($type==='normal'){ //Return url+filename to the user (HTML) diff --git a/upload-done.php b/upload-done.php index 4b1504c..12027db 100644 --- a/upload-done.php +++ b/upload-done.php @@ -7,11 +7,7 @@ $tpl = new RainTPL; $title = "Temp File Hosting"; $tpl->assign("title", $title); $tpl->draw("header"); -if(CONFIG_SUBUPLOAD_URL_ENABLED == 'true'){ - $tpl->assign("url_filename", CONFIG_SUBUPLOAD_URL.'/'.$n); -}else{ - $tpl->assign("url_filename", CONFIG_ROOT_URL.'/'.$n); -} +$tpl->assign("url_filename", CONFIG_ROOT_URL.'/'.$n); $tpl->assign("retention_time", CONFIG_MAX_RETENTION_TEXT); $tpl->draw("upload-done"); $tpl->draw("footer");