aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-18 00:04:38 -0700
committerfriendica <info@friendica.com>2013-08-18 00:04:38 -0700
commit9fb2a87c9a55be8c0b8bffc7aa438dae5acc7390 (patch)
treee5cdccf37dfe985a0352f0cbca70cd20fcb24b9e /include
parent353ccaac05fa73b7cdca4d5cc4ed7cc789a220b8 (diff)
downloadvolse-hubzilla-9fb2a87c9a55be8c0b8bffc7aa438dae5acc7390.tar.gz
volse-hubzilla-9fb2a87c9a55be8c0b8bffc7aa438dae5acc7390.tar.bz2
volse-hubzilla-9fb2a87c9a55be8c0b8bffc7aa438dae5acc7390.zip
Another try at issue #61 and #62 - an earlier fix was partially working but the issue persisted - this extends it a bit.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/items.php b/include/items.php
index df49ba5c7..5137a8b31 100755
--- a/include/items.php
+++ b/include/items.php
@@ -773,14 +773,19 @@ function decode_tags($t) {
function activity_sanitise($arr) {
if($arr) {
- $ret = array();
- foreach($arr as $k => $x) {
- if(is_array($x))
- $ret[$k] = activity_sanitise($x);
- else
- $ret[$k] = htmlentities($x, ENT_COMPAT,'UTF-8',false);
+ if(is_array($arr)) {
+ $ret = array();
+ foreach($arr as $k => $x) {
+ if(is_array($x))
+ $ret[$k] = activity_sanitise($x);
+ else
+ $ret[$k] = htmlentities($x, ENT_COMPAT,'UTF-8',false);
+ }
+ return $ret;
+ }
+ else {
+ return htmlentities($arr, ENT_COMPAT,'UTF-8', false);
}
- return $ret;
}
return '';
}
@@ -1572,10 +1577,10 @@ function item_store($arr,$allow_exec = false) {
unset($arr['term']);
}
- dbesc_array($arr);
-
logger('item_store: ' . print_r($arr,true), LOGGER_DATA);
+ dbesc_array($arr);
+
$r = dbq("INSERT INTO `item` (`"
. implode("`, `", array_keys($arr))
. "`) VALUES ('"