nodes merge
[mirrors/Kyberia-bloodline.git] / wwwroot / nodes.php
index 5c92694c3cc983c77c3aed9be46cc66452b07aa1..29b6478b5c04359149d70c7c5b7824607914d5a5 100644 (file)
@@ -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])) {
@@ -130,14 +137,12 @@ if (isset($_SESSION['cube_vector']) && ($_SESSION['cube_vector'])) {
 @include_once(INCLUDE_DIR.'mail_rss.inc'); //haluz...
 
 //checking permissions
-function _checkPermissions()
-{
-       global $permissions, $node;
-       require(INCLUDE_DIR.'permissions.inc');
-       $permissions=permissions::checkPermissions($node);
-       $permissions['h']=permissions::isHierarch($node);
+include_once(BACKEND_DIR.'/'.DB_TYPE.'/permissions.inc');
+$permissions=permissions::checkPerms($node);
+if ($_SESSION['debugging']) {
+       print_r($permissions);
 }
-_checkPermissions();
+
 
 
 // DO NOT MESS WITH THIS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This page took 0.117015 seconds and 4 git commands to generate.