. * * @category Action * @package GNUsocial * @author Evan Prodromou * @author Mikael Nordfeldth * @copyright 2010 StatusNet, Inc. * @copyright 2015 Free Software Foundation, Inc. * @license https://www.gnu.org/licenses/agpl-3.0.html AGPL 3.0 * @link https://gnu.io/social */ if (!defined('GNUSOCIAL')) { exit(1); } class TopAction extends ManagedAction { public function showPage() { if (common_config('singleuser', 'enabled')) { $user = User::singleUser(); common_redirect(common_local_url('showstream', array('nickname' => $user->getNickname())), 303); } elseif (common_config('public', 'localonly')) { common_redirect(common_local_url('public'), 303); } else { common_redirect(common_local_url('networkpublic'), 303); } } }