From: niekt0 Date: Sun, 27 Mar 2011 21:02:39 +0000 (+0200) Subject: set_synapse update X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=de9b50394c5b7965240d46f30054fd619e02b40f;p=mirrors%2FKyberia-bloodline.git set_synapse update --- diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index ac554ed..a92deea 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -348,12 +348,15 @@ function getKNeurons($user_id,$interval) { // XXX TODO -function setSynapse($src,$dst,$weight) { +function setSynapse($params){ global $db,$node,$error,$error_messages; - if ((!is_numeric($src)) or (!is_numeric($dst)) or (!is_numeric($weight))) { + if ((!is_numeric($params['src'])) or (!is_numeric($params['dst'])) or (!is_numeric($params['weight']))) { return false; } + $src=$params['src']; + $dst=$params['dst']; + $weight=$params['weight']; // if already exists $q="select src from neurons where dst ='$dst' and src = '$src'"; diff --git a/wwwroot/inc/eventz/set_synapse_weight.inc b/wwwroot/inc/eventz/set_synapse_weight.inc index 80dabe6..32c37f5 100644 --- a/wwwroot/inc/eventz/set_synapse_weight.inc +++ b/wwwroot/inc/eventz/set_synapse_weight.inc @@ -1,16 +1,16 @@