more directory sync stuff

This commit is contained in:
friendica 2013-04-28 23:13:50 -07:00
parent 608d3c6069
commit 2895890cb8

View File

@ -61,6 +61,9 @@ function dirsearch_content(&$a) {
$limit = (($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 0);
$return_total = ((x($_REQUEST,'return_total')) ? intval($_REQUEST['return_total']) : 0);
$mtime = ((x($_REQUEST,'mtime')) ? datetime_convert('UTC','UTC',$_REQUEST['mtime']) : '');
// ok a separate tag table won't work.
// merge them into xprof
@ -86,8 +89,14 @@ function dirsearch_content(&$a) {
}
}
if($mtime) {
$qlimit = '';
$sql_extra .= " and xchan_hash in ( select ud_hash from updates where ud_date > '" . dbesc($mtime) . "' ) ";
}
$order = " ORDER BY `xchan_name` ASC ";
$r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d ) $order $qlimit ",
intval(XCHAN_FLAGS_HIDDEN)
);