X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowstream.php;h=eb6300fec21665947de705cc167cb5754d3d9470;hb=c85e78ac3c03bd584a6da3a0a7b5cb9160cc9324;hp=13241dc30f766ae43f1113d46d12ca5de1c2c642;hpb=390556d932335e5f5349c4b439f1862aebe87df2;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index 13241dc30f..eb6300fec2 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -28,15 +28,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR.'/lib/personalgroupnav.php'; -require_once INSTALLDIR.'/lib/noticelist.php'; -require_once INSTALLDIR.'/lib/profileminilist.php'; -require_once INSTALLDIR.'/lib/groupminilist.php'; -require_once INSTALLDIR.'/lib/feedlist.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * User profile page @@ -57,7 +49,7 @@ class ShowstreamAction extends ProfileAction { var $notice; - protected function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); @@ -72,10 +64,6 @@ class ShowstreamAction extends ProfileAction return true; } - function isReadOnly($args) - { - return true; - } function title() { @@ -103,13 +91,6 @@ class ShowstreamAction extends ProfileAction } } - protected function handle() - { - parent::handle(); - - $this->showPage(); - } - function showContent() { $this->showNotices(); @@ -304,57 +285,3 @@ class ShowstreamAction extends ProfileAction return $options; } } - -// We don't show the author for a profile, since we already know who it is! - -/** - * Slightly modified from standard list; the author & avatar are hidden - * in CSS. We used to remove them here too, but as it turns out that - * confuses the inline reply code... and we hide them in CSS anyway - * since realtime updates come through in original form. - * - * Remaining customization right now is for the repeat marker, where - * it'll list who the original poster was instead of who did the repeat - * (since the repeater is you, and the repeatee isn't shown!) - * This will remain inconsistent if realtime updates come through, - * since those'll get rendered as a regular NoticeListItem. - */ -class ProfileNoticeList extends NoticeList -{ - function newListItem($notice) - { - return new ProfileNoticeListItem($notice, $this->out); - } -} - -class ProfileNoticeListItem extends DoFollowListItem -{ - /** - * show a link to the author of repeat - * - * @return void - */ - function showRepeat() - { - if (!empty($this->repeat)) { - - // FIXME: this code is almost identical to default; need to refactor - - $attrs = array('href' => $this->profile->profileurl, - 'class' => 'url'); - - if (!empty($this->profile->fullname)) { - $attrs['title'] = $this->profile->getFancyName(); - } - - $this->out->elementStart('span', 'repeat'); - - $text_link = XMLStringer::estring('a', $attrs, $this->profile->nickname); - - // TRANS: Link to the author of a repeated notice. %s is a linked nickname. - $this->out->raw(sprintf(_('Repeat of %s'), $text_link)); - - $this->out->elementEnd('span'); - } - } -}