]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Merge pull request #6170 from annando/safe-save
[friendica.git] / mod / profile.php
index f520ef94b7f191bb63e5b8c26fa057e995ab3d35..0aa42cf4462df9e29eb6f1d398978eb78016035a 100644 (file)
@@ -59,8 +59,8 @@ function profile_init(App $a)
                $user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
                if (DBA::isResult($user)) {
                        $data = ActivityPub\Transmitter::getProfile($user['uid']);
-                       echo json_encode($data);
                        header('Content-Type: application/activity+json');
+                       echo json_encode($data);
                        exit();
                }
        }
@@ -92,7 +92,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() . '/dfrn_poll/' . $which . '" title="DFRN: ' . 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";
@@ -115,9 +115,9 @@ function profile_content(App $a, $update = 0)
                for ($x = 2; $x < $a->argc; $x ++) {
                        if (is_a_date_arg($a->argv[$x])) {
                                if ($datequery) {
-                                       $datequery2 = Strings::escapeTags($a->argv[$x]);
+                                       $datequery2 = Strings::escapeHtml($a->argv[$x]);
                                } else {
-                                       $datequery = Strings::escapeTags($a->argv[$x]);
+                                       $datequery = Strings::escapeHtml($a->argv[$x]);
                                }
                        } else {
                                $category = $a->argv[$x];
@@ -194,7 +194,7 @@ function profile_content(App $a, $update = 0)
        if (!$update) {
                $tab = false;
                if (!empty($_GET['tab'])) {
-                       $tab = Strings::removeTags(trim($_GET['tab']));
+                       $tab = Strings::escapeTags(trim($_GET['tab']));
                }
 
                $o .= Profile::getTabs($a, $is_owner, $a->profile['nickname']);
@@ -268,6 +268,8 @@ function profile_content(App $a, $update = 0)
                if (!DBA::isResult($items)) {
                        return '';
                }
+
+               $pager = new Pager($a->query_string);
        } else {
                $sql_post_table = "";