mirror of
https://github.com/friendica/friendica
synced 2025-04-28 18:24:24 +02:00
Merge remote-tracking branch 'upstream/develop' into move-delivery
This commit is contained in:
commit
4eceb2d26f
37 changed files with 712 additions and 132 deletions
|
@ -157,7 +157,7 @@ HELP;
|
|||
|
||||
$url = Probe::cleanURI($url);
|
||||
|
||||
$contact = ContactModel::getByURLForUser($url, $user['uid']);
|
||||
$contact = ContactModel::getByURL($url, null, [], $user['uid']);
|
||||
if (!empty($contact)) {
|
||||
throw new RuntimeException('Contact already exists');
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
namespace Friendica\Console;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Update;
|
||||
|
||||
|
@ -38,9 +38,9 @@ class PostUpdate extends \Asika\SimpleConsole\Console
|
|||
*/
|
||||
private $appMode;
|
||||
/**
|
||||
* @var IManageConfigValues
|
||||
* @var IManageKeyValuePairs
|
||||
*/
|
||||
private $config;
|
||||
private $keyValue;
|
||||
/**
|
||||
* @var L10n
|
||||
*/
|
||||
|
@ -60,13 +60,13 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(App\Mode $appMode, IManageConfigValues $config, L10n $l10n, array $argv = null)
|
||||
public function __construct(App\Mode $appMode, IManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
$this->appMode = $appMode;
|
||||
$this->config = $config;
|
||||
$this->l10n = $l10n;
|
||||
$this->appMode = $appMode;
|
||||
$this->keyValue = $keyValue;
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
|
||||
protected function doExecute(): int
|
||||
|
@ -83,7 +83,7 @@ HELP;
|
|||
$this->out($this->getHelp());
|
||||
return 0;
|
||||
} elseif ($reset_version) {
|
||||
$this->config->set('system', 'post_update_version', $reset_version);
|
||||
$this->keyValue->set('post_update_version', $reset_version);
|
||||
echo $this->l10n->t('Post update version number has been set to %s.', $reset_version) . "\n";
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue