]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Standards and a new function to fetch content
[friendica.git] / mod / profile.php
index ab11b4d5fe509850c97c48fdc9e4346feb9f9215..49d6fe261d2b2ca761ca1406c7c958c7de2c8970 100644 (file)
@@ -75,6 +75,7 @@ function profile_init(App $a)
        }
 
        $a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . ($a->profile['net-publish'] ? 'true' : 'false') . '" />' . "\r\n";
+       $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/dfrn_poll/' . $which . '" title="' . L10n::t('%s\'s timeline', $a->profile['username']) . '"/>' . "\r\n";
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/" title="' . L10n::t('%s\'s posts', $a->profile['username']) . '"/>' . "\r\n";
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/comments" title="' . L10n::t('%s\'s comments', $a->profile['username']) . '"/>' . "\r\n";
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/activity" title="' . L10n::t('%s\'s timeline', $a->profile['username']) . '"/>' . "\r\n";
@@ -191,7 +192,7 @@ function profile_content(App $a, $update = 0)
                $o .= Widget::commonFriendsVisitor($a->profile['profile_uid']);
 
                if (x($_SESSION, 'new_member') && $is_owner) {
-                       $o .= '<a href="newmember" id="newmember-tips" style="font-size: 1.2em;"><b>' . L10n::t('Tips for New Members') . '</b></a>' . EOL;
+                       $o .= '<div id="newmember-tips"><a href="newmember"><b>' . L10n::t('Tips for New Members') . '</b></a></div>';
                }
 
                $commpage = $a->profile['page-flags'] == PAGE_COMMUNITY;
@@ -336,16 +337,9 @@ function profile_content(App $a, $update = 0)
                        $parents_arr[] = $rr['item_id'];
                }
 
-               $parents_str = implode(', ', $parents_arr);
-
-               $items = q(item_query() . " AND `item`.`uid` = %d
-                       AND `item`.`parent` IN (%s)
-                       $sql_extra ",
-                       intval($a->profile['profile_uid']),
-                       dbesc($parents_str)
-               );
-
-               $items = conv_sort($items, 'created');
+               $condition = ['uid' => $a->profile['profile_uid'], 'parent' => $parents_arr];
+               $result = Item::selectForUser($a->profile['profile_uid'], [], $condition);
+               $items = conv_sort(dba::inArray($result), 'created');
        } else {
                $items = [];
        }
@@ -364,7 +358,7 @@ function profile_content(App $a, $update = 0)
                }
        }
 
-       $o .= conversation($a, $items, 'profile', $update);
+       $o .= conversation($a, $items, 'profile', $update, false, 'commented', local_user());
 
        if (!$update) {
                $o .= alt_pager($a, count($items));