aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-31 16:35:53 -0700
committerFriendika <info@friendika.com>2011-07-31 16:35:53 -0700
commit0c9f033505be5dbc2303d8758894e57c616c6534 (patch)
tree397cd776ab07e7033414153750b4bf469f4bcf47 /boot.php
parentb96b7d460878c0655e60a4f06cab5cbec103c30e (diff)
downloadvolse-hubzilla-0c9f033505be5dbc2303d8758894e57c616c6534.tar.gz
volse-hubzilla-0c9f033505be5dbc2303d8758894e57c616c6534.tar.bz2
volse-hubzilla-0c9f033505be5dbc2303d8758894e57c616c6534.zip
some api enhancements
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index cdde7652c..025f7ef87 100644
--- a/boot.php
+++ b/boot.php
@@ -1,6 +1,6 @@
<?php
-define ( 'FRIENDIKA_VERSION', '2.2.1057' );
+define ( 'FRIENDIKA_VERSION', '2.2.1058' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1076 );
@@ -2985,3 +2985,29 @@ function pkcs5_unpad($text)
if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return false;
return substr($text, 0, -1 * $pad);
}
+
+
+if(! function_exists('load_contact_links')) {
+function load_contact_links($uid) {
+
+ $a = get_app();
+
+ $ret = array();
+
+ if(! $uid || x($a->contacts,'empty'))
+ return;
+
+ $r = q("SELECT `id`,`network`,`url`,`thumb` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 ",
+ intval($uid)
+ );
+ if(count($r)) {
+ foreach($r as $rr){
+ $url = normalise_link($rr['url']);
+ $ret[$url] = $rr;
+ }
+ }
+ else
+ $ret['empty'] = true;
+ $a->contacts = $ret;
+ return;
+}}