mirror of
https://github.com/friendica/friendica
synced 2025-04-28 18:24:24 +02:00
Adapt BaseURL calls to new UriInterface
This commit is contained in:
parent
9e6d95284b
commit
f0c29edcde
101 changed files with 218 additions and 241 deletions
|
@ -199,8 +199,7 @@ HELP;
|
|||
$this->out('The Friendica URL has to be set during CLI installation.');
|
||||
return 1;
|
||||
} else {
|
||||
$baseUrl = new BaseURL($this->config, []);
|
||||
$baseUrl->saveByURL($url);
|
||||
$configCache->set('system', 'url', $url);
|
||||
}
|
||||
|
||||
$installer->createConfig($configCache);
|
||||
|
|
|
@ -94,7 +94,7 @@ HELP;
|
|||
|
||||
$fields = ['id', 'avatar', 'photo', 'thumb', 'micro', 'uri-id', 'url', 'avatar', 'network'];
|
||||
$condition = ["NOT `self` AND `avatar` != ? AND `photo` LIKE ? AND `uid` = ? AND `uri-id` != ? AND NOT `uri-id` IS NULL AND NOT `network` IN (?, ?)",
|
||||
'', $this->baseUrl->get() . '/photo/%', 0, 0, Protocol::MAIL, Protocol::FEED];
|
||||
'', $this->baseUrl . '/photo/%', 0, 0, Protocol::MAIL, Protocol::FEED];
|
||||
|
||||
$count = 0;
|
||||
$total = $this->dba->count('contact', $condition);
|
||||
|
|
|
@ -92,9 +92,9 @@ HELP;
|
|||
throw new \InvalidArgumentException('Can not parse new base URL. Must have at least <scheme>://<domain>');
|
||||
}
|
||||
|
||||
$this->out(sprintf('Relocation started from %s to %s. Could take a while to complete.', $this->baseUrl->get(true), $this->getArgument(0)));
|
||||
$this->out(sprintf('Relocation started from %s to %s. Could take a while to complete.', $this->baseUrl, $this->getArgument(0)));
|
||||
|
||||
$old_url = $this->baseUrl->get(true);
|
||||
$old_url = $this->baseUrl;
|
||||
|
||||
// Generate host names for relocation the addresses in the format user@address.tld
|
||||
$new_host = str_replace('http://', '@', Strings::normaliseLink($new_url));
|
||||
|
@ -179,7 +179,6 @@ HELP;
|
|||
// update config
|
||||
$this->out('Updating config values');
|
||||
$this->config->set('system', 'url', $new_url);
|
||||
$this->baseUrl->saveByURL($new_url);
|
||||
|
||||
$this->database->commit();
|
||||
} catch (\Throwable $e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue