]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - actions/startpage.php
Opps, PEAR sucks. Need to call find() before fetch() ... :-(
[quix0rs-gnu-social.git] / actions / startpage.php
1 <?php
2 /**
3  * Startpage action. Decides what to show on the first page.
4  */
5
6 if (!defined('GNUSOCIAL')) { exit(1); }
7
8 class StartpageAction extends ManagedAction
9 {
10     function isReadOnly($args)
11     {
12         return true;
13     }
14
15     function showPage()
16     {
17         if (common_config('singleuser', 'enabled')) {
18             $user = User::singleUser();
19             common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)), 303);
20         } elseif (common_config('public', 'localonly')) {
21             common_redirect(common_local_url('public'), 303);
22         } else {
23             common_redirect(common_local_url('networkpublic'), 303);
24         }
25     }
26 }