GIT.Harvie.CZ
/
mirrors
/
Kyberia-bloodline.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a70b95
)
Base36 fascism - will redirect every GET request to /k/
author
Harvie
<tomas@mudrunka.cz>
Tue, 30 Nov 2010 08:00:27 +0000
(09:00 +0100)
committer
Harvie
<tomas@mudrunka.cz>
Tue, 30 Nov 2010 08:00:27 +0000
(09:00 +0100)
wwwroot/nodes.php
patch
|
blob
|
blame
|
history
diff --git
a/wwwroot/nodes.php
b/wwwroot/nodes.php
index 9022178b9f6bd2ee949ce966a76f97e255553c0e..2070296ebbfeee179b92d973b0772de60de20247 100644
(file)
--- a/
wwwroot/nodes.php
+++ b/
wwwroot/nodes.php
@@
-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];
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];
break;
default:
if($PATH_CHUNKS[1] != '') $_GET['node_name'] = $PATH_CHUNKS[1];
This page took
0.135184 seconds
and
4
git commands to generate.