First draft of set_synapse_weight
authorniekt0 <niekt0@kyberia.cz>
Thu, 17 Mar 2011 00:06:25 +0000 (01:06 +0100)
committerniekt0 <niekt0@kyberia.cz>
Thu, 17 Mar 2011 00:06:25 +0000 (01:06 +0100)
wwwroot/backend/mysql/backend.inc
wwwroot/inc/eventz/add.inc

index d65fc9435974553856715eb24066eee25536d861..bea0e50cba6eaa46afeb9aaea646b4fcd21c6915 100644 (file)
@@ -341,4 +341,22 @@ function getKNeurons($user_id,$interval) {
        return $k_array;
 }
 
+// Set synapse weight,
+
+// XXX TODO
+
+function setSynapseWeight($synapse_weightl) {
+       global $db,$node,$error,$error_messages;
+
+       // XXX security fix
+//     $q="update neurons set synapse_weight='$synapse_weight' where dst = '$dst' and src = '$src'";
+//     $q="insert into neurons values('$synapse_weight','$dst','$src',NULL,'synapse',XXX,now(),XXX,$src)";
+
+//     $set=$db->query($q);
+
+       return true;
+}
+
+
+
 }
index b18a2ca302c744f6736bda613386f1d0a08b8181..7bd3f9a0727c9611a7ee31da13b123129ba23a0b 100644 (file)
@@ -1,12 +1,15 @@
 <?php
 //funkcie na pridanie Re: alebo Re[x]: do nazvu (by Maniax)
-function title_reply_callback($_matches) {return ($_matches[1].($_matches[2] + 1).$_matches[3]);}
+function title_reply_callback($_matches) {
+       return ($_matches[1].($_matches[2] + 1).$_matches[3]);
+}
+
 function title_reply($_in) {
-if (preg_match('/^Re[:\[]/', $_in)) {
-if (preg_match('/^Re\[/', $_in))
-return (preg_replace_callback('/^(Re\[)(\d*)(\].*)$/', 'title_reply_callback', $_in));
-else return (preg_replace('/^(Re)(:.*)$/', '\1[2]\2', $_in));
-} else return ('Re: '.$_in);
+       if (preg_match('/^Re[:\[]/', $_in)) {
+               if (preg_match('/^Re\[/', $_in))
+                       return (preg_replace_callback('/^(Re\[)(\d*)(\].*)$/', 'title_reply_callback', $_in));
+               else return (preg_replace('/^(Re)(:.*)$/', '\1[2]\2', $_in));
+       } else return ('Re: '.$_in);
 }
 
 //Pridanie prispevku
@@ -115,5 +118,6 @@ function add() {
     $params['external_link']=$external_link;
     nodes::addNode($params);
     return true;
-    }
-    ?>
+}
+
+?>
This page took 0.171239 seconds and 4 git commands to generate.