From: Harvie Date: Fri, 24 Dec 2010 02:44:58 +0000 (+0100) Subject: Moved all transport code to transports.inc X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=e651ba44c055dd9003bf2c9115f96e4b5f70c658;p=mirrors%2FKyberia-bloodline.git Moved all transport code to transports.inc --- diff --git a/wwwroot/inc/nodes.inc b/wwwroot/inc/nodes.inc index 175f9fd..34f76d1 100644 --- a/wwwroot/inc/nodes.inc +++ b/wwwroot/inc/nodes.inc @@ -204,6 +204,7 @@ where $table_name.node_id='$node_handle'"; $node['ancestors'][]=array("name"=>"","link"=>ltrim($ancestor,"0")); } } + transport_process_node($node); return $node; } 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 15e46c2..802d1ce 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_threaded_children.php @@ -63,7 +63,7 @@ else $security = ""; while ($result->next()) { $child = $result->getRecord(); - if($child['external_link']=='transport') $child = array_merge($child, transport_translate($child['node_content'])); + transport_process_node($child); if($child['synapse_creator']!='') $child['node_status']='linked'; $get_children_array[]=$child; diff --git a/wwwroot/inc/transports.inc b/wwwroot/inc/transports.inc index a5dbbc3..998a4df 100644 --- a/wwwroot/inc/transports.inc +++ b/wwwroot/inc/transports.inc @@ -20,3 +20,7 @@ function transport_translate($transport_handle) { return $node; } + +function transport_process_node(&$node) { + if($node['external_link']=='transport') $node = array_merge($node, transport_translate($node['node_content'])); +}