diff options
author | Friendika <info@friendika.com> | 2011-03-06 19:24:01 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-03-06 19:24:01 -0800 |
commit | 7f1f18675cb545ff92f9a2dedf83ce9a8f0964b2 (patch) | |
tree | de0b15ae96a314d164e6fd03f712dbb1c73517b4 /boot.php | |
parent | fecef140d5181348e1f46cf8405f13bb05401b3e (diff) | |
download | volse-hubzilla-7f1f18675cb545ff92f9a2dedf83ce9a8f0964b2.tar.gz volse-hubzilla-7f1f18675cb545ff92f9a2dedf83ce9a8f0964b2.tar.bz2 volse-hubzilla-7f1f18675cb545ff92f9a2dedf83ce9a8f0964b2.zip |
sparkle links for friends-of-friends, bug #13
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -2591,3 +2591,29 @@ function unamp($s) { return str_replace('&', '&', $s); }} +if(! function_exists('extract_item_authors')) { +function extract_item_authors($arr,$uid) { + + if((! $uid) || (! is_array($arr)) || (! count($arr))) + return array(); + $urls = array(); + foreach($arr as $rr) { + if(! in_array("'" . dbesc($rr['author-link']) . "'",$urls)) + $urls[] = "'" . dbesc($rr['author-link']) . "'"; + } + + // pre-quoted, don't put quotes on %s + if(count($urls)) { + $r = q("SELECT `id`,`url` FROM `contact` WHERE `uid` = %d AND `url` IN ( %s ) AND `network` = 'dfrn' AND `self` = 0 AND `blocked` = 0 ", + intval($uid), + implode(',',$urls) + ); + if(count($r)) { + $ret = array(); + foreach($r as $rr) + $ret[$rr['url']] = $rr['id']; + return $ret; + } + } + return array(); +}}
\ No newline at end of file |