diff options
author | redmatrix <git@macgirvin.com> | 2016-06-22 19:22:59 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-22 19:22:59 -0700 |
commit | cef77ce5bb296829576f5d7a515b56a8b18f99eb (patch) | |
tree | c30842a67f2fedcbdc5074b1f058cd756ccc56bb /include | |
parent | 1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d (diff) | |
download | volse-hubzilla-cef77ce5bb296829576f5d7a515b56a8b18f99eb.tar.gz volse-hubzilla-cef77ce5bb296829576f5d7a515b56a8b18f99eb.tar.bz2 volse-hubzilla-cef77ce5bb296829576f5d7a515b56a8b18f99eb.zip |
the xchan_query wasn't fully optimised as we were comparing quoted and unquoted strings when looking for duplicates
Diffstat (limited to 'include')
-rw-r--r-- | include/text.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php index 4f28c6dbc..12b6b1137 100644 --- a/include/text.php +++ b/include/text.php @@ -2089,9 +2089,9 @@ function xchan_query(&$items,$abook = true,$effective_uid = 0) { } foreach($items as $item) { - if($item['owner_xchan'] && (! in_array($item['owner_xchan'],$arr))) + if($item['owner_xchan'] && (! in_array("'" . dbesc($item['owner_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['owner_xchan']) . "'"; - if($item['author_xchan'] && (! in_array($item['author_xchan'],$arr))) + if($item['author_xchan'] && (! in_array("'" . dbesc($item['author_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['author_xchan']) . "'"; } } @@ -2124,9 +2124,9 @@ function xchan_mail_query(&$item) { $arr = array(); $chans = null; if($item) { - if($item['from_xchan'] && (! in_array($item['from_xchan'],$arr))) + if($item['from_xchan'] && (! in_array("'" . dbesc($item['from_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['from_xchan']) . "'"; - if($item['to_xchan'] && (! in_array($item['to_xchan'],$arr))) + if($item['to_xchan'] && (! in_array("'" . dbesc($item['to_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['to_xchan']) . "'"; } |