diff options
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index ad0dd5373..976e647cb 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -12,7 +12,6 @@ function dirsearch_content(&$a) { $ret = array('success' => false); - // If you've got a public directory server, you probably shouldn't block public access $dirmode = intval(get_config('system','directory_mode')); @@ -206,6 +205,24 @@ function dirsearch_content(&$a) { ); } } + $r = q("select * from xlink where xlink_static = 1 and xlink_updated >= '%s' ", + dbesc($sync) + ); + if($r) { + $spkt['ratings'] = array(); + foreach($r as $rr) { + $spkt['ratings'][] = array( + 'type' => 'rating', + 'encoding' => 'zot', + 'channel' => $rr['xlink_xchan'], + '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 { |