X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fnodes.php;h=f343695c4182986727aa797cf2a3b6e7a8c8e0ad;hb=4c113a6b8204cb0c446d0d7f1272f8995fd78378;hp=0c3802391a7203cac09aa775a22646d43a61c2c6;hpb=5996a28e19d37044d1b74b104f3a9b1c2d277008;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index 0c38023..f343695 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -45,6 +45,13 @@ if (preg_match('/id\/([0-9]+)(?:\/([0-9]+)\/?)?/',$_SERVER['PATH_INFO'],$match)) if (!empty($match[2])) { $_GET['template_id']=$match[2]; } + //Base36 fascism redirect + 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):'') + ); + die("Die!!! All Fascists Are Bastards...\n"); + } } elseif (preg_match('/k\/([a-z0-9]{1,7})(?:\/([a-z0-9]{1,7}))?/',$_SERVER['PATH_INFO'],$match)) { $_GET['node_id']=base_convert($match[1], 36, 10); if (!empty($match[2])) { @@ -61,7 +68,7 @@ if (!empty($_GET['template_id'])) { } error_reporting(1); -$_SESSION['debugging']=0; +//$_SESSION['debugging']=0; //unset($_SESSION['debugging']); //Well... we should make some event //or JavaScript page to turning this on/off...