From c8877bf3b0660d3715b55dc014a496a458b0ebd5 Mon Sep 17 00:00:00 2001 From: byt3farm Date: Wed, 22 Mar 2017 11:23:09 +0800 Subject: [PATCH] mysql functions replaced by database abstraction class methods --- libs/default.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/default.class.php b/libs/default.class.php index 780a9c1..c9f7816 100755 --- a/libs/default.class.php +++ b/libs/default.class.php @@ -145,7 +145,7 @@ function addPaste($userid,$title,$lang,$paste,$expire,$exposure) { '".$this->makeId()."', '".$db->escape($title)."', '".$db->escape($lang)."', - '".htmlspecialchars(mysql_escape_string($paste))."', + '".htmlspecialchars($db->escpae($paste))."', '$date', '".$db->escape($expire)."', '".$db->escape($exposure)."' @@ -164,7 +164,7 @@ function editPaste($uniqueid,$title,$date,$lang,$paste){ title='".mysql_real_escape_string($title)."', lang='$lang', date='$date', - paste='".htmlspecialchars(mysql_escape_string($paste))."' + paste='".htmlspecialchars($db->escpae($paste))."' WHERE uniqueid = '$uniqueid'"; $db->query($query); @@ -741,7 +741,8 @@ function generateToken(){ } ### function sqlesc($x) { - return '\''.mysql_real_escape_string($x).'\''; + global $db; + return '\''.$db->escpae($x).'\''; } ### function logout($redirect=true){