aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-10 13:57:59 -0800
committerFriendika <info@friendika.com>2011-01-10 13:57:59 -0800
commitcb1832a7550c2527d0bd4856c7ab90622e7f3a74 (patch)
treed95d4fa6e467f053cea52fc068609e0326d4ae8f /include/dba.php
parentb2176538f4aea9096c50f738cca840024bf9c53e (diff)
downloadvolse-hubzilla-cb1832a7550c2527d0bd4856c7ab90622e7f3a74.tar.gz
volse-hubzilla-cb1832a7550c2527d0bd4856c7ab90622e7f3a74.tar.bz2
volse-hubzilla-cb1832a7550c2527d0bd4856c7ab90622e7f3a74.zip
fallback dbesc() when db is not there
Diffstat (limited to 'include/dba.php')
-rw-r--r--include/dba.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/dba.php b/include/dba.php
index ae3a4957b..98823df3a 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -114,7 +114,10 @@ function dbg($state) {
if(! function_exists('dbesc')) {
function dbesc($str) {
global $db;
- return($db->escape($str));
+ if($db)
+ return($db->escape($str));
+ else
+ return(str_replace("'","\\'",$str));
}}