Merge pull request #14871 from MrPetovan/task/obsolete-urlpath
Remove remaining references of unused urlpath config key
This commit is contained in:
commit
2b00d1b2d0
8 changed files with 18 additions and 26 deletions
|
@ -43,7 +43,7 @@ Some examples of common known configuration files:
|
||||||
Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
|
Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
|
||||||
|
|
||||||
If needed, an alternative `config` path can be used by using the `FRIENDICA_CONFIG_DIR` environment variable (full path required!).
|
If needed, an alternative `config` path can be used by using the `FRIENDICA_CONFIG_DIR` environment variable (full path required!).
|
||||||
This is useful in case of hardening the system by separating configuration from program binaries.
|
This is useful in case of hardening the system by separating configuration from program binaries.
|
||||||
|
|
||||||
### Static Configuration location
|
### Static Configuration location
|
||||||
|
|
||||||
|
@ -160,16 +160,6 @@ $a->config['register_policy'] = REGISTER_CLOSED;
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>
|
<td><pre>
|
||||||
$a->path = "value";
|
|
||||||
</pre></td>
|
|
||||||
<td><pre>
|
|
||||||
'system' => [
|
|
||||||
'urlpath' => 'value',
|
|
||||||
],
|
|
||||||
</pre></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><pre>
|
|
||||||
$default_timezone = "value";
|
$default_timezone = "value";
|
||||||
</pre></td>
|
</pre></td>
|
||||||
<td><pre>
|
<td><pre>
|
||||||
|
@ -313,7 +303,7 @@ Enabling the admin panel for an account, and thus making the account holder admi
|
||||||
'config' => [
|
'config' => [
|
||||||
'admin_email' => 'someone@example.com',
|
'admin_email' => 'someone@example.com',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
|
Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
|
||||||
If more than one account should be able to access the admin panel, separate the email addresses with a comma.
|
If more than one account should be able to access the admin panel, separate the email addresses with a comma.
|
||||||
|
|
|
@ -218,7 +218,6 @@ All options will be saved in the `config/local.config.php` and are overruling th
|
||||||
- `-U|--dbuser <username>` The username of the mysql/mariadb database login (env `MYSQL_USER` or `MYSQL_USERNAME`)
|
- `-U|--dbuser <username>` The username of the mysql/mariadb database login (env `MYSQL_USER` or `MYSQL_USERNAME`)
|
||||||
- `-P|--dbpass <password>` The password of the mysql/mariadb database login (env `MYSQL_PASSWORD`)
|
- `-P|--dbpass <password>` The password of the mysql/mariadb database login (env `MYSQL_PASSWORD`)
|
||||||
- `-d|--dbdata <database>` The name of the mysql/mariadb database (env `MYSQL_DATABASE`)
|
- `-d|--dbdata <database>` The name of the mysql/mariadb database (env `MYSQL_DATABASE`)
|
||||||
- `-u|--urlpath <url_path>` The URL path of Friendica - f.e. '/friendica' (env `FRIENDICA_URL_PATH`)
|
|
||||||
- `-b|--phppath <php_path>` The path of the PHP binary (env `FRIENDICA_PHP_PATH`)
|
- `-b|--phppath <php_path>` The path of the PHP binary (env `FRIENDICA_PHP_PATH`)
|
||||||
- `-A|--admin <mail>` The admin email address of Friendica (env `FRIENDICA_ADMIN_MAIL`)
|
- `-A|--admin <mail>` The admin email address of Friendica (env `FRIENDICA_ADMIN_MAIL`)
|
||||||
- `-T|--tz <timezone>` The timezone of Friendica (env `FRIENDICA_TZ`)
|
- `-T|--tz <timezone>` The timezone of Friendica (env `FRIENDICA_TZ`)
|
||||||
|
|
|
@ -419,7 +419,7 @@ We strongly discourage you from doing so, as this will break federation to other
|
||||||
Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
|
Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
|
||||||
|
|
||||||
'system' => [
|
'system' => [
|
||||||
'urlpath' => 'tests/friendica',
|
'url' => 'https://example.com/tests/friendica',
|
||||||
],
|
],
|
||||||
|
|
||||||
## Other exceptions
|
## Other exceptions
|
||||||
|
|
|
@ -410,7 +410,7 @@ Wir raten allerdings dringen davon ab, da es die Interoperabilität mit anderen
|
||||||
Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfür:
|
Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfür:
|
||||||
|
|
||||||
'system' => [
|
'system' => [
|
||||||
'urlpath' => 'tests/friendica',
|
'url' => 'https://example.com/tests/friendica',
|
||||||
],
|
],
|
||||||
|
|
||||||
## Weitere Ausnahmen
|
## Weitere Ausnahmen
|
||||||
|
|
|
@ -17,8 +17,7 @@ use Psr\Http\Message\UriInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class which checks and contains the basic
|
* A class which checks and contains the basic environment for the BaseURL (url)
|
||||||
* environment for the BaseURL (url, urlpath, ssl_policy, hostname, scheme)
|
|
||||||
*/
|
*/
|
||||||
class BaseURL extends Uri implements UriInterface
|
class BaseURL extends Uri implements UriInterface
|
||||||
{
|
{
|
||||||
|
@ -43,8 +42,7 @@ class BaseURL extends Uri implements UriInterface
|
||||||
/* Relative script path to the web server root
|
/* Relative script path to the web server root
|
||||||
* Not all of those $_SERVER properties can be present, so we do by inverse priority order
|
* Not all of those $_SERVER properties can be present, so we do by inverse priority order
|
||||||
*/
|
*/
|
||||||
$relativeScriptPath =
|
$relativeScriptPath = ($server['REDIRECT_URL'] ?? '') ?:
|
||||||
($server['REDIRECT_URL'] ?? '') ?:
|
|
||||||
($server['REDIRECT_URI'] ?? '') ?:
|
($server['REDIRECT_URI'] ?? '') ?:
|
||||||
($server['REDIRECT_SCRIPT_URL'] ?? '') ?:
|
($server['REDIRECT_SCRIPT_URL'] ?? '') ?:
|
||||||
($server['SCRIPT_URL'] ?? '') ?:
|
($server['SCRIPT_URL'] ?? '') ?:
|
||||||
|
|
|
@ -126,6 +126,11 @@ return [
|
||||||
// Display "Emoji Only" posts in big.
|
// Display "Emoji Only" posts in big.
|
||||||
'big_emojis' => true,
|
'big_emojis' => true,
|
||||||
|
|
||||||
|
// basepath (String)
|
||||||
|
// Absolute file path to your Friendica install
|
||||||
|
// Examples: /var/www, /home/user/friendica...
|
||||||
|
'basepath' => '',
|
||||||
|
|
||||||
// bulk_delivery (Boolean)
|
// bulk_delivery (Boolean)
|
||||||
// Delivers AP messages in a bulk (experimental)
|
// Delivers AP messages in a bulk (experimental)
|
||||||
'bulk_delivery' => false,
|
'bulk_delivery' => false,
|
||||||
|
@ -577,6 +582,12 @@ return [
|
||||||
// Transmit pending events upon accepted contact request for groups
|
// Transmit pending events upon accepted contact request for groups
|
||||||
'transmit_pending_events' => false,
|
'transmit_pending_events' => false,
|
||||||
|
|
||||||
|
// url (String)
|
||||||
|
// The absolute URL used to access your Friendica node. It should include the scheme, the domain name, and the
|
||||||
|
// sub-folder if any. Used by command-line processes to send correct links to your Friendica server.
|
||||||
|
// Example: https://example.com/friendica
|
||||||
|
'url' => '',
|
||||||
|
|
||||||
// username_min_length (Integer)
|
// username_min_length (Integer)
|
||||||
// The minimum character length a username can be.
|
// The minimum character length a username can be.
|
||||||
// This length is checked once the username has been trimmed and multiple spaces have been collapsed into one.
|
// This length is checked once the username has been trimmed and multiple spaces have been collapsed into one.
|
||||||
|
|
|
@ -17,7 +17,6 @@ return [
|
||||||
'temppath' => '/tmp/friendica.local',
|
'temppath' => '/tmp/friendica.local',
|
||||||
'theme' => 'frio',
|
'theme' => 'frio',
|
||||||
'url' => 'https://friendica.local',
|
'url' => 'https://friendica.local',
|
||||||
'urlpath' => '',
|
|
||||||
'build' => 1508,
|
'build' => 1508,
|
||||||
'maintenance' => false,
|
'maintenance' => false,
|
||||||
'dbupdate' => 1,
|
'dbupdate' => 1,
|
||||||
|
|
|
@ -129,7 +129,6 @@ class AutomaticInstallationConsoleTest extends ConsoleTestCase
|
||||||
],
|
],
|
||||||
'system' => [
|
'system' => [
|
||||||
'basepath' => '',
|
'basepath' => '',
|
||||||
'urlpath' => '',
|
|
||||||
'url' => 'http://friendica.local',
|
'url' => 'http://friendica.local',
|
||||||
'ssl_policy' => 0,
|
'ssl_policy' => 0,
|
||||||
'default_timezone' => '',
|
'default_timezone' => '',
|
||||||
|
@ -152,7 +151,6 @@ class AutomaticInstallationConsoleTest extends ConsoleTestCase
|
||||||
'admin_email' => 'admin@philipp.info',
|
'admin_email' => 'admin@philipp.info',
|
||||||
],
|
],
|
||||||
'system' => [
|
'system' => [
|
||||||
'urlpath' => 'test/it',
|
|
||||||
'url' => 'http://friendica.local/test/it',
|
'url' => 'http://friendica.local/test/it',
|
||||||
'basepath' => '',
|
'basepath' => '',
|
||||||
'ssl_policy' => '2',
|
'ssl_policy' => '2',
|
||||||
|
@ -176,7 +174,6 @@ class AutomaticInstallationConsoleTest extends ConsoleTestCase
|
||||||
'admin_email' => 'admin@philipp.info',
|
'admin_email' => 'admin@philipp.info',
|
||||||
],
|
],
|
||||||
'system' => [
|
'system' => [
|
||||||
'urlpath' => 'test/it',
|
|
||||||
'url' => 'https://friendica.local/test/it',
|
'url' => 'https://friendica.local/test/it',
|
||||||
'basepath' => '',
|
'basepath' => '',
|
||||||
'ssl_policy' => '1',
|
'ssl_policy' => '1',
|
||||||
|
@ -352,7 +349,6 @@ FIN;
|
||||||
self::assertConfigEntry('system', 'default_timezone', $assertion, ($default) ? Installer::DEFAULT_TZ : null);
|
self::assertConfigEntry('system', 'default_timezone', $assertion, ($default) ? Installer::DEFAULT_TZ : null);
|
||||||
self::assertConfigEntry('system', 'language', $assertion, ($default) ? Installer::DEFAULT_LANG : null);
|
self::assertConfigEntry('system', 'language', $assertion, ($default) ? Installer::DEFAULT_LANG : null);
|
||||||
self::assertConfigEntry('system', 'url', $assertion);
|
self::assertConfigEntry('system', 'url', $assertion);
|
||||||
self::assertConfigEntry('system', 'urlpath', $assertion);
|
|
||||||
self::assertConfigEntry('system', 'ssl_policy', $assertion, ($default) ? App\BaseURL::DEFAULT_SSL_SCHEME : null);
|
self::assertConfigEntry('system', 'ssl_policy', $assertion, ($default) ? App\BaseURL::DEFAULT_SSL_SCHEME : null);
|
||||||
self::assertConfigEntry('system', 'basepath', ($realBasepath) ? $this->root->url() : $assertion);
|
self::assertConfigEntry('system', 'basepath', ($realBasepath) ? $this->root->url() : $assertion);
|
||||||
}
|
}
|
||||||
|
@ -446,7 +442,6 @@ return [
|
||||||
],
|
],
|
||||||
'system' => [
|
'system' => [
|
||||||
'basepath' => '{$conf('system', 'basepath')}',
|
'basepath' => '{$conf('system', 'basepath')}',
|
||||||
'urlpath' => '{$conf('system', 'urlpath')}',
|
|
||||||
'url' => '{$conf('system', 'url')}',
|
'url' => '{$conf('system', 'url')}',
|
||||||
'ssl_policy' => '{$conf('system', 'ssl_policy')}',
|
'ssl_policy' => '{$conf('system', 'ssl_policy')}',
|
||||||
'default_timezone' => '{$conf('system', 'default_timezone')}',
|
'default_timezone' => '{$conf('system', 'default_timezone')}',
|
||||||
|
@ -604,7 +599,7 @@ CONF;
|
||||||
self::assertStuckDB($txt);
|
self::assertStuckDB($txt);
|
||||||
self::assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
|
self::assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
|
||||||
|
|
||||||
self::assertConfig(['config' => ['hostname' => 'friendica.local'], 'system' => ['url' => 'http://friendica.local', 'ssl_policy' => 0, 'urlpath' => '']], false, true, false, true);
|
self::assertConfig(['config' => ['hostname' => 'friendica.local'], 'system' => ['url' => 'http://friendica.local', 'ssl_policy' => 0]], false, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetHelp()
|
public function testGetHelp()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue