aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-02 21:07:46 -0800
committerfriendica <info@friendica.com>2015-02-02 21:07:46 -0800
commit77379029f566fc759651fdaa01f5bfaf2ad9db28 (patch)
tree6cb979dd0039f3b442b942d651eb09f8dd10b467 /mod/dirsearch.php
parent1807db6cb0cc297aff32750b371a4e2e6539ad31 (diff)
downloadvolse-hubzilla-77379029f566fc759651fdaa01f5bfaf2ad9db28.tar.gz
volse-hubzilla-77379029f566fc759651fdaa01f5bfaf2ad9db28.tar.bz2
volse-hubzilla-77379029f566fc759651fdaa01f5bfaf2ad9db28.zip
add ratings to the directory sync arrays
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 52a3d02cf..0f4dde976 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -210,6 +210,23 @@ function dirsearch_content(&$a) {
);
}
}
+ $r = q("select * from xlink where xlink_static = 1 and xlink_updated >= '%s' ",
+ dbesc($sync)
+ );
+ if($r) {
+ $spkt['rating'] = array();
+ foreach($r as $rr) {
+ $spkt['rating'][] = array(
+ 'type' => 'rating',
+ 'encoding' => 'zot',
+ 'target' => $rr['xlink_link'],
+ 'rating' => intval($rr['xlink_rating']),
+ 'rating_text' => $rr['xlink_rating_text'],
+ 'signature' => $rr['xlink_sig'],
+ 'edited' => $rr['xlink_updated']
+ );
+ }
+ }
json_return_and_die($spkt);
}
else {