From: Harvie Date: Fri, 24 Dec 2010 02:10:10 +0000 (+0100) Subject: Transports are now implemented using external_link... X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=1cde06e492d1a9a29e6d6de512c10560895992fd;p=mirrors%2FKyberia-bloodline.git Transports are now implemented using external_link... --- diff --git a/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php b/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php index c1b2f31..c39e537 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php @@ -50,11 +50,11 @@ else $security = ""; } if ($params['link']=='yes') $q.="("; - $q.="select nodes.node_id,node_name,node_external_access,external_link,node_parent,node_system_access,node_children_count,node_creator,node_created,lastchild_created,k,node_views,node_descendant_count,lastdescendant_created,template_id,node_updated,length(node_vector) as depth,users.login,node_vector, node_content,'' as synapse_creator,'' as transport from nodes left join users on users.user_id=nodes.node_creator where $sql_time node_vector like '".$node['node_vector']."%' $sql_type and node_id != '".$node['node_id']."' $security order by $orderby LIMIT $offset,$limit"; + $q.="select nodes.node_id,node_name,node_external_access,external_link,node_parent,node_system_access,node_children_count,node_creator,node_created,lastchild_created,k,node_views,node_descendant_count,lastdescendant_created,template_id,node_updated,length(node_vector) as depth,users.login,node_vector, node_content,'' as synapse_creator from nodes left join users on users.user_id=nodes.node_creator where $sql_time node_vector like '".$node['node_vector']."%' $sql_type and node_id != '".$node['node_id']."' $security order by $orderby LIMIT $offset,$limit"; if ($params['link']=='yes') { $q.=" ) UNION (select nodes.node_id,node_name,node_external_access,external_link,node_parent,node_system_access,node_children_count,node_creator,node_created,lastchild_created,k,node_views,node_descendant_count,lastdescendant_created,template_id,node_updated,length(dst_vector) as depth, - users.login,dst_vector as node_vector,node_content,synapse_creator,transport from neurons left join nodes on neurons.src=nodes.node_id left join users on users.user_id=nodes.node_creator where $sql_time dst_vector like '".$node['node_vector']."%' $sql_synapse $sql_type and node_id != '".$node['node_id']."' order by $orderby LIMIT $offset,$limit)"; + users.login,dst_vector as node_vector,node_content,synapse_creator from neurons left join nodes on neurons.src=nodes.node_id left join users on users.user_id=nodes.node_creator where $sql_time dst_vector like '".$node['node_vector']."%' $sql_synapse $sql_type and node_id != '".$node['node_id']."' order by $orderby LIMIT $offset,$limit)"; } if ($params['link']=='yes') $q.=" order by $orderby LIMIT $limit"; @@ -63,15 +63,25 @@ else $security = ""; while ($result->next()) { $child = $result->getRecord(); +if($child['external_link']=='transport') { + $child['node_status']='linked'; + $transport = preg_split('/[:@]/',trim($child['node_content'])); + require_once(INCLUDE_DIR.'transports.inc'); + transport_load($transport[0]); + global $transports; + $child['node_name']=$transport[0].':'.$transport[1].'@defaulthost'; + $child['node_content']=$transport[0].':'.$transport[1].'@defaulthost:
'.$transports[$transport[0]]['get_node_content']($transport[1]); +} + if($child['synapse_creator']!='') { $child['node_status']='linked'; - if($child['transport']!='') { +/* if($child['transport']!='') { require_once(INCLUDE_DIR.'transports.inc'); transport_load($child['transport']); global $transports; $child['node_content']=$child['transport'].':'.$child['node_id'].'@default:\n
'.$transports[$child['transport']]['get_node_content']($child['node_id']); $child['node_name']=$child['transport'].':'.$child['node_id']; - } + } */ } $get_children_array[]=$child;