- $xs->element('a', array('href' => $profile->profileurl),
- $profile->nickname);
- $xs->text(": ");
- if (!empty($notice->rendered)) {
- $xs->raw($notice->rendered);
- } else {
- $xs->raw(common_render_content($notice->content, $notice));
+ $xs->element('a', array('href' => $profile->profileurl), $profile->nickname);
+ try {
+ $parent = $notice->getParent();
+ $orig_profile = $parent->getProfile();
+ $orig_profurl = $orig_profile->getUrl();
+ $xs->text(" => ");
+ $xs->element('a', array('href' => $orig_profurl), $orig_profile->nickname);
+ $xs->text(": ");
+ } catch (InvalidUrlException $e) {
+ $xs->text(sprintf(' => %s', $orig_profile->nickname));
+ } catch (NoParentNoticeException $e) {
+ $xs->text(": ");
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted.
+ $xs->text(": ");