From: Harvie Date: Mon, 20 Dec 2010 01:08:59 +0000 (+0100) Subject: Now addNode can set custom access policies - I've needed this for loading Dewey Decim... X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=cf631f1e34b3f155dc0ed883a39b0afbb38e3111;p=mirrors%2FKyberia-bloodline.git Now addNode can set custom access policies - I've needed this for loading Dewey Decimal System to DB --- diff --git a/wwwroot/inc/nodes.inc b/wwwroot/inc/nodes.inc index e328250..008a527 100644 --- a/wwwroot/inc/nodes.inc +++ b/wwwroot/inc/nodes.inc @@ -61,10 +61,13 @@ function addNode($params) { $template_id=$params['template_id']; if (!is_numeric($template_id)) $template_id=DEFAULT_TEMPLATE_ID; + if(!isset($params['node_system_access'])) $params['node_system_access'] = $node['node_system_access']; + if(!isset($params['node_external_access'])) $params['node_external_access'] = $node['node_external_access']; + $q="insert into nodes set node_name='".$params['node_name']."', -node_external_access='".$node['node_external_access']."', -node_system_access='".$node['node_system_access']."', +node_external_access='".$params['node_external_access']."', +node_system_access='".$params['node_system_access']."', node_creator='".$params['node_creator']."', template_id='".$template_id."', external_link='".$external_link."',