Browse Source

Rename App->path to App->urlpath

tags/2018.09
Hypolite Petovan 1 year ago
parent
commit
e952d6677b
10 changed files with 12 additions and 12 deletions
  1. +1
    -1
      mod/dfrn_request.php
  2. +1
    -1
      mod/hcard.php
  3. +1
    -1
      mod/profile.php
  4. +1
    -1
      mod/redir.php
  5. +3
    -3
      src/App.php
  6. +1
    -1
      src/Core/NotificationsManager.php
  7. +1
    -1
      src/Model/Contact.php
  8. +1
    -1
      src/Module/Magic.php
  9. +1
    -1
      util/htconfig.vagrant.php
  10. +1
    -1
      view/theme/frio/php/default.php

+ 1
- 1
mod/dfrn_request.php View File

@@ -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);


+ 1
- 1
mod/hcard.php View File

@@ -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);



+ 1
- 1
mod/profile.php View File

@@ -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);



+ 1
- 1
mod/redir.php View File

@@ -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


+ 3
- 3
src/App.php 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)


+ 1
- 1
src/Core/NotificationsManager.php 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',


+ 1
- 1
src/Model/Contact.php 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());


+ 1
- 1
src/Module/Magic.php 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'


+ 1
- 1
util/htconfig.vagrant.php View File

@@ -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.


+ 1
- 1
view/theme/frio/php/default.php View File

@@ -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…
Cancel
Save