diff --git a/phpgwapi/inc/class.db_mysql.inc.php b/phpgwapi/inc/class.db_mysql.inc.php index 15706d096d..768aca82d9 100644 --- a/phpgwapi/inc/class.db_mysql.inc.php +++ b/phpgwapi/inc/class.db_mysql.inc.php @@ -125,6 +125,14 @@ } } + function db_addslashes($str) + { + if (!IsSet($str) || $str == '') + return ''; + + return addslashes($str); + } + function to_timestamp($epoch) { return date('Y-m-d H:i:s',$epoch); diff --git a/phpgwapi/inc/class.db_pgsql.inc.php b/phpgwapi/inc/class.db_pgsql.inc.php index 05dd529106..763a239ddd 100644 --- a/phpgwapi/inc/class.db_pgsql.inc.php +++ b/phpgwapi/inc/class.db_pgsql.inc.php @@ -164,6 +164,14 @@ return @pg_close($this->Link_ID); } + function db_addslashes($str) + { + if (!IsSet($str) || $str == '') + return ''; + + return addslashes($str); + } + /* I added the line and file section so we can have better error reporting. (jengo) */ function query($Query_String, $line = '', $file = '') {