]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
Split the name in the hcard
[friendica.git] / mod / notes.php
index 835627586cada10d58b75113a1783e4a852f4386..c5c45be7243c8a7081b9d5de0056df7d55d15267 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use Friendica\App;
+use Friendica\Database\DBM;
 
 function notes_init(App $a) {
 
@@ -73,7 +74,7 @@ function notes_content(App $a, $update = false) {
 
        // default permissions - anonymous user
 
-       $sql_extra = " AND `allow_cid` = '<" . $a->contact['id'] . ">' ";
+       $sql_extra = " AND `item`.`allow_cid` = '<" . $a->contact['id'] . ">' ";
 
        $r = q("SELECT COUNT(*) AS `total`
                FROM `item` %s
@@ -85,7 +86,7 @@ function notes_content(App $a, $update = false) {
 
        );
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                $a->set_pager_total($r[0]['total']);
                $a->set_pager_itemspage(40);
        }
@@ -105,7 +106,7 @@ function notes_content(App $a, $update = false) {
        $parents_arr = array();
        $parents_str = '';
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                foreach($r as $rr)
                        $parents_arr[] = $rr['item_id'];
                $parents_str = implode(', ', $parents_arr);
@@ -119,7 +120,7 @@ function notes_content(App $a, $update = false) {
                        dbesc($parents_str)
                );
 
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $items = conv_sort($r,"`commented`");
 
                        $o .= conversation($a,$items,'notes',$update);