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:
f046f78
)
WELCOME_NODE, novy URL handler /search/
author
Harvie
<tomas@mudrunka.cz>
Tue, 5 Apr 2011 21:12:43 +0000
(23:12 +0200)
committer
Harvie
<tomas@mudrunka.cz>
Tue, 5 Apr 2011 21:12:43 +0000
(23:12 +0200)
wwwroot/nodes.php
patch
|
blob
|
blame
|
history
diff --git
a/wwwroot/nodes.php
b/wwwroot/nodes.php
index 2bf47a3fdd72f32d2a42202dfb2bb883d3777b1f..8b9edaade48e867165231eb5464b472d3aa8ee6a 100644
(file)
--- a/
wwwroot/nodes.php
+++ b/
wwwroot/nodes.php
@@
-63,11
+63,15
@@
switch(true) {
case preg_match('/name\/(.*?)\/?$/',$_SERVER['PATH_INFO'],$match):
$_GET['node_id'] = nodes::getNodeIdByName($match[1]);
break;
case preg_match('/name\/(.*?)\/?$/',$_SERVER['PATH_INFO'],$match):
$_GET['node_id'] = nodes::getNodeIdByName($match[1]);
break;
+ case preg_match('/search\/(.*?)\/?$/',$_SERVER['PATH_INFO'],$match):
+ //$query = nodes::getNodeIdByName($match[1]);
+ //XXX TODO: Predat searchi az bude fungovat
+ break;
case preg_match('/\/(.+)\/?$/',$_SERVER['PATH_INFO'],$match):
$_GET['node_id'] = nodes::getNodeIdByName($match[1]);
break;
default:
case preg_match('/\/(.+)\/?$/',$_SERVER['PATH_INFO'],$match):
$_GET['node_id'] = nodes::getNodeIdByName($match[1]);
break;
default:
- $_GET['node_id']=1;
+ $_GET['node_id']=1;
//WELCOME_NODE
break;
}
break;
}
@@
-93,15
+97,9
@@
if ($_SESSION['debugging']) {
print_r($_SESSION);
}
print_r($_SESSION);
}
-
-
-//initializing node
-if (!is_numeric($_GET['node_id'])) {
- $_GET['node_id']=WELCOME_NODE; //Tohle uz je v PHP rewritech!!!!
-}
-
require_once(INCLUDE_DIR.'logout_idle.inc'); //Logout when idle
require_once(INCLUDE_DIR.'logout_idle.inc'); //Logout when idle
+//initializing node
$node = nodes::getNodeById($_GET['node_id'],(isset($_SESSION['user_id']))?$_SESSION['user_id']:'');
//XXX Paths are wrong (!)
$node = nodes::getNodeById($_GET['node_id'],(isset($_SESSION['user_id']))?$_SESSION['user_id']:'');
//XXX Paths are wrong (!)
This page took
0.121318 seconds
and
4
git commands to generate.