mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
normalise_link calls
implement normaliseLink function
This commit is contained in:
parent
5276c28a78
commit
ffc406d819
54 changed files with 248 additions and 222 deletions
|
@ -5,6 +5,7 @@ namespace Friendica\Core\Console;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Util\Strings;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
|
@ -60,7 +61,7 @@ HELP;
|
|||
throw new RuntimeException('Friendica isn\'t properly installed yet.');
|
||||
}
|
||||
|
||||
$nurl = normalise_link($this->getArgument(0));
|
||||
$nurl = Strings::normaliseLink($this->getArgument(0));
|
||||
if (!DBA::exists('contact', ['nurl' => $nurl, 'archive' => false])) {
|
||||
throw new RuntimeException(L10n::t('Could not find any unarchived contact entry for this URL (%s)', $nurl));
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Friendica\Core\Console;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Strings;
|
||||
use RuntimeException;
|
||||
|
||||
require_once 'include/text.php';
|
||||
|
@ -79,7 +80,7 @@ HELP;
|
|||
throw new RuntimeException('This account seems not to exist.');
|
||||
}
|
||||
|
||||
$nurl = normalise_link($net['url']);
|
||||
$nurl = Strings::normaliseLink($net['url']);
|
||||
$contact = DBA::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
|
||||
if (DBA::isResult($contact)) {
|
||||
DBA::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue