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