set_synapse_weight update
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / set_synapse_weight.inc
diff --git a/wwwroot/inc/eventz/set_synapse_weight.inc b/wwwroot/inc/eventz/set_synapse_weight.inc
new file mode 100644 (file)
index 0000000..80dabe6
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+// Setting weight of the synapse.
+// Synapse is connection betwenn current node and logged user
+
+function set_synapse_weight() {
+
+       global $db,$error,$node,$permissions,$types;
+
+       if (!empty($_POST['synapse_weight'])) {
+               $params['synapse_weight']=$_POST['synapse_weight'];
+               $params['from']=$_SESSION['user_id'];
+               $params['to']=$node['node_id'];
+
+               nodes::setSynapse($params);
+               return true;
+       }
+
+       return false;
+}
+
+?>
This page took 0.096595 seconds and 4 git commands to generate.