From: Harvie Date: Mon, 29 Nov 2010 03:03:51 +0000 (+0100) Subject: Adding base36 id to children listing... X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=9cd69d5ea06deae80e2972e520c173a75563ccff;p=mirrors%2FKyberia-bloodline.git Adding base36 id to children listing... --- 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);