From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Tue, 26 Jun 2018 00:39:56 +0000 (-0400)
Subject: Rename App->path to App->urlpath
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e952d6677bf01ab23f80c4ffbe0e4e3d0c1ef43b;p=friendica.git

Rename App->path to App->urlpath
---

diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 6592bf901f..b7a0dd7487 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -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);
diff --git a/mod/hcard.php b/mod/hcard.php
index 07c551ebdb..f2b86baf99 100644
--- a/mod/hcard.php
+++ b/mod/hcard.php
@@ -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);
 
diff --git a/mod/profile.php b/mod/profile.php
index 60741db726..08c0dfdb86 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -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);
 
diff --git a/mod/redir.php b/mod/redir.php
index 8484b53eba..e448aa36d3 100644
--- a/mod/redir.php
+++ b/mod/redir.php
@@ -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
diff --git a/src/App.php b/src/App.php
index ac86b2f6c7..652b048260 100644
--- a/src/App.php
+++ b/src/App.php
@@ -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)
diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php
index 507d4db131..fa8476b906 100644
--- a/src/Core/NotificationsManager.php
+++ b/src/Core/NotificationsManager.php
@@ -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',
diff --git a/src/Model/Contact.php b/src/Model/Contact.php
index dcd6c37db5..093ee0d91e 100644
--- a/src/Model/Contact.php
+++ b/src/Model/Contact.php
@@ -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());
diff --git a/src/Module/Magic.php b/src/Module/Magic.php
index 0b6874069a..d55e8f93bc 100644
--- a/src/Module/Magic.php
+++ b/src/Module/Magic.php
@@ -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'
diff --git a/util/htconfig.vagrant.php b/util/htconfig.vagrant.php
index 623b587ef0..f75e208ee5 100644
--- a/util/htconfig.vagrant.php
+++ b/util/htconfig.vagrant.php
@@ -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.
diff --git a/view/theme/frio/php/default.php b/view/theme/frio/php/default.php
index 99baa8efc8..28f44504b6 100644
--- a/view/theme/frio/php/default.php
+++ b/view/theme/frio/php/default.php
@@ -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