k_neurons fix & small warnings removed
[mirrors/Kyberia-bloodline.git] / wwwroot / backend / mysql / backend.inc
index bdc85152631c56af2cebf295cff829752571a5da..87e1d2d744bd09297fafed0b8050e5eb81d66d78 100644 (file)
@@ -363,6 +363,11 @@ function setSynapse($params){
        $dst=$params['dst'];
        $weight=$params['weight'];
 
+       // weight could be only positive
+       if ( $weight < 0) {
+               return false;
+       }
+
        // if already exists
        $q="select count(src) from neurons where dst ='$dst' and src = '$src'";
        $set=$db->query($q);
This page took 0.163911 seconds and 4 git commands to generate.