aboutsummaryrefslogtreecommitdiffstats
path: root/mod/poco.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-15 22:34:01 -0800
committerfriendica <info@friendica.com>2013-02-15 22:34:01 -0800
commite754845c80e3bf038d808c6502cf3dec5880e1f6 (patch)
tree818e54f307e1de5ded24613da18099ff7d40406d /mod/poco.php
parentace1104d08715ffb4d7ada722adeb53206236a50 (diff)
downloadvolse-hubzilla-e754845c80e3bf038d808c6502cf3dec5880e1f6.tar.gz
volse-hubzilla-e754845c80e3bf038d808c6502cf3dec5880e1f6.tar.bz2
volse-hubzilla-e754845c80e3bf038d808c6502cf3dec5880e1f6.zip
add rating support to poco
Diffstat (limited to 'mod/poco.php')
-rw-r--r--mod/poco.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/poco.php b/mod/poco.php
index 3ebc5ece4..a5808b7db 100644
--- a/mod/poco.php
+++ b/mod/poco.php
@@ -126,10 +126,8 @@ function poco_init(&$a) {
'displayName' => false,
'urls' => false,
'preferredUsername' => false,
- 'photos' => false
-
-
-
+ 'photos' => false,
+ 'rating' => false
);
if((! x($_GET,'fields')) || ($_GET['fields'] === '@all'))
@@ -165,6 +163,12 @@ function poco_init(&$a) {
$entry['preferredUsername'] = substr($rr['xchan_addr'],0,strpos($rr['xchan_addr'],'@'));
if($fields_ret['photos'])
$entry['photos'] = array(array('value' => $rr['xchan_photo_l'], 'mimetype' => $rr['xchan_photo_mimetype'], 'type' => 'profile'));
+ if($fields_ret['rating']) {
+ $entry['rating'] = ((array_key_exists('abook_rating',$rr)) ? array(intval($rr['abook_rating'])) : 0);
+ // maybe this should be a composite calculated rating in $system_mode
+ if($system_mode)
+ $entry['rating'] = 0;
+ }
$ret['entry'][] = $entry;
}
}