From 63758c59e1df81c955ce8528d80ba3fd0e466bec Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 20 May 2008 16:11:20 -0400 Subject: reformat showstream darcs-hash:20080520201120-84dde-4b455d4e4854454cc78be8c636a3e0c7f730b93a.gz --- actions/all.php | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'actions/all.php') 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()) { -- cgit v1.2.3-54-g00ecf