]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
rev update
[friendica.git] / mod / network.php
index 9909cd445178692ae217c51ce75df6a0b4a1aa90..624169511a06a5c6e702bf4a37dcd6367a9df1ec 100644 (file)
@@ -560,10 +560,12 @@ function network_content(&$a, $update = 0) {
                        'default_location' => $a->user['default-location'],
                        'nickname' => $a->user['nickname'],
                        'lockstate' => ((($group) || ($cid) || ($nets) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
+                       'default_perms' => get_acl_permissions($a->user),
                        'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
                        'bang' => (($group || $cid || $nets) ? '!' : ''),
                        'visitor' => 'block',
-                       'profile_uid' => local_user()
+                       'profile_uid' => local_user(),
+                       'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
                );
 
                $o .= status_editor($a,$x);
@@ -592,7 +594,7 @@ function network_content(&$a, $update = 0) {
                        if($update)
                                killme();
                        notice( t('No such group') . EOL );
-                       goaway($a->get_baseurl(true) . '/network');
+                       goaway($a->get_baseurl(true) . '/network/0');
                        // NOTREACHED
                }
 
@@ -738,8 +740,17 @@ function network_content(&$a, $update = 0) {
                        }
                }
 
-               $itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
-               $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
+               //  check if we serve a mobile device and get the user settings 
+               //  accordingly
+               if ($a->is_mobile) { 
+                   $itemspage_network = get_pconfig(local_user(),'system','itemspage_mobile_network');
+                   $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 20);
+               } else { 
+                   $itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
+                   $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
+               }
+               //  now that we have the user settings, see if the theme forces 
+               //  a maximum item number which is lower then the user choice
                if(($a->force_max_items > 0) && ($a->force_max_items < $itemspage_network))
                        $itemspage_network = $a->force_max_items;