Migration to PDO database abstraction layer
[mirrors/Kyberia-bloodline.git] / wwwroot / backend / mysql / backend.inc
index 3c6da90495ac84ad5161203abd618af515b62319..daba57b314d00aced86904a748ebd0d60c94d845 100644 (file)
@@ -181,9 +181,9 @@ function getUserByLogin($login) {
 static function getNodeIdByName($name, $external_link=false) {
        global $db;
 
-       $qh = sprintf('select node_id from nodes where node_name = "%s"', mysql_real_escape_string($name));
+       $qh = sprintf('select node_id from nodes where node_name = "%s"', db_escape_string($name));
        if ($external_link)
-               $qh .= sprintf(' and external_link="%s"', mysql_real_escape_string($external_link));
+               $qh .= sprintf(' and external_link="%s"', db_escape_string($external_link));
 
        $set = $db->query($qh);
        $set->next();
@@ -405,7 +405,7 @@ function getSynapseWeight($user_id,$node_id){
                $user_id." and dst = ".$node_id." and link='synapse'");
 
        $set->next();
-       $synapes_weight=$set->getString('synapse_weight');
+       $synapse_weight=$set->getString('synapse_weight');
 
        if (! ($synapse_weight) ) { $synapse_weight = 1;}       
 
This page took 0.128898 seconds and 4 git commands to generate.