fix xchan_query() for anon comments
This commit is contained in:
parent
5228462363
commit
04935f139d
@ -2748,7 +2748,7 @@ function anon_identity_init($reqvars) {
|
||||
|
||||
$photo = z_root() . '/' . get_default_profile_photo(300);
|
||||
$photos = import_xchan_photo($photo,$hash);
|
||||
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_guid = '%s' and xchan_hash = '%s' and xchan_network = 'unknown' ",
|
||||
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_guid = '%s' and xchan_hash = '%s' and xchan_network = 'anon' ",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
|
@ -2251,7 +2251,7 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) {
|
||||
$chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash
|
||||
where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_primary = 1");
|
||||
}
|
||||
$xchans = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$arr)) . ") and xchan_network in ('rss','unknown')");
|
||||
$xchans = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$arr)) . ") and xchan_network in ('rss','unknown', 'anon')");
|
||||
if(! $chans)
|
||||
$chans = $xchans;
|
||||
else
|
||||
|
Reference in New Issue
Block a user