From 9cd69d5ea06deae80e2972e520c173a75563ccff Mon Sep 17 00:00:00 2001 From: Harvie Date: Mon, 29 Nov 2010 04:03:51 +0100 Subject: [PATCH] Adding base36 id to children listing... --- wwwroot/inc/base36.inc | 6 ++++++ wwwroot/inc/nodes.inc | 13 ++++++------- .../smarty/node_methodz/function.get_children.php | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 wwwroot/inc/base36.inc diff --git a/wwwroot/inc/base36.inc b/wwwroot/inc/base36.inc new file mode 100644 index 0000000..257d42c --- /dev/null +++ b/wwwroot/inc/base36.inc @@ -0,0 +1,6 @@ +getRecord(); - $node['node_kid']=base_convert($node['node_id'],10,36); + $node=addBase36id($result->getRecord()); $node['node_vector']=trim($node['node_vector'],"z"); $ancestors=str_split($node['node_vector'],VECTOR_CHARS); foreach ($ancestors as $ancestor) { @@ -234,7 +233,7 @@ where $table_name.node_id='$node_handle'"; $result=$db->query($q); while ($result->next()){ - $record[]=$result->getRecord(); + $record[]=addBase36id($result->getRecord()); } return $record; @@ -253,7 +252,7 @@ node_parent='$node_handle' order by node_created $orderby LIMIT $offset,$limit"; $result=$db->query($q); while ($result->next()) { - $array[]=$result->getRecord(); + $array[]=addBase36id($result->getRecord()); } return $array; @@ -270,7 +269,7 @@ node_parent='$node_handle' order by node_created $orderby LIMIT $offset,$limit"; $result=$db->query($q); while ($result->next()) { - $children_array[]=$result->getRecord(); + $children_array[]=addBase36id($result->getRecord()); } return $children_array; diff --git a/wwwroot/inc/smarty/node_methodz/function.get_children.php b/wwwroot/inc/smarty/node_methodz/function.get_children.php index 7572678..9852318 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_children.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_children.php @@ -1,5 +1,7 @@ query($q); while ($set->next()) { - $get_children_array[]=$set->getRecord(); + $get_children_array[]=addBase36id($set->getRecord()); } $smarty->assign('get_children',$get_children_array); -- 2.30.2