2 /* This program is free software. It comes without any warranty, to
3 * the extent permitted by applicable law. You can redistribute it
4 * and/or modify it under the terms of the Do What The Fuck You Want
5 * To Public License, Version 2, as published by Sam Hocevar. See
6 * http://sam.zoy.org/wtfpl/COPYING for more details. */
8 function configure_external_access() {
9 global $db,$error,$node;
10 $node_id=$node['node_id'];
11 $user_id=$_SESSION['user_id'];
13 if ($node['node_permission']=='owner') {
14 $node_external_access=$_POST['node_external_access'];
15 if (empty($node_external_access)) $node_external_access='no';
17 if ($_POST['apply_on_vector']) {
18 $vector=$node['node_vector'];
20 $error=$error_messages['INCORRECT_VECTOR'];
23 $q="update nodes set node_external_access='$node_external_access' where node_vector like '$vector%' and node_creator='$user_id'";
28 $q="update nodes set node_external_access='$node_external_access' where node_id='$node_id'";