'$tabs' => $tabs,
'$new' => $new,
]);
- $base = DI::baseUrl();
$head_tpl = Renderer::getMarkupTemplate('message-head.tpl');
DI::page()['htmlhead'] .= Renderer::replaceMacros($head_tpl, [
- '$base' => $base
+ '$base' => (string)DI::baseUrl()
]);
}
];
- $baseUrl = DI::baseUrl();
+ $baseUrl = (string)DI::baseUrl();
$icons = [
'<img class="smiley" src="' . $baseUrl . '/images/smiley-heart.gif" alt="<3" title="<3" />',
*/
public static function getResourceData(string $name): array
{
- $base = DI::baseUrl();
-
- $guid = str_replace([Strings::normaliseLink($base), '/photo/'], '', Strings::normaliseLink($name));
+ $guid = str_replace([Strings::normaliseLink((string)DI::baseUrl()), '/photo/'], '', Strings::normaliseLink($name));
if (parse_url($guid, PHP_URL_SCHEME)) {
return [];
*/
public static function isLocalPage(string $name): bool
{
- $base = DI::baseUrl();
-
- $guid = str_replace(Strings::normaliseLink($base), '', Strings::normaliseLink($name));
+ $guid = str_replace(Strings::normaliseLink((string)DI::baseUrl()), '', Strings::normaliseLink($name));
$guid = preg_replace("=/photos/.*/image/(.*)=ism", '$1', $guid);
if (empty($guid)) {
return false;
$system['region'] = '';
$system['postal-code'] = '';
$system['country-name'] = '';
- $system['homepage'] = DI::baseUrl();
+ $system['homepage'] = (string)DI::baseUrl();
$system['dob'] = '0000-00-00';
// Ensure that the user contains data
$page['htmlhead'] .= '<link rel="openid.delegate" href="' . $delegate . '" />' . "\r\n";
}
- $baseUrl = DI::baseUrl();
+ $baseUrl = (string)DI::baseUrl();
- $uri = urlencode('acct:' . $profile['nickname'] . '@' . $baseUrl->getHost() . ($baseUrl->getPath() ? '/' . $baseUrl->getPath() : ''));
+ $uri = urlencode('acct:' . $profile['nickname'] . '@' . DI::baseUrl()->getHost() . (DI::baseUrl()->getPath() ? '/' . DI::baseUrl()->getPath() : ''));
$page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . ($profile['net-publish'] ? 'true' : 'false') . '" />' . "\r\n";
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl . '/dfrn_poll/' . $nickname . '" />' . "\r\n";
protected function rawContent(array $request = [])
{
$hostname = DI::baseUrl()->getHost();
- $baseUrl = DI::baseUrl();
+ $baseUrl = (string)DI::baseUrl();
/** @var DOMDocument $xml */
XML::fromArray([
$user = $result['user'];
- $base_url = DI::baseUrl();
+ $base_url = (string)DI::baseUrl();
if ($netpublish && intval(DI::config()->get('config', 'register_policy')) !== self::APPROVE) {
$url = $base_url . '/profile/' . $user['nickname'];
$config->set('system', 'site_pubkey', $res['pubkey']);
}
- $domain = DI::baseUrl();
+ $domain = (string)DI::baseUrl();
XML::fromArray([
'XRD' => [
return [
'type' => 'Service',
'name' => App::PLATFORM . " '" . App::CODENAME . "' " . App::VERSION . '-' . DB_UPDATE_VERSION,
- 'url' => DI::baseUrl()
+ 'url' => (string)DI::baseUrl()
];
}
<head>
<title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
- <script type="text/javascript">var baseurl = "<?php echo DI::baseUrl(); ?>";</script>
+ <script type="text/javascript">var baseurl = "<?php echo (string)DI::baseUrl(); ?>";</script>
<script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
<?php
// Because we use minimal for modals the header and the included js stuff should be only loaded
$cssFile = null;
$ssl_state = false;
- $baseurl = DI::baseUrl();
+ $baseurl = (string)DI::baseUrl();
DI::page()['htmlhead'] .= <<< EOT
<script>
/** @purpose insert stuff in bottom of page
*/
$ssl_state = false;
- $baseurl = DI::baseUrl();
+ $baseurl = (string)DI::baseUrl();
$bottom['$baseurl'] = $baseurl;
$tpl = Renderer::getMarkupTemplate('bottom.tpl');
$show_lastusers = get_vier_config("show_lastusers", 1);
// get_baseurl
- $url = DI::baseUrl();
- $aside['$url'] = $url;
+ $aside['$url'] = $url = (string)DI::baseUrl();
// community_profiles
if ($show_profiles) {