apitimelinenetworkpublic.php 557 B

1234567891011121314151617181920
  1. <?php
  2. if (!defined('GNUSOCIAL')) { exit(1); }
  3. class ApiTimelineNetworkPublicAction extends ApiTimelinePublicAction
  4. {
  5. function title()
  6. {
  7. return sprintf(_("%s network public timeline"), common_config('site', 'name'));
  8. }
  9. protected function getStream()
  10. {
  11. if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) {
  12. $this->clientError(_('Network wide public feed is not permitted without authorization'), 403);
  13. }
  14. return new NetworkPublicNoticeStream($this->scoped);
  15. }
  16. }