<?php
-function notes_init(&$a) {
+use Friendica\App;
- if(! local_user())
+function notes_init(App $a) {
+
+ if (! local_user()) {
return;
+ }
$profile = 0;
}
-function notes_content(&$a,$update = false) {
+function notes_content(App $a, $update = false) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$a->set_pager_total($r[0]['total']);
$a->set_pager_itemspage(40);
}
$parents_arr = array();
$parents_str = '';
- if(count($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr)
$parents_arr[] = $rr['item_id'];
$parents_str = implode(', ', $parents_arr);
dbesc($parents_str)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$items = conv_sort($r,"`commented`");
$o .= conversation($a,$items,'notes',$update);