From e651ba44c055dd9003bf2c9115f96e4b5f70c658 Mon Sep 17 00:00:00 2001 From: Harvie Date: Fri, 24 Dec 2010 03:44:58 +0100 Subject: [PATCH] Moved all transport code to transports.inc --- wwwroot/inc/nodes.inc | 1 + .../smarty/node_methodz/function.get_threaded_children.php | 2 +- wwwroot/inc/transports.inc | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) 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'])); +} -- 2.30.2