Rename App->path to App->urlpath

This commit is contained in:
Hypolite Petovan 2018-06-25 20:39:56 -04:00
parent 5fdff3d813
commit e952d6677b
10 changed files with 12 additions and 12 deletions

View file

@ -551,7 +551,7 @@ class App
$this->hostname = Config::get('config', 'hostname');
}
return $scheme . '://' . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
return $scheme . '://' . $this->hostname . (!empty($this->urlpath) ? '/' . $this->urlpath : '' );
}
/**
@ -579,7 +579,7 @@ class App
$hostname .= ':' . $parsed['port'];
}
if (x($parsed, 'path')) {
$this->path = trim($parsed['path'], '\\/');
$this->urlpath = trim($parsed['path'], '\\/');
}
if (file_exists($this->basepath . DIRECTORY_SEPARATOR . '.htpreconfig.php')) {
@ -607,7 +607,7 @@ class App
public function get_path()
{
return $this->path;
return $this->urlpath;
}
public function set_pager_total($n)

View file

@ -613,7 +613,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()->get_hostname() . ((self::getApp()->path) ? '/' . self::getApp()->path : ''));
$return_addr = bin2hex(self::getApp()->user['nickname'] . '@' . self::getApp()->get_hostname() . ((self::getApp()->urlpath) ? '/' . self::getApp()->urlpath : ''));
$intro = [
'label' => 'friend_suggestion',

View file

@ -1316,7 +1316,7 @@ class Contact extends BaseObject
if (($ret['network'] === NETWORK_DFRN) && !DBM::is_result($r)) {
if ($interactive) {
if (strlen($a->path)) {
if (strlen($a->urlpath)) {
$myaddr = bin2hex(System::baseUrl() . '/profile/' . $a->user['nickname']);
} else {
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());

View file

@ -80,7 +80,7 @@ class Magic extends BaseModule
'',
$headers,
$user['prvkey'],
'acct:' . $user['nickname'] . '@' . $a->get_hostname() . ($a->path ? '/' . $a->path : ''),
'acct:' . $user['nickname'] . '@' . $a->get_hostname() . ($a->urlpath ? '/' . $a->urlpath : ''),
false,
true,
'sha512'