Worker::add(PRIORITY_LOW, 'Directory');
}
- if ($a->getURLpath() != "") {
+ if ($a->getURLPath() != "") {
$diaspora_enabled = false;
}
if ($ssl_policy != intval(Config::get('system', 'ssl_policy'))) {
if (empty(Config::get('config', 'hostname'))) {
Config::set('config', 'hostname', $a->getHostName());
}
- $diaspora_able = ($a->getURLpath() == "");
+ $diaspora_able = ($a->getURLPath() == "");
$optimize_max_tablesize = Config::get('system', 'optimize_max_tablesize', -1);
if ($network == Protocol::DIASPORA) {
$uri = $nickname . '@' . $a->getHostName();
- if ($a->getURLpath()) {
- $uri .= '/' . $a->getURLpath();
+ if ($a->getURLPath()) {
+ $uri .= '/' . $a->getURLPath();
}
$uri = urlencode($uri);
} elseif (x($_GET, 'address') && ($_GET['address'] != "")) {
$myaddr = $_GET['address'];
} elseif (local_user()) {
- if (strlen($a->getURLpath())) {
+ if (strlen($a->getURLPath())) {
$myaddr = System::baseUrl() . '/profile/' . $a->user['nickname'];
} else {
$myaddr = $a->user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
$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 .'" />' . "\r\n" ;
- $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->getHostName() . (($a->getURLpath()) ? '/' . $a->getURLpath() : ''));
+ $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->getHostName() . (($a->getURLPath()) ? '/' . $a->getURLPath() : ''));
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
$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";
- $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->getHostName() . ($a->getURLpath() ? '/' . $a->getURLpath() : ''));
+ $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->getHostName() . ($a->getURLPath() ? '/' . $a->getURLPath() : ''));
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
}
if (remote_user()) {
- $host = substr(System::baseUrl() . ($a->getURLpath() ? '/' . $a->getURLpath() : ''), strpos(System::baseUrl(), '://') + 3);
+ $host = substr(System::baseUrl() . ($a->getURLPath() ? '/' . $a->getURLPath() : ''), strpos(System::baseUrl(), '://') + 3);
$remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);
// On a local instance we have to check if the local user has already authenticated
$tpl_addr = get_markup_template('settings/nick_set.tpl');
$prof_addr = replace_macros($tpl_addr,[
- '$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->getHostName() . $a->getURLpath(), System::baseUrl() . '/profile/' . $nickname),
+ '$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->getHostName() . $a->getURLPath(), System::baseUrl() . '/profile/' . $nickname),
'$basepath' => $a->getHostName()
]);
$alias = str_replace('/profile/', '/~', $profile_url);
$addr = 'acct:'.$user['nickname'].'@'.$a->getHostName();
- if ($a->getURLpath()) {
- $addr .= '/'.$a->getURLpath();
+ if ($a->getURLPath()) {
+ $addr .= '/'.$a->getURLPath();
}
if ($mode == 'xml') {
$this->hostname = Config::get('config', 'hostname');
}
- return $scheme . '://' . $this->hostname . (!empty($this->getURLpath()) ? '/' . $this->getURLpath() : '' );
+ return $scheme . '://' . $this->hostname . (!empty($this->getURLPath()) ? '/' . $this->getURLPath() : '' );
}
/**
return $this->hostname;
}
- public function getURLpath()
+ public function getURLPath()
{
return $this->urlpath;
}
/**
* @brief Removes the base url from an url. This avoids some mixed content problems.
*
- * @param string $orig_url
+ * @param string $origURL
*
* @return string The cleaned url
*/
- public function removeBaseURL($orig_url)
+ public function removeBaseURL($origURL)
{
// Remove the hostname from the url if it is an internal link
- $nurl = normalise_link($orig_url);
+ $nurl = normalise_link($origURL);
$base = normalise_link($this->getBaseURL());
$url = str_replace($base . '/', '', $nurl);
// if it is an external link return the orignal value
- if ($url == normalise_link($orig_url)) {
- return $orig_url;
+ if ($url == normalise_link($origURL)) {
+ return $origURL;
} else {
return $url;
}
// We have to distinguish between these two because they use different data.
// Contact suggestions
if ($it['fid']) {
- $return_addr = bin2hex(self::getApp()->user['nickname'] . '@' . self::getApp()->getHostName() . ((self::getApp()->getURLpath()) ? '/' . self::getApp()->getURLpath() : ''));
+ $return_addr = bin2hex(self::getApp()->user['nickname'] . '@' . self::getApp()->getHostName() . ((self::getApp()->getURLPath()) ? '/' . self::getApp()->getURLPath() : ''));
$intro = [
'label' => 'friend_suggestion',
if (($ret['network'] === Protocol::DFRN) && !DBA::isResult($contact)) {
if ($interactive) {
- if (strlen($a->getURLpath())) {
+ if (strlen($a->getURLPath())) {
$myaddr = bin2hex(System::baseUrl() . '/profile/' . $a->user['nickname']);
} else {
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->getHostName());
$headers = HTTPSignature::createSig(
$headers,
$user['prvkey'],
- 'acct:' . $user['nickname'] . '@' . $a->getHostName() . ($a->getURLpath() ? '/' . $a->getURLpath() : '')
+ 'acct:' . $user['nickname'] . '@' . $a->getHostName() . ($a->getURLPath() ? '/' . $a->getURLPath() : '')
);
// Try to get an authentication token from the other instance.
<script type="text/javascript">var baseurl = "<?php echo System::baseUrl(); ?>";</script>
<script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
<?php
- $basepath = $a->getURLpath() ? "/" . $a->getURLpath() . "/" : "/";
+ $basepath = $a->getURLPath() ? "/" . $a->getURLPath() . "/" : "/";
$frio = "view/theme/frio";
// Because we use minimal for modals the header and the included js stuff should be only loaded