Rename App->path to App->urlpath
This commit is contained in:
parent
5fdff3d813
commit
e952d6677b
10 changed files with 12 additions and 12 deletions
|
@ -611,7 +611,7 @@ function dfrn_request_content(App $a)
|
|||
} elseif (x($_GET, 'address') && ($_GET['address'] != "")) {
|
||||
$myaddr = $_GET['address'];
|
||||
} elseif (local_user()) {
|
||||
if (strlen($a->path)) {
|
||||
if (strlen($a->urlpath)) {
|
||||
$myaddr = System::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
} else {
|
||||
$myaddr = $a->user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
|
||||
|
|
|
@ -49,7 +49,7 @@ function hcard_init(App $a)
|
|||
|
||||
$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->get_hostname() . (($a->path) ? '/' . $a->path : ''));
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->urlpath) ? '/' . $a->urlpath : ''));
|
||||
$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);
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ function profile_init(App $a)
|
|||
$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->get_hostname() . ($a->path ? '/' . $a->path : ''));
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . ($a->urlpath ? '/' . $a->urlpath : ''));
|
||||
$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);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ function redir_init(App $a) {
|
|||
}
|
||||
|
||||
if (remote_user()) {
|
||||
$host = substr(System::baseUrl() . ($a->path ? '/' . $a->path : ''), strpos(System::baseUrl(), '://') + 3);
|
||||
$host = substr(System::baseUrl() . ($a->urlpath ? '/' . $a->urlpath : ''), 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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -13,7 +13,7 @@ $db_data = 'friendica';
|
|||
// For instance if your URL is 'http://example.com/directory/subdirectory',
|
||||
// set path to 'directory/subdirectory'.
|
||||
|
||||
$a->path = '';
|
||||
$a->urlpath = '';
|
||||
|
||||
// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles".
|
||||
// It can be changed later and only applies to timestamps for anonymous viewers.
|
||||
|
|
|
@ -26,7 +26,7 @@ if (!isset($minimal)) {
|
|||
<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->path ? "/" . $a->path . "/" : "/";
|
||||
$basepath = $a->urlpath ? "/" . $a->urlpath . "/" : "/";
|
||||
$frio = "view/theme/frio";
|
||||
|
||||
// Because we use minimal for modals the header and the included js stuff should be only loaded
|
||||
|
|
Loading…
Reference in a new issue