Fixed: Undefined index: template_id in nodes.php
authorHarvie <tomas@mudrunka.cz>
Sun, 30 Jan 2011 13:49:12 +0000 (14:49 +0100)
committerHarvie <tomas@mudrunka.cz>
Sun, 30 Jan 2011 13:49:12 +0000 (14:49 +0100)
wwwroot/nodes.php

index aafb3d4b7d086a5f41e1065a04fdc063b7a0fc17..f343695c4182986727aa797cf2a3b6e7a8c8e0ad 100644 (file)
@@ -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):'')
                );
This page took 0.157953 seconds and 4 git commands to generate.