diff options
author | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
---|---|---|
committer | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
commit | 25c674b73a5ec39a9826906aed3e35e77d72e392 (patch) | |
tree | dc17e0d8f5dc899ccfa9e0239fe7623c43a95d49 /boot.php | |
parent | 07ebc15612807512422ba84060914c5c4c853102 (diff) | |
parent | c248b28f922603ec135fea903a9ec3f0ef63c935 (diff) | |
download | volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.gz volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.bz2 volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.zip |
Merge remote branch 'mike/master'
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 37 |
1 files changed, 35 insertions, 2 deletions
@@ -3,7 +3,7 @@ set_time_limit(0); define ( 'BUILD_ID', 1039 ); -define ( 'FRIENDIKA_VERSION', '2.10.0908' ); +define ( 'FRIENDIKA_VERSION', '2.10.0909' ); define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'EOL', "<br />\r\n" ); @@ -40,6 +40,8 @@ define ( 'REGISTER_OPEN', 2 ); /** * relationship types + * When used in contact records, this indicates that 'uid' has + * this relationship with contact['name'] */ define ( 'REL_VIP', 1); @@ -2417,10 +2419,15 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item) { + return prepare_text($item['body']); +}} + +if(! function_exists('prepare_text')) { +function prepare_text($text) { require_once('include/bbcode.php'); - $s = smilies(bbcode($item['body'])); + $s = smilies(bbcode($text)); return $s; }} @@ -2584,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 |