From eb9715992cee6d06e520cf8826b7fb0d70db5871 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 16 Jul 2008 11:25:11 -0400 Subject: utility function for getting a profile URI I added a utility function for getting a profile URI. At some point we need to push commonalities between Remote_profile and User into the Profile class; single-table inheritance. We do a lot of switching around for no good reason on users and profiles. darcs-hash:20080716152511-84dde-6f73d947d11083e7235756fde635e145f02e2483.gz --- lib/rssaction.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/rssaction.php') diff --git a/lib/rssaction.php b/lib/rssaction.php index ee37f3aa7..5a6a8313d 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -117,12 +117,7 @@ class Rss10Action extends Action { function show_item($notice) { $profile = Profile::staticGet($notice->profile_id); $nurl = common_local_url('shownotice', array('notice' => $notice->id)); - $user = User::staticGet($profile->id); - if ($user) { - $creator_url = $user->uri; - } else { - $creator_url = $profile->profile_url; - } + $creator_uri = common_profile_uri($profile); common_element_start('item', array('rdf:about' => $notice->uri)); $title = $profile->nickname . ': ' . $notice->content; common_element('title', NULL, $title); @@ -133,7 +128,7 @@ class Rss10Action extends Action { common_element('sioc:has_creator', array('rdf:resource' => $creator_url)); common_element('cc:licence', array('rdf:resource' => common_config('license', 'url'))); common_element_end('item'); - $this->creators[$creator_url] = $profile; + $this->creators[$creator_uri] = $profile; } function show_creators() { -- cgit v1.2.3-54-g00ecf