--- /dev/null
+<?php
+
+function addBase36id($node) {
+ $node['node_kid']=base_convert($node['node_id'],10,36);
+ return $node;
+}
}
}
-class nodes {
-
+require_once(INCLUDE_DIR.'base36.inc');
+class nodes {
function addNode($params) {
global $db,$node,$error,$error_messages;
return false;
}
else {
- $node=$result->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) {
$result=$db->query($q);
while ($result->next()){
- $record[]=$result->getRecord();
+ $record[]=addBase36id($result->getRecord());
}
return $record;
$result=$db->query($q);
while ($result->next()) {
- $array[]=$result->getRecord();
+ $array[]=addBase36id($result->getRecord());
}
return $array;
$result=$db->query($q);
while ($result->next()) {
- $children_array[]=$result->getRecord();
+ $children_array[]=addBase36id($result->getRecord());
}
return $children_array;
<?php
+require_once(INCLUDE_DIR.'base36.inc');
+
function smarty_function_get_children($params,&$smarty) {
global $db,$node;
$set=$db->query($q);
while ($set->next()) {
- $get_children_array[]=$set->getRecord();
+ $get_children_array[]=addBase36id($set->getRecord());
}
$smarty->assign('get_children',$get_children_array);