]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Revert "Use last entry for Content-Type"
[friendica.git] / mod / network.php
index 4dfd39cd900b80419cae5da21823557834ad34c1..ef6b0b324e2aa123b73a6a90667af8cd788e927f 100644 (file)
@@ -132,7 +132,7 @@ function network_init(App $a)
                DI::page()['aside'] = '';
        }
 
-       if (!empty($a->argv[1]) && in_array($a->argv[1], ['person', 'organisation', 'news', 'community'])) {
+       if (!empty(User::getAccountTypeByString($a->argv[1] ?? ''))) {
                $accounttype = $a->argv[1];
        } else {
                $accounttype = '';
@@ -300,23 +300,7 @@ function network_content(App $a, $update = 0, $parent = 0)
                $o = '';
        }
 
-       switch ($a->argv[1] ?? '') {
-               case 'person':
-                       $account = User::ACCOUNT_TYPE_PERSON;
-                       break;
-               case 'organisation':
-                       $account = User::ACCOUNT_TYPE_ORGANISATION;
-                       break;
-               case 'news':
-                       $account = User::ACCOUNT_TYPE_NEWS;
-                       break;
-               case 'community':
-                       $account = User::ACCOUNT_TYPE_COMMUNITY;
-                       break;
-               default:
-                       $account = null;
-               break;
-       }
+       $account = User::getAccountTypeByString($a->argv[1] ?? '');
 
        if (!empty($_GET['file'])) {
                $o .= networkFlatView($a, $update, $account);