apitimelinenetworkpublic.php 557 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
<?php

if (!defined('GNUSOCIAL')) { exit(1); }

class ApiTimelineNetworkPublicAction extends ApiTimelinePublicAction
{
    function title()
    {
        return sprintf(_("%s network public timeline"), common_config('site', 'name'));
    }

    protected function getStream()
    {
14 15 16
        if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) {
            $this->clientError(_('Network wide public feed is not permitted without authorization'), 403);
        }
17 18 19
        return new NetworkPublicNoticeStream($this->scoped);
    }
}