tagger_content(): handle case where $owner_nick is empty
This commit is contained in:
parent
02654c28f7
commit
1a87fcb5b3
|
@ -44,6 +44,8 @@ function tagger_content(App $a) {
|
|||
$item = $r[0];
|
||||
|
||||
$owner_uid = $item['uid'];
|
||||
$owner_nick = '';
|
||||
$blocktags = 0;
|
||||
|
||||
$r = q("select `nickname`,`blocktags` from user where uid = %d limit 1",
|
||||
intval($owner_uid)
|
||||
|
@ -71,8 +73,13 @@ function tagger_content(App $a) {
|
|||
$post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
|
||||
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
|
||||
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="'
|
||||
. System::baseUrl() . '/display/' . $owner_nick . '/' . $item['id'] . '" />' . "\n") ;
|
||||
if ($owner_nick) {
|
||||
$href = System::baseUrl() . '/display/' . $owner_nick . '/' . $item['id'];
|
||||
} else {
|
||||
$href = System::baseUrl() . '/display/' . $item['guid'];
|
||||
}
|
||||
|
||||
$link = xmlify('<link rel="alternate" type="text/html" href="'. $href . '" />' . "\n") ;
|
||||
|
||||
$body = xmlify($item['body']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user