]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Merge pull request #6649 from MrPetovan/bug/6647-include-newlines-in-implicit-mention...
[friendica.git] / mod / network.php
index e05f9814a0c23ec8a9c2a943362d56ab8f971345..b5c218de24a0a80b550887d11a5b54610190fcd6 100644 (file)
@@ -449,7 +449,7 @@ function networkFlatView(App $a, $update = 0)
                $condition = ["`term` = ? AND `otype` = ? AND `type` = ? AND `uid` = ?",
                        $file, TERM_OBJ_POST, TERM_FILE, local_user()];
                $params = ['order' => ['tid' => true], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
-               $result = DBA::select('term', ['oid'], $condition);
+               $result = DBA::select('term', ['oid'], $condition, $params);
 
                $posts = [];
                while ($term = DBA::fetch($result)) {
@@ -525,7 +525,7 @@ function networkThreadedView(App $a, $update, $parent)
                                }
                        } elseif (intval($a->argv[$x])) {
                                $gid = intval($a->argv[$x]);
-                               $default_permissions = ['allow_gid' => '<' . $gid . '>'];
+                               $default_permissions['allow_gid'] = [$gid];
                        }
                }
        }
@@ -540,18 +540,18 @@ function networkThreadedView(App $a, $update, $parent)
        $nets  =        defaults($_GET, 'nets' , '');
 
        if ($cid) {
-               $default_permissions = ['allow_cid' => '<' . intval($cid) . '>'];
+               $default_permissions['allow_cid'] = [(int) $cid];
        }
 
        if ($nets) {
                $r = DBA::select('contact', ['id'], ['uid' => local_user(), 'network' => $nets], ['self' => false]);
 
-               $str = '';
+               $str = [];
                while ($rr = DBA::fetch($r)) {
-                       $str .= '<' . $rr['id'] . '>';
+                       $str[] = (int) $rr['id'];
                }
                if (strlen($str)) {
-                       $default_permissions = ['allow_cid' => $str];
+                       $default_permissions['allow_cid'] = $str;
                }
        }