From de9b50394c5b7965240d46f30054fd619e02b40f Mon Sep 17 00:00:00 2001 From: niekt0 Date: Sun, 27 Mar 2011 23:02:39 +0200 Subject: [PATCH] set_synapse update --- wwwroot/backend/mysql/backend.inc | 7 +++++-- wwwroot/inc/eventz/set_synapse_weight.inc | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) 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 @@