diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-05-20 16:11:20 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-05-20 16:11:20 -0400 |
commit | 63758c59e1df81c955ce8528d80ba3fd0e466bec (patch) | |
tree | ca06541d7d801a8d9da8a8ca7c4c0532e0f3e308 /actions/all.php | |
parent | 778fba1a24712c85b525a65d3e4c0862e0833cdd (diff) |
reformat showstream
darcs-hash:20080520201120-84dde-4b455d4e4854454cc78be8c636a3e0c7f730b93a.gz
Diffstat (limited to 'actions/all.php')
-rw-r--r-- | actions/all.php | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/actions/all.php b/actions/all.php index 038572ba8..93be7290f 100644 --- a/actions/all.php +++ b/actions/all.php @@ -21,9 +21,41 @@ if (!defined('LACONICA')) { exit(1); } require_once(INSTALLDIR.'/actions/showstream.php'); -class AllAction extends ShowstreamAction { +class AllAction extends StreamAction { - // XXX: push this up to a common function. + function handle($args) { + + parent::handle($args); + + $nickname = common_canonical_nickname($this->arg('nickname')); + $user = User::staticGet('nickname', $nickname); + + if (!$user) { + $this->no_such_user(); + return; + } + + $profile = $user->getProfile(); + + if (!$profile) { + common_server_error(_t('User record exists without profile.')); + return; + } + + # Looks like we're good; show the header + + common_show_header($profile->nickname . _t(" and friends")); + + $cur = common_current_user(); + + if ($cur && $profile->id == $cur->id) { + common_notice_form(); + } + + $this->show_notices($profile); + + common_show_footer(); + } function show_notices($profile) { @@ -42,7 +74,7 @@ class AllAction extends ShowstreamAction { $notice->find(); - common_element_start('div', 'notices'); + common_element_start('div', 'notices width100'); common_element('h2', 'notices', _t('Notices')); while ($notice->fetch()) { |