Base36 fascism - will redirect every GET request to /k/
authorHarvie <tomas@mudrunka.cz>
Tue, 30 Nov 2010 08:00:27 +0000 (09:00 +0100)
committerHarvie <tomas@mudrunka.cz>
Tue, 30 Nov 2010 08:00:27 +0000 (09:00 +0100)
wwwroot/nodes.php

index 9022178b9f6bd2ee949ce966a76f97e255553c0e..2070296ebbfeee179b92d973b0772de60de20247 100644 (file)
@@ -49,6 +49,15 @@ if($PATH_INFO != '') {
                case 'id':
                        if(isset($PATH_CHUNKS[2]) && $PATH_CHUNKS[2] != '') $_GET['node_id'] = $PATH_CHUNKS[2];
                        if(isset($PATH_CHUNKS[3]) && $PATH_CHUNKS[3] != '') $_GET['template_id'] = $PATH_CHUNKS[3];
+
+                       //Base36 fascism redirect
+                       if(!count($_POST)) {
+                               header('Location: /k/'.base_convert($_GET['node_id'], 10, 36).
+                                       (isset($_GET['template_id'])?'/'.base_convert($_GET['template_id'], 10, 36):'')
+                               );
+                               die("Base36 fascism...\n"); //If you want to be a fascist you have to die imediatelly...
+                       }
+
                        break;
                default:
                        if($PATH_CHUNKS[1] != '') $_GET['node_name'] = $PATH_CHUNKS[1];
This page took 0.141669 seconds and 4 git commands to generate.