query("select src from neurons where dst='$chosen_id' and link='hard'");
$kset->next();$src=$kset->getString('src');
// echo 'Debug:: Novy vektor putu';
// echo $new_vector.$src;
$chosen=nodes::getNodeById($chosen_id,$_SESSION['user_id']);
if (($chosen['node_creator']!=$_SESSION['user_id']) and
($chosen['node_permission']!='master') and !permissions::isHierarch($chosen)) {
global $error_messages;
$error=$error_messages['EVENT_PERMISSION_ERROR'];
return false;
}
$set=$db->query("select * from neurons where dst='$chosen_id' and link='hard'");
if ($set->getNumRows()>0){
$q="update neurons set dst_vector='$new_vector.$src' where dst='$chosen_id' and link='hard'";
$debug2=$db->update($q);
}
$db->query("start transaction");
$q="update nodes set node_parent='$new_parent_id',node_vector='".$new_vector."' where
node_id='$chosen_id'";
$debug1=$db->query($q);
$q="update nodes set
node_vector=replace(node_vector,'".$chosen['node_vector']."','$new_vector') where
node_vector like '".$chosen['node_vector']."%'";
$changed=$db->update($q);
$q="update nodes set node_children_count=node_children_count+1 where node_id='$new_parent_id'";
$db->update($q);
$db->query("commit");
// echo '
debug:: pocet putov v node::
';
//
// $set=$db->query("select * from neurons where dst='$chosen_id' and link='hard'");
// echo $set->getNumRows();
}
//echo "debug1::
";
//echo $debug1;echo "
";
//echo "changed::
";
//echo $changed;echo "
";
//echo "debug2::
";
//echo $debug2;echo "
";
return false;
}
?>