Adapt BaseURL calls to new UriInterface
This commit is contained in:
@@ -314,7 +314,7 @@ class Conversation
|
||||
$tpl = Renderer::getMarkupTemplate('jot-header.tpl');
|
||||
$this->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$newpost' => 'true',
|
||||
'$baseurl' => $this->baseURL->get(true),
|
||||
'$baseurl' => $this->baseURL,
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $x['nickname'],
|
||||
'$ispublic' => $this->l10n->t('Visible to <strong>everybody</strong>'),
|
||||
@@ -385,7 +385,7 @@ class Conversation
|
||||
'$posttype' => $notes_cid ? ItemModel::PT_PERSONAL_NOTE : ItemModel::PT_ARTICLE,
|
||||
'$content' => $x['content'] ?? '',
|
||||
'$post_id' => $x['post_id'] ?? '',
|
||||
'$baseurl' => $this->baseURL->get(true),
|
||||
'$baseurl' => $this->baseURL,
|
||||
'$defloc' => $x['default_location'],
|
||||
'$visitor' => $x['visitor'],
|
||||
'$pvisit' => $notes_cid ? 'none' : $x['visitor'],
|
||||
@@ -784,7 +784,7 @@ class Conversation
|
||||
}
|
||||
|
||||
$o = Renderer::replaceMacros($page_template, [
|
||||
'$baseurl' => $this->baseURL->get($ssl_state),
|
||||
'$baseurl' => $this->baseURL,
|
||||
'$return_path' => $this->args->getQueryString(),
|
||||
'$live_update' => $live_update_div,
|
||||
'$remove' => $this->l10n->t('remove'),
|
||||
|
||||
@@ -903,7 +903,7 @@ class Item
|
||||
if ($post['attach']) {
|
||||
$post['attach'] .= ',';
|
||||
}
|
||||
$post['attach'] .= Post\Media::getAttachElement($this->baseURL->get() . '/attach/' . $attachment['id'],
|
||||
$post['attach'] .= Post\Media::getAttachElement($this->baseURL . '/attach/' . $attachment['id'],
|
||||
$attachment['filesize'], $attachment['filetype'], $attachment['filename'] ?? '');
|
||||
|
||||
$fields = ['allow_cid' => $post['allow_cid'], 'allow_gid' => $post['allow_gid'],
|
||||
|
||||
@@ -194,7 +194,7 @@ class Nav
|
||||
|
||||
$myident = !empty($this->session->getLocalUserNickname()) ? $this->session->getLocalUserNickname() . '@' : '';
|
||||
|
||||
$sitelocation = $myident . substr($this->baseUrl->get($ssl_state), strpos($this->baseUrl->get($ssl_state), '//') + 2);
|
||||
$sitelocation = $myident . substr($this->baseUrl, strpos($this->baseUrl, '//') + 2);
|
||||
|
||||
$nav = [
|
||||
'admin' => null,
|
||||
|
||||
@@ -1274,7 +1274,7 @@ class BBCode
|
||||
private static function cleanPictureLinksCallback(array $match): string
|
||||
{
|
||||
// When the picture link is the own photo path then we can avoid fetching the link
|
||||
$own_photo_url = preg_quote(Strings::normaliseLink(DI::baseUrl()->get()) . '/photos/');
|
||||
$own_photo_url = preg_quote(Strings::normaliseLink(DI::baseUrl()) . '/photos/');
|
||||
if (preg_match('|' . $own_photo_url . '.*?/image/|', Strings::normaliseLink($match[1]))) {
|
||||
if (!empty($match[3])) {
|
||||
$text = '[img=' . str_replace('-1.', '-0.', $match[2]) . ']' . $match[3] . '[/img]';
|
||||
@@ -2099,8 +2099,8 @@ class BBCode
|
||||
|
||||
// Default iframe allowed domains/path
|
||||
$allowedIframeDomains = [
|
||||
DI::baseUrl()->getHostname()
|
||||
. (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : '')
|
||||
DI::baseUrl()->getHost()
|
||||
. (DI::baseUrl()->getPath() ? '/' . DI::baseUrl()->getPath() : '')
|
||||
. '/oembed/', # The path part has to change with the source in Content\Oembed::iframe
|
||||
'www.youtube.com/embed/',
|
||||
'player.vimeo.com/video/',
|
||||
|
||||
Reference in New Issue
Block a user