parameters and getURLpath to getURLPath
This commit is contained in:
14
src/App.php
14
src/App.php
@@ -673,7 +673,7 @@ class App
|
||||
$this->hostname = Config::get('config', 'hostname');
|
||||
}
|
||||
|
||||
return $scheme . '://' . $this->hostname . (!empty($this->getURLpath()) ? '/' . $this->getURLpath() : '' );
|
||||
return $scheme . '://' . $this->hostname . (!empty($this->getURLPath()) ? '/' . $this->getURLPath() : '' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -727,7 +727,7 @@ class App
|
||||
return $this->hostname;
|
||||
}
|
||||
|
||||
public function getURLpath()
|
||||
public function getURLPath()
|
||||
{
|
||||
return $this->urlpath;
|
||||
}
|
||||
@@ -873,20 +873,20 @@ class App
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ class NotificationsManager extends BaseObject
|
||||
// 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',
|
||||
|
||||
@@ -1632,7 +1632,7 @@ class Contact extends BaseObject
|
||||
|
||||
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());
|
||||
|
||||
@@ -78,7 +78,7 @@ class Magic extends BaseModule
|
||||
$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.
|
||||
|
||||
Reference in New Issue
Block a user