diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-01-27 15:27:04 -0800 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-01-27 15:27:04 -0800 |
commit | 745f7334690c98eecade27a146ae132a48b6f812 (patch) | |
tree | 97fb469395083db00546ced88df07ee4007c28a1 /actions | |
parent | 4a176eadcb5e394faea3664caafdd5cc8418c2e3 (diff) |
Make favorites RSS actually work (uiredesign)
Diffstat (limited to 'actions')
-rw-r--r-- | actions/favoritesrss.php | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/actions/favoritesrss.php b/actions/favoritesrss.php index ad72dce9e..f85bf1b19 100644 --- a/actions/favoritesrss.php +++ b/actions/favoritesrss.php @@ -44,22 +44,32 @@ require_once INSTALLDIR.'/lib/rssaction.php'; * @package Laconica * @author Evan Prodromou <evan@controlyourself.ca> * @author Robin Millette <millette@controlyourself.ca> + * @author Zach Copley <zach@controlyourself.ca> * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://laconi.ca/ */ class FavoritesrssAction extends Rss10Action { - var $user = null; + /** The user whose favorites to display */ + + var $user = null; + /** - * Initialization. - * - * @return boolean false if user doesn't exist + * Find the user to display by supplied nickname + * + * @param array $args Arguments from $_REQUEST + * + * @return boolean success */ - function init() + + function prepare($args) { + parent::prepare($args); + $nickname = $this->trimmed('nickname'); $this->user = User::staticGet('nickname', $nickname); + if (!$this->user) { $this->clientError(_('No such user.')); return false; @@ -67,7 +77,7 @@ class FavoritesrssAction extends Rss10Action return true; } } - + /** * Get notices * @@ -94,30 +104,26 @@ class FavoritesrssAction extends Rss10Action function getChannel() { $user = $this->user; - $c = array('url' => common_local_url('favoritesrss', - array('nickname' => - $user->nickname)), + $c = array('url' => common_local_url('favoritesrss', + array('nickname' => + $user->nickname)), 'title' => sprintf(_("%s favorite notices"), $user->nickname), 'link' => common_local_url('showfavorites', - array('nickname' => - $user->nickname)), - 'description' => sprintf(_('Feed of favorite notices of %s'), $user->nickname)); + array('nickname' => + $user->nickname)), + 'description' => sprintf(_('Feed of favorite notices of %s'), + $user->nickname)); return $c; } /** * Get image. * - * @return voir + * @return void */ function getImage() { return null; } - function isReadOnly() - { - return true; - } } - |