- $link = xmlify('<link rel="alternate" type="text/html" href="'
- . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $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") ;