X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotes.php;h=c02f0a759e298e2dd37cf5cb3808d4449a4e408a;hb=1b74650807279279836a0544f607166111d86050;hp=b2aa5487af963e60d1b456dbf39ec1b258b20aea;hpb=b9e4b9f2747deb5cdd7d7f68e200496e0c3162aa;p=friendica.git diff --git a/mod/notes.php b/mod/notes.php index b2aa5487af..c02f0a759e 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -1,6 +1,13 @@ user['nickname']; - nav_set_selected('home'); + Nav::setSelected('home'); -// profile_load($a,$which,$profile); + //Profile::load($a, $which, $profile); } -function notes_content(&$a,$update = false) { +function notes_content(App $a, $update = false) { if (! local_user()) { notice( t('Permission denied.') . EOL); @@ -28,7 +35,7 @@ function notes_content(&$a,$update = false) { require_once('include/security.php'); require_once('include/conversation.php'); require_once('include/acl_selectors.php'); - $groups = array(); + $groups = []; $o = ''; @@ -41,7 +48,7 @@ function notes_content(&$a,$update = false) { $is_owner = true; $o =""; - $o .= profile_tabs($a,True); + $o .= Profile::getTabs($a, true); if(! $update) { $o .= '

' . t('Personal Notes') . '

'; @@ -49,7 +56,7 @@ function notes_content(&$a,$update = false) { $commpage = false; $commvisitor = false; - $x = array( + $x = [ 'is_owner' => $is_owner, 'allow_location' => (($a->user['allow_location']) ? true : false), 'default_location' => $a->user['default-location'], @@ -61,7 +68,7 @@ function notes_content(&$a,$update = false) { 'profile_uid' => local_user(), 'button' => t('Save'), 'acl_data' => '', - ); + ]; $o .= status_editor($a,$x,$a->contact['id']); @@ -71,7 +78,7 @@ function notes_content(&$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 @@ -83,7 +90,7 @@ function notes_content(&$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); } @@ -100,10 +107,10 @@ function notes_content(&$a,$update = false) { ); - $parents_arr = array(); + $parents_arr = []; $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); @@ -117,7 +124,7 @@ function notes_content(&$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);