]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Merge pull request #8141 from annando/brief2
[friendica.git] / mod / display.php
index 83e3f63ba2e781599ac50e3155d190b5ab457352..35cac53d0b660c08fe4907617420dd9230f1fcd6 100644 (file)
@@ -9,11 +9,9 @@ use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
 use Friendica\Core\ACL;
 use Friendica\Core\Config;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
-use Friendica\Core\System;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -158,7 +156,7 @@ function display_fetchauthor($a, $item)
        $profiledata = Contact::getDetailsByURL($profiledata["url"], local_user(), $profiledata);
 
        if (!empty($profiledata["photo"])) {
-               $profiledata["photo"] = System::removedBaseUrl($profiledata["photo"]);
+               $profiledata["photo"] = DI::baseUrl()->remove($profiledata["photo"]);
        }
 
        return $profiledata;
@@ -167,7 +165,7 @@ function display_fetchauthor($a, $item)
 function display_content(App $a, $update = false, $update_uid = 0)
 {
        if (Config::get('system','block_public') && !Session::isAuthenticated()) {
-               throw new HTTPException\ForbiddenException(L10n::t('Public access denied.'));
+               throw new HTTPException\ForbiddenException(DI::l10n()->t('Public access denied.'));
        }
 
        $o = '';
@@ -224,7 +222,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
        }
 
        if (empty($item)) {
-               throw new HTTPException\NotFoundException(L10n::t('The requested item doesn\'t exist or has been deleted.'));
+               throw new HTTPException\NotFoundException(DI::l10n()->t('The requested item doesn\'t exist or has been deleted.'));
        }
 
        // We are displaying an "alternate" link if that post was public. See issue 2864
@@ -269,7 +267,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
        $is_owner = (local_user() && (in_array($a->profile['profile_uid'], [local_user(), 0])) ? true : false);
 
        if (!empty($a->profile['hidewall']) && !$is_owner && !$is_remote_contact) {
-               throw new HTTPException\ForbiddenException(L10n::t('Access to this profile has been restricted.'));
+               throw new HTTPException\ForbiddenException(DI::l10n()->t('Access to this profile has been restricted.'));
        }
 
        // We need the editor here to be able to reshare an item.
@@ -305,7 +303,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
        $item = Item::selectFirstForUser($a->profile['profile_uid'], $fields, $condition);
 
        if (!DBA::isResult($item)) {
-               throw new HTTPException\NotFoundException(L10n::t('The requested item doesn\'t exist or has been deleted.'));
+               throw new HTTPException\NotFoundException(DI::l10n()->t('The requested item doesn\'t exist or has been deleted.'));
        }
 
        $item['uri'] = $item['parent-uri'];
@@ -316,7 +314,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
        }
 
        if (!$update) {
-               $o .= "<script> var netargs = '?f=&item_id=" . $item_id . "'; </script>";
+               $o .= "<script> var netargs = '?item_id=" . $item_id . "'; </script>";
        }
 
        $o .= conversation($a, [$item], new Pager(DI::args()->getQueryString()), 'display', $update_uid, false, 'commented', $item_uid);
@@ -385,7 +383,7 @@ function displayShowFeed($item_id, $conversation)
 {
        $xml = DFRN::itemFeed($item_id, $conversation);
        if ($xml == '') {
-               throw new HTTPException\InternalServerErrorException(L10n::t('The feed for this item is unavailable.'));
+               throw new HTTPException\InternalServerErrorException(DI::l10n()->t('The feed for this item is unavailable.'));
        }
        header("Content-type: application/atom+xml");
        echo $xml;