]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
From Tobias H - catch some irregularities caused by cut/paste code
[friendica.git] / mod / network.php
index 497e8a115f9a6747768a216295dc88f84fb6aa13..894ac48ed67e3554d7265841b27f5a34b7540ad5 100755 (executable)
@@ -56,7 +56,9 @@ function saved_searches($search) {
                . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '')
                . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '')
                . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '')
-               . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '');
+               . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '')
+               . ((x($_GET,'cmin')) ? '?cmin=' . $_GET['cmin'] : '')
+               . ((x($_GET,'cmax')) ? '?cmax=' . $_GET['cmax'] : '');
        
        $o = '';
 
@@ -222,6 +224,8 @@ function network_content(&$a, $update = 0) {
        $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
        $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0);
        $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
+       $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0);
+       $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99);
 
        if(($a->argc > 2) && $a->argv[2] === 'new')
                $nouveau = true;
@@ -259,7 +263,7 @@ function network_content(&$a, $update = 0) {
                $x = array(
                        'is_owner' => true,
                        'allow_location' => $a->user['allow_location'],
-                       'default_location' => $a->user['default_location'],
+                       'default_location' => $a->user['default-location'],
                        'nickname' => $a->user['nickname'],
                        'lockstate' => ((($group) || (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'),
                        'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb),
@@ -283,11 +287,7 @@ function network_content(&$a, $update = 0) {
 
        $sql_nets = (($nets) ? sprintf(" and `contact`.`network` = '%s' ", dbesc($nets)) : '');
 
-       // We'll need the following line if starred/bookmarks are allowed in comments in the future
-       //      $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
-
-       // Otherwise, this is a bit faster:
-       $sql_extra = $sql_options;
+       $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
 
        if($group) {
                $r = q("SELECT `name`, `id` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@@ -358,6 +358,8 @@ function network_content(&$a, $update = 0) {
                        . ((x($_GET,'conv'))   ? '&conv='   . $_GET['conv']   : '') 
                        . ((x($_GET,'spam'))   ? '&spam='   . $_GET['spam']   : '') 
                        . ((x($_GET,'nets'))   ? '&nets='   . $_GET['nets']   : '') 
+                       . ((x($_GET,'cmin'))   ? '&cmin='   . $_GET['cmin']   : '') 
+                       . ((x($_GET,'cmax'))   ? '&cmax='   . $_GET['cmax']   : '') 
 
                        . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
        }