}
}
-function db_escape_string($s, $strip_tags = true) {
+function db_escape_string($s, $strip_tags = true, $link = NULL) {
if ($strip_tags) $s = strip_tags($s);
if (DB_TYPE == "pgsql") {
- return pg_escape_string($s);
+ if ($link) {
+ return pg_escape_string($link, $s);
+ } else {
+ return pg_escape_string($s);
+ }
} else {
- return mysql_real_escape_string($s);
+ return mysql_real_escape_string($s, $link);
}
}
$expire = time() + $session_expire;
- $data = db_escape_string(base64_encode($data), $session_connection);
+ $data = db_escape_string(base64_encode($data), false, $session_connection);
if ($session_read) {
$query = "UPDATE ttrss_sessions SET data='$data',