set_synapse_weight update
authorniekt0 <niekt0@kyberia.cz>
Wed, 23 Mar 2011 00:31:10 +0000 (01:31 +0100)
committerniekt0 <niekt0@kyberia.cz>
Wed, 23 Mar 2011 00:31:10 +0000 (01:31 +0100)
wwwroot/backend/mysql/backend.inc
wwwroot/inc/eventz/set_synapse_weight.inc [new file with mode: 0644]

index bea0e50cba6eaa46afeb9aaea646b4fcd21c6915..dd0c4f7cf82b6512973aa03e88a741dca6029364 100644 (file)
@@ -345,7 +345,7 @@ function getKNeurons($user_id,$interval) {
 
 // XXX TODO
 
-function setSynapseWeight($synapse_weightl) {
+function setSynapse($src,$dst,$weight) {
        global $db,$node,$error,$error_messages;
 
        // XXX security fix
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.189901 seconds and 4 git commands to generate.