]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
Merge remote-tracking branch 'upstream/develop' into 1501-global-contacts
[friendica.git] / mod / notes.php
index 703c898e6e36dce0f3b82276f755a7177ab4050a..09dac72b0c9437dec1a7ee1063dd79ef4370eddf 100644 (file)
@@ -60,16 +60,12 @@ function notes_content(&$a,$update = false) {
            'bang' => '',
                'visitor' => 'block',
                    'profile_uid' => local_user(),
-                       'button' => t('Save')
-
+                       'button' => t('Save'),
+                       'acl_data' => '',
        );
 
        $o .= status_editor($a,$x,$a->contact['id']);
 
-               $o .= '<div id="live-notes"></div>' . "\r\n";
-               $o .= "<script> var profile_uid = " . local_user() 
-                       . "; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
-
        }
 
        // Construct permissions
@@ -117,7 +113,7 @@ function notes_content(&$a,$update = false) {
                $parents_str = implode(', ', $parents_arr);
  
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
-                       `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, 
+                       `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`, 
                        `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, 
                        `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                        FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
@@ -129,9 +125,13 @@ function notes_content(&$a,$update = false) {
                        intval(local_user()),
                        dbesc($parents_str)
                );
-       }
 
-       $o .= conversation($a,$r,'notes',$update);
+               if(count($r)) {
+                       $items = conv_sort($r,"`commented`");
+
+                       $o .= conversation($a,$items,'notes',$update);
+               }
+       }
 
 
        $o .= paginate($a);