]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge pull request #6181 from JonnyTischbein/feature_admin_subsubpages
[friendica.git] / include / conversation.php
index cd635521e51516545e43e937c4e294a252a4b3e6..2d613f0f38ac5903d14e2698e8ec813ed8b70bfa 100644 (file)
@@ -26,6 +26,7 @@ use Friendica\Object\Thread;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Temporal;
+use Friendica\Util\Strings;
 use Friendica\Util\XML;
 use Friendica\Util\Crypto;
 
@@ -461,17 +462,17 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
                                . "<script> var profile_uid = " . $_SESSION['uid']
                                . "; var netargs = '" . substr($a->cmd, 8)
                                . '?f='
-                               . ((x($_GET, 'cid'))    ? '&cid='    . $_GET['cid']    : '')
-                               . ((x($_GET, 'search')) ? '&search=' . $_GET['search'] : '')
-                               . ((x($_GET, 'star'))   ? '&star='   . $_GET['star']   : '')
-                               . ((x($_GET, 'order'))  ? '&order='  . $_GET['order']  : '')
-                               . ((x($_GET, 'bmark'))  ? '&bmark='  . $_GET['bmark']  : '')
-                               . ((x($_GET, 'liked'))  ? '&liked='  . $_GET['liked']  : '')
-                               . ((x($_GET, 'conv'))   ? '&conv='   . $_GET['conv']   : '')
-                               . ((x($_GET, 'nets'))   ? '&nets='   . $_GET['nets']   : '')
-                               . ((x($_GET, 'cmin'))   ? '&cmin='   . $_GET['cmin']   : '')
-                               . ((x($_GET, 'cmax'))   ? '&cmax='   . $_GET['cmax']   : '')
-                               . ((x($_GET, 'file'))   ? '&file='   . $_GET['file']   : '')
+                               . ((x($_GET, 'cid'))    ? '&cid='    . rawurlencode($_GET['cid'])    : '')
+                               . ((x($_GET, 'search')) ? '&search=' . rawurlencode($_GET['search']) : '')
+                               . ((x($_GET, 'star'))   ? '&star='   . rawurlencode($_GET['star'])   : '')
+                               . ((x($_GET, 'order'))  ? '&order='  . rawurlencode($_GET['order'])  : '')
+                               . ((x($_GET, 'bmark'))  ? '&bmark='  . rawurlencode($_GET['bmark'])  : '')
+                               . ((x($_GET, 'liked'))  ? '&liked='  . rawurlencode($_GET['liked'])  : '')
+                               . ((x($_GET, 'conv'))   ? '&conv='   . rawurlencode($_GET['conv'])   : '')
+                               . ((x($_GET, 'nets'))   ? '&nets='   . rawurlencode($_GET['nets'])   : '')
+                               . ((x($_GET, 'cmin'))   ? '&cmin='   . rawurlencode($_GET['cmin'])   : '')
+                               . ((x($_GET, 'cmax'))   ? '&cmax='   . rawurlencode($_GET['cmax'])   : '')
+                               . ((x($_GET, 'file'))   ? '&file='   . rawurlencode($_GET['file'])   : '')
 
                                . "'; var profile_page = " . $pager->getPage() . "; </script>\r\n";
                }
@@ -482,7 +483,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
                if (!$update) {
                        $tab = 'posts';
                        if (x($_GET, 'tab')) {
-                               $tab = notags(trim($_GET['tab']));
+                               $tab = Strings::escapeTags(trim($_GET['tab']));
                        }
                        if ($tab === 'posts') {
                                /*
@@ -638,7 +639,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
                                $lock = false;
                                $likebuttons = false;
 
-                               $body = prepare_body($item, true, $preview);
+                               $body = Item::prepareBody($item, true, $preview);
 
                                list($categories, $folders) = get_cats_and_terms($item);
 
@@ -689,7 +690,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
                                        'owner_name' => $owner_name_e,
                                        'owner_url' => $owner_url,
                                        'owner_photo' => System::removedBaseUrl(ProxyUtils::proxifyUrl($item['owner-avatar'], false, ProxyUtils::SIZE_THUMB)),
-                                       'plink' => get_plink($item),
+                                       'plink' => Item::getPlink($item),
                                        'edpost' => false,
                                        'isstarred' => $isstarred,
                                        'star' => $star,
@@ -768,7 +769,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
                '$mode' => $mode,
                '$user' => $a->user,
                '$threads' => $threads,
-               '$dropping' => ($page_dropping && Feature::isEnabled(local_user(), 'multi_delete') ? L10n::t('Delete Selected Items') : False),
+               '$dropping' => ($page_dropping ? L10n::t('Delete Selected Items') : False),
        ]);
 
        return $o;
@@ -842,7 +843,7 @@ function item_photo_menu($item) {
        $cid = 0;
        $network = '';
        $rel = 0;
-       $condition = ['uid' => local_user(), 'nurl' => normalise_link($item['author-link'])];
+       $condition = ['uid' => local_user(), 'nurl' => Strings::normaliseLink($item['author-link'])];
        $contact = DBA::selectFirst('contact', ['id', 'network', 'rel'], $condition);
        if (DBA::isResult($contact)) {
                $cid = $contact['id'];
@@ -1162,7 +1163,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
                '$lockstate'    => $x['lockstate'],
                '$bang'         => $x['bang'],
                '$profile_uid'  => $x['profile_uid'],
-               '$preview'      => Feature::isEnabled($x['profile_uid'], 'preview') ? L10n::t('Preview') : '',
+               '$preview'      => L10n::t('Preview'),
                '$jotplugins'   => $jotplugins,
                '$notes_cid'    => $notes_cid,
                '$sourceapp'    => L10n::t($a->sourcename),