From: Harvie Date: Sun, 30 Jan 2011 13:49:12 +0000 (+0100) Subject: Fixed: Undefined index: template_id in nodes.php X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=bb882df824ba35ea1f659580eff0af6697d472f5;p=mirrors%2FKyberia-bloodline.git Fixed: Undefined index: template_id in nodes.php --- diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index aafb3d4..f343695 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -46,7 +46,7 @@ if (preg_match('/id\/([0-9]+)(?:\/([0-9]+)\/?)?/',$_SERVER['PATH_INFO'],$match)) $_GET['template_id']=$match[2]; } //Base36 fascism redirect - if($_GET['template_id'] != 'download' && !count($_POST)) { //Fix ugly download hack... + if(!count($_POST) && !(isset($_GET['template_id']) && $_GET['template_id'] == 'download')) { //Fix ugly download hack... header('Location: /k/'.base_convert($_GET['node_id'], 10, 36). (isset($_GET['template_id'])?'/'.base_convert($_GET['template_id'], 10, 36):'') );